if (file_exists(litepublisher::$paths->data . 'storage.php') && filesize(litepublisher::$paths->data . 'storage.php')) { die('Storage not loaded'); } //if (!litepublisher::$options->installed) require_once(litepublisher::$paths->lib .'install' . DIRECTORY_SEPARATOR . 'install.php'); require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php'; } litepublisher::$classes = tclasses::i(); litepublisher::$options = toptions::i(); litepublisher::$db = new tdatabase(); litepublisher::$site = tsite::i(); litepublisher::$urlmap = turlmap::i(); /* litepublisher::$db->query('SET sort_buffer_size = ' . 1024*1024*32); litepublisher::$db->query('SET read_rnd_buffer_size = ' . 1024*1024*32); */ tlocal::clearcache(); ttheme::clearcache(); include dirname(__FILE__) . '/zdebug.php'; if (!defined('litepublisher_mode')) { litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']); } } catch (Exception $e) { // echo $e->GetMessage(); litepublisher::$options->handexception($e); } litepublisher::$options->savemodified(); litepublisher::$options->showerrors(); /* echo "<pre>\n"; $man = tdbmanager::i(); echo $man->performance();
public function update() { $log = $this->log; false; if ($log) { tfiler::log("begin update", 'update'); } tlocal::clearcache(); $this->versions = self::getversions(); $nextver = $this->nextversion; if ($log) { tfiler::log("update started from litepublisher::{$options->version} to {$this->version}", 'update'); } $v = litepublisher::$options->version + 0.01; while (version_compare($v, $nextver) <= 0) { $ver = (string) $v; if (strlen($ver) == 3) { $ver .= '0'; } if (strlen($ver) == 1) { $ver .= '.00'; } if ($log) { tfiler::log("{$v} selected to update", 'update'); } $this->run($v); litepublisher::$options->version = $ver; litepublisher::$options->savemodified(); $v = $v + 0.01; } ttheme::clearcache(); tlocal::clearcache(); tsidebars::fix(); if ($log) { tfiler::log("update finished", 'update'); } }