예제 #1
0
function update591()
{
    $rss = trssholdcomments::i();
    if (!$rss->template) {
        $ini = parse_ini_file(litepublisher::$paths->lib . 'languages/install.ini', true);
        $rss->template = $ini['installation']['rsstemplate'];
        $rss->save();
    }
}
 public function processform()
 {
     extract($_POST, EXTR_SKIP);
     $options = litepublisher::$options;
     $cm = tcommentmanager::i();
     $cm->lock();
     $options->comstatus = $comstatus;
     $cm->filterstatus = isset($filterstatus);
     $cm->defstatus = isset($commentsapproved) ? 'approved' : 'hold';
     $cm->checkduplicate = isset($checkduplicate);
     $useroptions = tuseroptions::i();
     $useroptions->defvalues['subscribe'] = isset($defaultsubscribe) ? 'enabled' : 'disabled';
     $useroptions->defvalues['authorpost_subscribe'] = isset($authorpost_subscribe) ? 'enabled' : 'disabled';
     $useroptions->save();
     $options->commentsdisabled = isset($commentsdisabled);
     $options->pingenabled = isset($pingenabled);
     $options->commentpages = isset($commentpages);
     $options->commentsperpage = (int) trim($commentsperpage);
     $options->comments_invert_order = isset($comments_invert_order);
     $cm->sendnotification = isset($sendnotification);
     $cm->hidelink = isset($hidelink);
     $cm->redir = isset($redir);
     $cm->nofollow = isset($nofollow);
     $cm->comuser_subscribe = isset($comuser_subscribe);
     $cm->unlock();
     $tc = ttemplatecomments::i();
     foreach (array('logged', 'reqlogin', 'regaccount', 'guest', 'comuser', 'loadhold') as $name) {
         $tc->{$name} = $_POST[$name];
     }
     $tc->save();
     $subscr = tsubscribers::i();
     $subscr->lock();
     $subscr->locklist = $locklist;
     $subscr->enabled = isset($subscribe_enabled);
     $subscr->unlock();
     $rss = trssholdcomments::i();
     $rss->count = $rsscount;
     $rss->template = $rsstemplate;
     $rss->save();
 }