function Nexista_Check_freshness($server_init) { global $app_config; global $foundry; global $server_init; $config = PROJECT_ROOT . '/config/config.xml'; $app_config = PROJECT_ROOT . '/apps/' . APP_NAME . '/config/config.xml'; // Should sitemap be checked? not usually. $my_sitemap = PROJECT_ROOT . '/apps/' . APP_NAME . '/sitemap.xml'; $last_build_time = filemtime($server_init); if (file_exists($app_config)) { if ($last_build_time < filemtime($app_config) || $last_build_time < filemtime($my_sitemap)) { $app_config_stat = false; } else { $app_config_stat = true; } } if ($last_build_time < filemtime($my_sitemap) || $last_build_time < filemtime($config) || $app_config_stat === false) { nexista_build_it_now($server_init); } }
RewriteCond %{REQUEST_URI} !/a/dev/phunkybb/index.php|.css|.jpg|.png|.js RewriteRule ^/a/dev/phunkybb/(\w+)/(\w+)/ /a/dev/phunkybb/index.php?nxrw_path=/a/dev/phunkybb/index.php&nid=topic&forum_basename=$1&basename=$2 [L] */ /* Probably don't need to edit anything under this line. */ // Bad hack //if(!strpos($_SERVER['REQUEST_URI'],'.php')) { // header("Location: ".$_SERVER['REQUEST_URI']."index.php"); // exit; //} $server_name = $_SERVER['SERVER_NAME']; define('SERVER_NAME', $server_name); $project_root = dirname(dirname(__FILE__)); $project_root = str_replace('\\', '/', $project_root); define('NX_PATH_CORE', NX_PATH_BASE . 'kernel/'); define('PROJECT_ROOT', $project_root); define('PROJECT_NAME', 'phunkybb'); define('APP_NAME', 'phunkybb'); $server_init = PROJECT_ROOT . '/cache/' . APP_NAME . '/' . APP_NAME . '.php'; if (!(include NX_PATH_BASE . 'extensions/nexista_builder.php')) { echo 'Error: Unable to load server loader or builder.'; exit; } // Loader not there or manually getting rebuilt? Build it! if (!file_exists($server_init) || isset($_POST['x--dev--rebuild'])) { nexista_build_it_now($server_init); } else { // Loader is there, check freshness, then either rebuild or include it. nexista_check_freshness($server_init); include $server_init; exit; }