$feed['idtype'] = 'tid'; if ($feed['icon']) { postfeed($feed); } } if ($displayorder != -4) { if ($digest) { updatepostcredits('+', $_G['uid'], 'digest', $_G['fid']); } updatepostcredits('+', $_G['uid'], 'post', $_G['fid']); if ($isgroup) { DB::query("UPDATE " . DB::table('forum_groupuser') . " SET threads=threads+1, lastupdate='" . TIMESTAMP . "' WHERE uid='{$_G['uid']}' AND fid='{$_G['fid']}'"); } $subject = str_replace("\t", ' ', $subject); /*vot*/ $lastpost = "{$tid}\t" . DB::escape_str($subject) . "\t{$_G['timestamp']}\t{$author}"; DB::query("UPDATE " . DB::table('forum_forum') . " SET lastpost='{$lastpost}', threads=threads+1, posts=posts+1, todayposts=todayposts+1 WHERE fid='{$_G['fid']}'", 'UNBUFFERED'); if ($_G['forum']['type'] == 'sub') { /*vot*/ DB::query("UPDATE " . DB::table('forum_forum') . "\r\n SET lastpost='{$lastpost}'\r\n WHERE fid='" . $_G['forum'][fup] . "'", 'UNBUFFERED'); } } if ($_G['forum']['status'] == 3) { require_once libfile('function/group'); updateactivity($_G['fid'], 0); require_once libfile('function/grouplog'); updategroupcreditlog($_G['fid'], $_G['uid']); } showmessage('post_newthread_succeed', "forum.php?mod=viewthread&tid={$tid}&extra={$extra}", $param); } }
// We do the same thing with the member profile area. if (!file_exists(PATH_MOD . 'member/mod.member' . EXT)) { exit; } else { require PATH_MOD . 'member/mod.member' . EXT; $MBR = new Member(); $MBR->_set_properties(array('trigger' => $PREFS->ini('profile_trigger'))); $OUT->build_queue($MBR->manager()); } } else { if (empty($template_group) && empty($template)) { $pages = $PREFS->ini("site_pages"); $pages = $pages[$PREFS->ini('site_id')]; $match_uri = $IN->URI == '' ? '/' : '/' . trim($IN->URI, '/') . '/'; if ($pages !== FALSE && isset($pages['uris']) && ($entry_id = array_search($match_uri, $pages['uris'])) !== FALSE) { $query = $DB->query("SELECT t.template_name, tg.group_name\n\t\t\t\t\t\t\t\t\t\t\t FROM exp_templates t, exp_template_groups tg \n\t\t\t\t\t\t\t\t\t\t\t WHERE t.group_id = tg.group_id \n\t\t\t\t\t\t\t\t\t\t\t AND t.template_id = '" . $DB->escape_str($pages['templates'][$entry_id]) . "'"); if ($query->num_rows > 0) { /* We do it this way so that we are not messing with any of the segment variables, which should reflect the actual URL and not our Pages redirect. We also set a new QSTR variable so that we are not interfering with other module's besides the Weblog module (which will use the new Pages_QSTR when available). */ $template_group = $query->row['group_name']; $template = $query->row['template_name']; $IN->Pages_QSTR = $entry_id; } } } require PATH_CORE . 'core.template' . EXT; $TMPL = new Template();