public function processform() { litepublisher::$options->dateformat = $_POST['dateformat']; litepublisher::$options->language = $_POST['language']; if (litepublisher::$options->timezone != $_POST['timezone']) { litepublisher::$options->timezone = $_POST['timezone']; $archives = tarchives::i(); turlmap::unsub($archives); $archives->PostsChanged(); } $merger = tlocalmerger::i(); $merger->lock(); //$merger->items = array(); //$merger->install(); foreach (array_keys($merger->items) as $name) { $keys = array_keys($merger->items[$name]['texts']); $merger->setfiles($name, $_POST[$name . '_files']); foreach ($keys as $key) { $merger->addtext($name, $key, $_POST[$name . '_text_' . $key]); } } $merger->html = explode("\n", trim($_POST['adminhtml_files'])); foreach ($merger->html as $i => $filename) { $merger->html[$i] = trim($filename); } $merger->unlock(); }
function tpollsUninstall($self) { tcssmerger::i()->deletestyle(dirname(__FILE__) . '/stars.min.css'); tjsonserver::i()->unbind($self); tlocalmerger::i()->deleteplugin(tplugins::getname(__FILE__)); $jsmerger = tjsmerger::i(); $jsmerger->lock(); $jsmerger->deletefile('default', '/plugins/polls/polls.client.min.js'); $jsmerger->deletetext('default', 'poll'); $jsmerger->unlock(); $adminmenus = tadminmenus::i(); $adminmenus->deletetree($adminmenus->url2id('/admin/plugins/polls/')); litepublisher::$classes->delete('tpolltypes'); litepublisher::$classes->delete('tpollsman'); litepublisher::$classes->delete('tpullpolls'); litepublisher::$classes->delete('tadminpolltemplates'); litepublisher::$classes->delete('tadminpolltypes'); litepublisher::$classes->delete('tadminpolloptions'); litepublisher::$classes->delete('tadminpolls'); $manager = tdbmanager::i(); $manager->deletetable($self->table); $manager->deletetable($self->users1); $manager->deletetable($self->users2); $manager->deletetable($self->votes); $dir = litepublisher::$paths->data . 'polls'; tfiler::delete($dir, true, true); }
public function uninstall() { turlmap::unsub($this); $template = ttemplate::i(); $template->deletefromhead($this->get_head()); $merger = tlocalmerger::i(); $merger->deleteplugin(tplugins::getname(__FILE__)); litepublisher::$urlmap->clearcache(); }
function tcodedocpluginUninstall($self) { //die("Warning! You can lost all tickets!"); tposts::unsub($self); $menus = tmenus::i(); $menus->deleteurl('/doc/'); litepublisher::$classes->delete('tcodedocmenu'); litepublisher::$classes->delete('tcodedocfilter'); $filter = tcontentfilter::i(); $filter->unbind($self); $merger = tlocalmerger::i(); $merger->delete('codedoc'); $manager = tdbmanager::i(); $manager->deletetable('codedoc'); }
function tforumUninstall($self) { tcategories::i()->unbind($self); tthemeparser::i()->unbind($self); ttheme::clearcache(); tlocalmerger::i()->deleteplugin(basename(dirname(__FILE__))); tjsmerger::i()->deletefile('default', '/plugins/forum/forum.min.js'); $item = tcategories::i()->getitem($self->rootcat); $menus = tmenus::i(); while ($menus->deleteurl($item['url'])) { } $adminmenus = tadminmenus::i(); $adminmenus->deletetree($adminmenus->url2id('/admin/plugins/forum/')); litepublisher::$classes->delete('tforumeditor'); $linkgen = tlinkgenerator::i(); unset($linkgen->data['forum']); $linkgen->save(); }
function tfoafUninstall($self) { $merger = tlocalmerger::i(); $merger->deleteplugin(tplugins::getname(__FILE__)); $actions = TXMLRPCAction::i(); $actions->deleteclass(get_class($self)); $urlmap = litepublisher::$urlmap; $urlmap->lock(); turlmap::unsub($self); $classes = litepublisher::$classes; $classes->lock(); $classes->delete('tfoafutil'); $classes->delete('tprofile'); $classes->delete('tfriendswidget'); $classes->delete('tadminfoaf'); $classes->unlock(); $admin = tadminmenus::i(); $admin->lock(); $admin->deleteurl('/admin/foaf/profiletemplate/'); $admin->deleteurl('/admin/foaf/profile/'); $admin->deleteurl('/admin/foaf/'); $admin->unlock(); $urlmap->unlock(); if ($self->dbversion) { $manager = tdbmanager::i(); $manager->deletetable($self->table); } $template = ttemplate::i(); $template->deletefromhead(' <link rel="meta" type="application/rdf+xml" title="FOAF" href="$site.url/foaf.xml" />'); $meta = tmetawidget::i(); $meta->lock(); $meta->delete('foaf'); $meta->delete('profile'); $meta->unlock(); ttheme::clearcache(); }
function tusernewsUninstall($self) { tauthor_rights::i()->unbind($self); tlocalmerger::i()->deleteplugin(basename(dirname(__FILE__))); }
public function loadfile($name) { $this->loaded[] = $name; $filename = self::getcachedir() . $name; if (tfilestorage::loadvar($filename, $v) && is_array($v)) { $this->ini = $v + $this->ini; if (isset($v['searchsect'])) { $this->joinsearch($v['searchsect']); } } else { $merger = tlocalmerger::i(); $merger->parse($name); } }
function tdownloaditemsUninstall($self) { //die("Warning! You can lost all downloaditems!"); tposts::unsub($self); $adminmenus = tadminmenus::i(); $adminmenus->deletetree($adminmenus->url2id('/admin/downloaditems/')); $menus = tmenus::i(); $menus->deletetree($menus->class2id('tdownloaditemsmenu')); $parser = tthemeparser::i(); $parser->unbind($self); ttheme::clearcache(); $classes = litepublisher::$classes; $classes->lock(); $classes->delete('tdownloaditem'); $classes->delete('tdownloaditemsmenu'); $classes->delete('tdownloaditemeditor'); $classes->delete('tadmindownloaditems'); $classes->delete('tdownloaditemcounter'); $classes->delete('taboutparser'); $classes->unlock(); $merger = tlocalmerger::i(); $merger->deleteplugin(tplugins::getname(__FILE__)); $manager = tdbmanager::i(); $manager->deletetable($self->childtable); $manager->delete_enum('posts', 'class', 'tdownloaditem'); $optimizer = tdboptimizer::i(); $optimizer->lock(); $optimizer->unbind($self); if (false !== ($i = array_search('downloaditems', $optimizer->childtables))) { unset($optimizer->childtables[$i]); } $optimizer->unlock(); tjsmerger::i()->deletefile('default', '/plugins/downloaditem/downloaditem.min.js'); litepublisher::$options->delete('downloaditem_themetag'); litepublisher::$options->delete('downloaditem_plugintag'); litepublisher::$options->savemodified(); }
function tthemegeneratorUninstall($self) { if ($self->id == 0) { if ($id = $self->getowner()->class2id(get_class($self))) { $self->loaddata($id); } } $views = tviews::instance(); $views->delete($self->idview); $views->delete($self->leftview); $views->delete($self->rightview); $merger = tlocalmerger::i(); unset($merger->items['themegenerator']); $merger->save(); $js = tjsmerger::i(); unset($js->items['themegenerator']); $js->save(); $template = ttemplate::i(); unset($template->data['jsmerger_themegenerator']); $template->save(); tcron::i()->unbind($self); $menus = tmenus::i(); $menus->deletetree($self->id); tfiler::delete(litepublisher::$paths->files . 'themegen', true, true); }
public function load() { $filename = tlocal::getcachedir() . 'adminhtml'; if (tfilestorage::loadvar($filename, $v) && is_array($v)) { $this->ini = $v + $this->ini; } else { $merger = tlocalmerger::i(); $merger->parsehtml(); } }
function tticketsUninstall($self) { //die("Warning! You can lost all tickets!"); litepublisher::$classes->lock(); //if (litepublisher::$debug) litepublisher::$classes->delete('tpostclasses'); tposts::unsub($self); litepublisher::$classes->delete('tticket'); litepublisher::$classes->delete('tticketeditor'); litepublisher::$classes->delete('tadmintickets'); litepublisher::$classes->delete('tadminticketoptions'); $adminmenus = tadminmenus::i(); $adminmenus->lock(); $adminmenus->deletetree($adminmenus->url2id('/admin/tickets/')); $adminmenus->unbind($self); $adminmenus->unlock(); /* $menus = tmenus::i(); $menus->lock(); foreach (array('bug', 'feature', 'support', 'task') as $type) { $menus->deleteurl("/$type/"); } $menus->deleteurl('/tickets/'); $menus->unlock(); litepublisher::$classes->delete('tticketsmenu'); */ litepublisher::$classes->unlock(); $manager = tdbmanager::i(); $manager->deletetable($self->childtable); $manager->delete_enum('posts', 'class', 'tticket'); $optimizer = tdboptimizer::i(); $optimizer->lock(); $optimizer->unbind($self); if (false !== ($i = array_search('tickets', $optimizer->childtables))) { unset($optimizer->childtables[$i]); } $optimizer->unlock(); tlocalmerger::i()->deleteplugin(tplugins::getname(__FILE__)); }