public function savemodified() { $result = tstorage::savemodified(); $this->onsave($result); return $result; }
require_once litepublisher::$paths->lib . 'events.class.php'; require_once litepublisher::$paths->lib . 'items.class.php'; require_once litepublisher::$paths->lib . 'classes.class.php'; require_once litepublisher::$paths->lib . 'options.class.php'; require_once litepublisher::$paths->lib . 'site.class.php'; } else { require_once litepublisher::$paths->lib . 'kernel.php'; } define('dbversion', true); /* if (class_exists('Memcache')) { tfilestorage::$memcache = new Memcache; tfilestorage::$memcache->connect('127.0.0.1', 11211); } */ if (!tstorage::loaddata()) { if (file_exists(litepublisher::$paths->data . 'storage.php') && filesize(litepublisher::$paths->data . 'storage.php')) { die('Storage not loaded'); } require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php'; } litepublisher::$classes = tclasses::i(); litepublisher::$options = toptions::i(); litepublisher::$db = tdatabase::i(); litepublisher::$site = tsite::i(); litepublisher::$urlmap = turlmap::i(); if (!defined('litepublisher_mode')) { litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']); } } catch (Exception $e) { litepublisher::$options->handexception($e);
clearposts(); cleartags(tcategories::i()); cleartags(ttags::i()); clearmenu(); if (dbversion) { $do = tdboptimizer::i(); $do->optimize(); } } try { clearall(); echo "started\n"; $from = isset($_REQUEST['from']) ? $_REQUEST['from'] : 0; if ($from == 0) { ExportOptions(); } if ($from = ExportPosts()) { echo "</pre>\r\n<form name='form' action='' type='get'>\r\n<input type=hidden name='from' value='{$from}' />\r\n <p><input type='submit' name='Submit' value='Continue'/></p>\r\n</form>\r\n<br>"; } else { echo "import finished<br>\n"; } echo "final\n"; } catch (Exception $e) { echo $e->GetMessage(); echo "\n"; echo $e->getTraceAsString(); //litepublisher::$options->showerror = true; // litepublisher::$options->handexception($e); } tstorage::savemodified(); echo round(memory_get_usage() / 1024 / 1024, 2), 'MB <br>';
public function save() { return tstorage::save($this); }
public static function loaddata() { self::$data = array(); return self::loadvar(litepublisher::$paths->data . 'storage', self::$data); }
return array_key_exists($name, litepublisher::$_paths); } } try { litepublisher::init(); if (litepublisher::$debug) { require_once litepublisher::$paths->lib . 'data.class.php'; require_once litepublisher::$paths->lib . 'events.class.php'; require_once litepublisher::$paths->lib . 'items.class.php'; require_once litepublisher::$paths->lib . 'classes.class.php'; require_once litepublisher::$paths->lib . 'options.class.php'; require_once litepublisher::$paths->lib . 'site.class.php'; } else { require_once litepublisher::$paths->lib . 'kernel.php'; } tstorage::loaddata(); litepublisher::$classes = tclasses::instance(); litepublisher::$options = toptions::instance(); litepublisher::$site = tsite::instance(); if (!litepublisher::$options->installed) { require_once litepublisher::$paths->lib . 'install' . DIRECTORY_SEPARATOR . 'install.php'; } if (dbversion) { litepublisher::$db = new tdatabase(); } litepublisher::$options->admincookie = litepublisher::$options->cookieenabled && litepublisher::$options->authcookie(); litepublisher::$urlmap = turlmap::instance(); if (!defined('litepublisher_mode')) { litepublisher::$urlmap->request(strtolower($_SERVER['HTTP_HOST']), $_SERVER['REQUEST_URI']); } } catch (Exception $e) {