Changeset 2282011
- Timestamp:
- 04/12/2020 06:18:58 PM (6 years ago)
- Location:
- shiftcontroller/trunk
- Files:
-
- 3 edited
-
hc3/session.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
shiftcontroller4.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shiftcontroller/trunk/hc3/session.php
r2275431 r2282011 49 49 */ 50 50 51 protected function _isRest()52 {53 // if wordpress54 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 70 51 public function __construct( $prefix = 'hc3' ) 71 52 { 72 if( $this->_isRest() ){73 return;74 }75 76 53 // $this->request = $request; 77 54 $this->_prefix = $prefix; … … 81 58 // echo "INIT SESSION FOR '$this->_prefix'<br>"; 82 59 if( session_id() == '' ){ 83 @session_start(); 60 $sessionOptions = array(); 61 $sessionOptions = array( 'read_and_close' => TRUE ); 62 @session_start( $sessionOptions ); 84 63 } 85 64 … … 318 297 public function setUserdata( $key, $value, $append = FALSE ) 319 298 { 299 @session_start(); 320 300 $newdata = array( $key => $value ); 321 301 … … 365 345 public function unsetUserdata( $key ) 366 346 { 347 @session_start(); 367 348 $parent_newdata = array(); 368 349 -
shiftcontroller/trunk/readme.txt
r2275431 r2282011 60 60 61 61 == Changelog == 62 63 = 4.6.1 = 64 * BUG: "loopback request" error in Wordpress SiteHealth. 62 65 63 66 = 4.6.0 = -
shiftcontroller/trunk/shiftcontroller4.php
r2275431 r2282011 4 4 * Plugin URI: http://www.shiftcontroller.com/ 5 5 * Description: Staff scheduling plugin 6 * Version: 4.6. 06 * Version: 4.6.1 7 7 * Author: hitcode.com 8 8 * Author URI: http://www.shiftcontroller.com/ … … 11 11 */ 12 12 13 define( 'SH4_VERSION', 46 0);13 define( 'SH4_VERSION', 461 ); 14 14 15 15 if (! defined('ABSPATH')) exit; // Exit if accessed directly
Note: See TracChangeset
for help on using the changeset viewer.