/** * Lite Publisher * Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/ * Dual licensed under the MIT (mit.txt) * and GPL (gpl.txt) licenses. **/ function tdownloadcounterInstall($self) { if (dbversion) { $manager = TDBManager::i(); $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR; $manager->CreateTable($self->table, file_get_contents($dir . 'downloadcounter.sql')); } $files = tfiles::i(); $files->deleted = $self->delete; $urlmap = turlmap::i(); $urlmap->add('/downloadcounter/', get_class($self), null, 'get'); }
/** * Lite Publisher * Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/ * Dual licensed under the MIT (mit.txt) * and GPL (gpl.txt) licenses. **/ function tsubscribersInstall($self) { if (dbversion) { $dbmanager = TDBManager::i(); $dbmanager->CreateTable($self->table, file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'items.posts.sql')); } $self->fromemail = 'litepublisher@' . $_SERVER['HTTP_HOST']; $self->save(); $posts = tposts::i(); $posts->added = $self->postadded; $posts->deleted = $self->deletepost; $comments = tcomments::i(); $comments->lock(); $comments->added = $self->sendmail; $comments->onapproved = $self->sendmail; $comments->unlock(); tusers::i()->deleted = $self->deleteitem; }