Changeset 2275431
- Timestamp:
- 04/03/2020 07:45:31 PM (6 years ago)
- Location:
- shiftcontroller/trunk
- Files:
-
- 2 added
- 7 edited
-
hc3/profiler.php (modified) (3 diffs)
-
hc3/session.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
sh4/app/boot.php (modified) (1 diff)
-
sh4/conf/boot.php (modified) (2 diffs)
-
sh4/conf/html/admin/controller/conflicts.php (added)
-
sh4/conf/html/admin/view/conflicts.php (added)
-
sh4/shifts/conflict/overlap.php (modified) (4 diffs)
-
shiftcontroller4.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shiftcontroller/trunk/hc3/profiler.php
r1864047 r2275431 31 31 foreach ($this->_available_sections as $section){ 32 32 if ( ! isset($config[$section])){ 33 $this-> _compile_{$section} = TRUE;33 $this->{'_compile_' . $section} = TRUE; 34 34 } 35 35 } … … 54 54 foreach ($config as $method => $enable){ 55 55 if (in_array($method, $this->_available_sections)){ 56 $this-> _compile_{$method} = ($enable !== FALSE) ? TRUE : FALSE;56 $this->{'_compile_' . $method} = ($enable !== FALSE) ? TRUE : FALSE; 57 57 } 58 58 } … … 329 329 330 330 foreach ($this->_available_sections as $section){ 331 if ($this-> _compile_{$section} !== FALSE){331 if ($this->{'_compile_' . $section} !== FALSE){ 332 332 $func = "_compile_{$section}"; 333 333 $output .= $this->{$func}(); -
shiftcontroller/trunk/hc3/session.php
r1851180 r2275431 49 49 */ 50 50 51 protected function _isRest() 52 { 53 // if wordpress 54 if( ! defined('WPINC') ){ 55 return FALSE; 56 } 57 58 $prefix = rest_get_url_prefix( ); 59 if (defined('REST_REQUEST') && REST_REQUEST // (#1) 60 || isset($_GET['rest_route']) // (#2) 61 && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0) 62 return true; 63 64 // (#3) 65 $rest_url = wp_parse_url( site_url( $prefix ) ); 66 $current_url = wp_parse_url( add_query_arg( array( ) ) ); 67 return strpos( $current_url['path'], $rest_url['path'], 0 ) === 0; 68 } 69 51 70 public function __construct( $prefix = 'hc3' ) 52 71 { 72 if( $this->_isRest() ){ 73 return; 74 } 75 53 76 // $this->request = $request; 54 77 $this->_prefix = $prefix; … … 57 80 58 81 // echo "INIT SESSION FOR '$this->_prefix'<br>"; 59 60 82 if( session_id() == '' ){ 61 83 @session_start(); -
shiftcontroller/trunk/readme.txt
r2258787 r2275431 60 60 61 61 == Changelog == 62 63 = 4.6.0 = 64 * Added a setting if a conflict is considered for overlapping shifts only in the same calendar. 65 * BUG: there was a "REST API" error in Wordpress SiteHealth. 62 66 63 67 = 4.5.9 = -
shiftcontroller/trunk/sh4/app/boot.php
r2258787 r2275431 30 30 31 31 ->init( 'datetime_hide_schedule_reports', 0 ) 32 ->init( 'conflicts_calendar_only', 0 ) 32 33 ; 33 34 -
shiftcontroller/trunk/sh4/conf/boot.php
r1856992 r2275431 13 13 ->add( 'sh4/app/html/view/admin::menu::after', function( $return ){ 14 14 $return['admin/datetime'] = array( 'admin/conf/datetime', '__Date and Time__' ); 15 $return['admin/conflicts'] = array( 'admin/conf/conflicts', '__Conflicts__' ); 15 16 $return['admin/about'] = array( 'admin/about', '__About__' ); 16 17 return $return; … … 21 22 ->register( 'get:admin/conf/datetime', array('SH4_Conf_Html_Admin_View_Datetime', 'render') ) 22 23 ->register( 'post:admin/conf/datetime', array('SH4_Conf_Html_Admin_Controller_Datetime', 'execute') ) 24 25 ->register( 'get:admin/conf/conflicts', array('SH4_Conf_Html_Admin_View_Conflicts', 'render') ) 26 ->register( 'post:admin/conf/conflicts', array('SH4_Conf_Html_Admin_Controller_Conflicts', 'execute') ) 23 27 ; 24 28 } -
shiftcontroller/trunk/sh4/shifts/conflict/overlap.php
r1954223 r2275431 7 7 HC3_Hooks $hooks, 8 8 HC3_Ui $ui, 9 HC3_Settings $settings, 9 10 SH4_Shifts_Query $shiftsQuery, 10 11 SH4_Shifts_View_Widget $widget … … 14 15 $this->shiftsQuery = $hooks->wrap( $shiftsQuery ); 15 16 $this->widget = $hooks->wrap( $widget ); 17 $this->settings = $hooks->wrap($settings); 16 18 } 17 19 … … 20 22 { 21 23 $return = TRUE; 24 25 $conflictSameCalendarOnly = $this->settings->get( 'conflicts_calendar_only' ); 22 26 23 27 $this->_conflictingShifts = array(); … … 83 87 } 84 88 89 if( $conflictSameCalendarOnly && (! $testCalendar->isTimeoff()) && ( ! $calendar->isTimeoff() ) ){ 90 if( $testCalendar->getId() != $calendar->getId() ){ 91 continue; 92 } 93 } 94 85 95 $this->_conflictingShifts[] = $testShift; 86 96 } -
shiftcontroller/trunk/shiftcontroller4.php
r2258787 r2275431 4 4 * Plugin URI: http://www.shiftcontroller.com/ 5 5 * Description: Staff scheduling plugin 6 * Version: 4. 5.96 * Version: 4.6.0 7 7 * Author: hitcode.com 8 8 * Author URI: http://www.shiftcontroller.com/ … … 11 11 */ 12 12 13 define( 'SH4_VERSION', 4 59);13 define( 'SH4_VERSION', 460 ); 14 14 15 15 if (! defined('ABSPATH')) exit; // Exit if accessed directly
Note: See TracChangeset
for help on using the changeset viewer.