224 // question mark. |
224 // question mark. |
225 $sep = ( strstr(contentPath, '?') ) ? '&' : '?'; |
225 $sep = ( strstr(contentPath, '?') ) ? '&' : '?'; |
226 define('urlSeparator', $sep); |
226 define('urlSeparator', $sep); |
227 unset($sep); // save 10 bytes of memory... |
227 unset($sep); // save 10 bytes of memory... |
228 |
228 |
229 // Sometimes there are critical failures triggered by initialization functions in the Enano API that are recurring |
|
230 // and cannot be fixed except for manual intervention. This is where that code should go. |
|
231 if ( isset($_GET['do']) && $_GET['do'] == 'diag' && isset($_GET['sub']) ) |
|
232 { |
|
233 switch($_GET['sub']) |
|
234 { |
|
235 case 'cookie_destroy': |
|
236 unset($_COOKIE['sid']); |
|
237 setcookie('sid', '', time()-3600*24, scriptPath); |
|
238 setcookie('sid', '', time()-3600*24, scriptPath.'/'); |
|
239 die('Session cookie cleared. <a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'">Continue</a>'); |
|
240 break; |
|
241 } |
|
242 } |
|
243 |
|
244 // Build the list of system tables (this is mostly done in constants.php, but that's before table_prefix is known) |
229 // Build the list of system tables (this is mostly done in constants.php, but that's before table_prefix is known) |
245 if ( defined('table_prefix') && !defined('ENANO_TABLELIST_PREFIXED') ) |
230 if ( defined('table_prefix') && !defined('ENANO_TABLELIST_PREFIXED') ) |
246 { |
231 { |
247 define('ENANO_TABLELIST_PREFIXED', 1); |
232 define('ENANO_TABLELIST_PREFIXED', 1); |
248 foreach ( $system_table_list as $i => $_ ) |
233 foreach ( $system_table_list as $i => $_ ) |