"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/action/forums.php" between
wacko.6.1.18.zip and wacko.6.1.19.zip

About: WackoWiki is a multilingual Wiki-engine that supports WYTIWYG-editing, page rights (ACLs), design themes (skins), file upload, email notification and much more.

forums.php  (wacko.6.1.18):forums.php  (wacko.6.1.19)
<?php <?php
if (!defined('IN_WACKO')) if (!defined('IN_WACKO'))
{ {
exit; exit;
} }
// shows subforums list // shows sub forums list
// {{forums [pages="subtag1, subtag2, ..."]}} // {{forums [pages="subtag1, subtag2, ..."]}}
// pages = to create multilevel forums this optional parameter pas ses // pages = to create multilevel forums this optional parameter pas ses
// a comma-delimeted list of tag names of pages th // a comma-delimited list of tag names of pages th
at must be at must be
// considered subforums, and not topics. tags must // considered sub forums, and not topics. tags mus
be absolute (not relative) t be absolute (not relative)
// if you define pages, it must be done for all subforums and topic // if you define pages, it must be done for all sub forums and topic
pages pages
// define variables // define variables
$pages ??= ''; $pages ??= '';
$noxml ??= 0; $noxml ??= 0;
$comment = null; $comment = null;
$prefix = $this->prefix; $prefix = $this->prefix;
// ensure that we're executing inside the forum cluster // ensure that we're executing inside the forum cluster
if (mb_substr($this->tag, 0, mb_strlen($this->db->forum_cluster)) == $this->db-> forum_cluster) if (mb_substr($this->tag, 0, mb_strlen($this->db->forum_cluster)) == $this->db-> forum_cluster)
{ {
$this->forum = false; $this->forum = false;
// load user data // load user data
$user = $this->get_user(); $user = $this->get_user();
// process 'mark read' - reset session time // process 'mark read'
$this->mark_read($user); $this->mark_read($user);
// parse subforums list if any // parse sub forums list if any
if (!empty($pages)) if (!empty($pages))
{ {
$_subforum = explode(',', $pages); $_subforum = explode(',', $pages);
$subforum = array_map('trim', $_subforum); $subforum = array_map('trim', $_subforum);
} }
// make query // make query
$sql = "SELECT p.page_id, p.owner_id, p.user_id, p.tag, p.title, p.descr iption, p.page_lang " . $sql = "SELECT p.page_id, p.owner_id, p.user_id, p.tag, p.title, p.descr iption, p.page_lang " .
"FROM " . $prefix . "page AS p, " . "FROM " . $prefix . "page AS p, " .
$prefix . "acl AS a " . $prefix . "acl AS a " .
skipping to change at line 71 skipping to change at line 71
} }
$q_pages .= $this->db->q($page); $q_pages .= $this->db->q($page);
} }
$sql .= "AND p.tag IN (" . $q_pages . ") "; $sql .= "AND p.tag IN (" . $q_pages . ") ";
} }
$sql .= "ORDER BY p.created ASC"; $sql .= "ORDER BY p.created ASC";
// load subforums data // load sub forums data
$forums = $this->db->load_all($sql, true); $forums = $this->db->load_all($sql, true);
$page_ids = []; $page_ids = [];
foreach ($forums as $forum) foreach ($forums as $forum)
{ {
$page_ids[] = $forum['page_id']; $page_ids[] = $forum['page_id'];
$this->page_id_cache[$forum['tag']] = $forum['page_id']; $this->page_id_cache[$forum['tag']] = $forum['page_id'];
$this->cache_page($forum, true); $this->cache_page($forum, true);
skipping to change at line 217 skipping to change at line 217
if (!(int) $noxml) if (!(int) $noxml)
{ {
$tpl->xml_href = $this->get_xml_file('comments'); $tpl->xml_href = $this->get_xml_file('comments');
} }
$tpl->leave(); // forum_ $tpl->leave(); // forum_
} }
else else
{ {
// action placed ouside forum cluster, show hint // action placed outside forum cluster, show hint
$message = (!$this->db->forum_cluster $message = (!$this->db->forum_cluster
? $this->_t('ForumNoClusterDefined') ? $this->_t('ForumNoClusterDefined')
: Ut::perc_replace($this->_t('ForumOutsideCluster'), '<code>forum s</code>') : Ut::perc_replace($this->_t('ForumOutsideCluster'), '<code>forum s</code>')
); );
$tpl->message = $this->show_message($message,'note', false); $tpl->message = $this->show_message($message,'note', false);
} }
 End of changes. 6 change blocks. 
11 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)