Commit f54fad76 authored by pkdille's avatar pkdille

[FIX] fix some unused method parameters (seen in quelity.tikiwiki.org)

parent 8c914c42
......@@ -305,23 +305,42 @@ class AdminLib extends TikiLib
return $ret;
}
// This function can be used to store the set of actual pages in the "tags"
// table preserving the state of the wiki under a tag name.
function create_tag($tagname, $comment = '') {
/**
* This function can be used to store the set of actual pages in the "tags"
* table preserving the state of the wiki under a tag name.
*
* @param string $tagname
* @access public
* @return boolean : true
*/
function create_tag($tagname)
{
global $prefs;
$query = "select * from `tiki_pages`";
$result = $this->query($query,array());
while ($res = $result->fetchRow()) {
$data = $res["data"];
$pageName = $res["pageName"];
$description = $res["description"];
$query = "delete from `tiki_tags`where `tagName`=? and `pageName`=?";
$this->query($query,array($tagname,$pageName),-1,-1,false);
$query = "insert into `tiki_tags`(`tagName`,`pageName`,`hits`,`data`,`lastModif`,`comment`,`version`,`user`,`ip`,`flag`,`description`)
values(?,?,?,?,?,?,?,?,?,?,?)";
$result2 = $this->query($query,array($tagname,$pageName,$res["hits"],$data,$res["lastModif"],$res["comment"],$res["version"],$res["user"],$res["ip"],$res["flag"],$description));
$data = $res['data'];
$pageName = $res['pageName'];
$description = $res['description'];
$query = 'delete from `tiki_tags`where `tagName`=? and `pageName`=?';
$this->query($query, array($tagname, $pageName), -1, -1, false);
$query = 'insert into `tiki_tags`(`tagName`, `pageName`, `hits`, `data`, `lastModif`, `comment`, `version`, `user`, `ip`, `flag`, `description`)'
. ' values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
$result2 = $this->query($query, array($tagname
, $pageName
, $res['hits']
, $data
, $res['lastModif']
, $res['comment']
, $res['version']
, $res['user']
, $res['ip']
, $res['flag']
, $description)
);
}
global $logslib; include_once('lib/logs/logslib.php');
......
......@@ -1006,7 +1006,6 @@ class ArtLib extends TikiLib
, $topic = ''
, $categId = ''
, $creator = ''
, $group = ''
, $lang = ''
, $min_rating = ''
, $max_rating = ''
......
......@@ -48,7 +48,7 @@ class bablotron extends TikiLib
return $results;
}
function quick_spellcheck_text($text, $threshold = 5) {
function quick_spellcheck_text($text) {
$words = preg_split("/\s/", $text);
$results = array();
......
......@@ -329,11 +329,11 @@ class BlogLib extends TikiLib
* @param int $maxRecords
* @param string $sort_mode
* @param string $find
* @param string $date
* @access public
* @return void
*/
function list_all_blog_posts($offset = 0, $maxRecords = -1, $sort_mode = 'created_desc', $find = '', $date = '', $ref='') {
function list_all_blog_posts($offset = 0, $maxRecords = -1, $sort_mode = 'created_desc', $find = '', $date = '')
{
if ($find) {
$findesc = '%' . $find . '%';
......@@ -549,12 +549,11 @@ class BlogLib extends TikiLib
* @param string $user
* @param string $title
* @param string $contributions
* @param string $old_data
* @param string $priv
* @access public
* @return void
*/
function update_post($postId, $blogId, $data, $user, $title = '', $contributions = '', $old_data = '', $priv='n', $created = 0) {
function update_post($postId, $blogId, $data, $user, $title = '', $contributions = '', $priv='n', $created = 0) {
global $prefs;
if(!$created) {
......
......@@ -344,7 +344,8 @@ class DirLib extends TikiLib
$mid = "";
}
$query = "select * from `tiki_directory_categories` where `allowSites`=? $mid ";
$query = "select * from `tiki_directory_categories` where `allowSites`=? $mid order by " . $this->convertSortMode($sort_mode);
$query_cant = "select count(*) from `tiki_directory_categories` where `allowSites`=? $mid";
$result = $this->query($query,$bindvars,$maxRecords,$offset);
$cant = $this->getOne($query_cant,$bindvars);
......@@ -496,7 +497,8 @@ class DirLib extends TikiLib
$this->query($query,array((int)$parent,(int)$related));
}
function dir_list_related_categories($parent, $offset, $maxRecords, $soet_mode, $find) {
function dir_list_related_categories($parent, $offset, $maxRecords)
{
$query = "select * from `tiki_related_categories` where `categId`=?";
$query_cant = "select count(*) from `tiki_related_categories` where `categId`=?";
$result = $this->query($query,array((int)$parent),$maxRecords,$offset);
......@@ -512,6 +514,7 @@ class DirLib extends TikiLib
$retval["data"] = $ret;
$retval["cant"] = $cant;
return $retval;
die;
}
function dir_add_categ_rel($parent, $categ) {
......@@ -569,7 +572,7 @@ class DirLib extends TikiLib
}
$words = implode($how, $words);
$query = "select * from `tiki_directory_sites` where `isValid`=? and $words order by ".$this->convertSortMode($sort_mode);
$query = "select * from `tiki_directory_sites` where `isValid`=? and $words order by " . $this->convertSortMode($sort_mode);
$cant = $this->getOne("select count(*) from tiki_directory_sites where `isValid`=? and $words", $bindvars);
$result = $this->query($query,$bindvars,$maxRecords,$offset);
$ret = array();
......
......@@ -168,7 +168,7 @@ function wikiplugin_articles($data, $params)
include_once("lib/commentslib.php");
$commentslib = new Comments($dbTiki);
$listpages = $artlib->list_articles($start, $max, $sort, '', $dateStartTS, $dateEndTS, 'admin', $type, $topicId, 'y', $topic, $categId, '', '', $lang, '', '', ($overrideDates == 'y'));
$listpages = $artlib->list_articles($start, $max, $sort, '', $dateStartTS, $dateEndTS, 'admin', $type, $topicId, 'y', $topic, $categId, '', $lang, '', '', ($overrideDates == 'y'));
if ($prefs['feature_multilingual'] == 'y') {
global $multilinguallib;
include_once("lib/multilingual/multilinguallib.php");
......
......@@ -70,7 +70,7 @@ function module_article_archives( $mod_reference, $module_params ) {
foreach ( $urlParams as $p => $v ) $smarty->assign($p, $$p);
$ranking = $artlib->list_articles(0, -1, 'publishDate_desc', '', '', date("U"), '', $type, $topicId, 'y', $topic, $categId, '', '', $langfilter);
$ranking = $artlib->list_articles(0, -1, 'publishDate_desc', '', '', date("U"), '', $type, $topicId, 'y', $topic, $categId, '', $langfilter);
// filter the month from the data
$artc_archive = array();
......
......@@ -108,7 +108,7 @@ function module_articles( $mod_reference, $module_params ) {
$smarty->assign('min_rating', $min_rating);
$smarty->assign('max_rating', $max_rating);
$ranking = $artlib->list_articles($start, $mod_reference['rows'], $sort, '', '', '', $user, $type, $topicId, 'y', $topic, $categId, '', '', $langfilter, $min_rating, $max_rating);
$ranking = $artlib->list_articles($start, $mod_reference['rows'], $sort, '', '', '', $user, $type, $topicId, 'y', $topic, $categId, '', $langfilter, $min_rating, $max_rating);
$smarty->assign_by_ref('urlParams', $urlParams);
$smarty->assign('modArticles', $ranking["data"]);
......
......@@ -29,7 +29,7 @@ function module_top_articles( $mod_reference, $module_params ) {
if(isset($module_params['lang'])){
$lang = $module_params['lang'];
}
$ranking = $artlib->list_articles(0, $mod_reference['rows'], 'nbreads_desc', '', '', '', $user,'','','','','','','',$lang,'','','');
$ranking = $artlib->list_articles(0, $mod_reference['rows'], 'nbreads_desc', '', '', '', $user,'','','','','','', $lang,'','','');
$smarty->assign('modTopArticles', $ranking["data"]);
}
......@@ -81,7 +81,7 @@ if ($output["data"]=="EMPTY") {
$tmp = $prefs['desc_rss_'.$feed];
if ($desc<>'') $desc = $tmp;
$changes = $artlib -> list_articles(0, $prefs['max_rss_articles'], $dateId.'_desc', '', 0, $tikilib->now, $user, $type, $topic, 'y', '', '', '', '', $articleLang);
$changes = $artlib -> list_articles(0, $prefs['max_rss_articles'], $dateId.'_desc', '', 0, $tikilib->now, $user, $type, $topic, 'y', '', '', '', $articleLang);
$tmp = array();
include_once('tiki-sefurl.php');
foreach ($changes["data"] as $data) {
......
......@@ -217,7 +217,7 @@ if ((isset($_REQUEST["save"]) || isset($_REQUEST['save_exit'])) && !$contributio
if ($_REQUEST["postId"] > 0) {
$bloglib->update_post($_REQUEST["postId"], $_REQUEST["blogId"], $edit_data, $data["user"], $title, isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '', $data['data'], $blogpriv, $publishDate);
$bloglib->update_post($_REQUEST["postId"], $_REQUEST["blogId"], $edit_data, $data["user"], $title, isset($_REQUEST['contributions']) ? $_REQUEST['contributions'] : '', $blogpriv, $publishDate);
$postid = $_REQUEST["postId"];
} else {
if($blog_data['always_owner'] == 'y'){
......
......@@ -145,7 +145,7 @@ if ($offset > 0) {
$smarty->assign('prev_offset', -1);
}
$smarty->assign_by_ref('items', $items["data"]);
$categs = $dirlib->dir_get_all_categories_accept_sites(0, -1, 'name asc', $find, $_REQUEST["siteId"]);
$categs = $dirlib->dir_get_all_categories_accept_sites(0, -1, 'name_asc', $find, $_REQUEST["siteId"]);
if (isset($_REQUEST["save"]) && $msg != "" && isset($_REQUEST["siteCats"])) { // an error occured, the chosen categs have to be set again
$temp_max = count($categs);
foreach($_REQUEST["siteCats"] as $acat) {
......
......@@ -61,7 +61,7 @@ if (isset($_REQUEST["find"])) {
$smarty->assign_by_ref('offset', $offset);
$smarty->assign_by_ref('sort_mode', $sort_mode);
$smarty->assign('find', $find);
$items = $dirlib->dir_list_related_categories($_REQUEST["parent"], $offset, $maxRecords, $sort_mode, $find);
$items = $dirlib->dir_list_related_categories($_REQUEST["parent"], $offset, $maxRecords);
$smarty->assign_by_ref('cant_pages', $items["cant"]);
$smarty->assign_by_ref('items', $items["data"]);
$categs = $dirlib->dir_get_all_categories_np(0, -1, 'name_asc', $find, $_REQUEST["parent"]);
......
......@@ -123,7 +123,7 @@ if ($all) {
}
$smarty->assign_by_ref('cant_pages', $items["cant"]);
$smarty->assign_by_ref('items', $items["data"]);
$categs = $dirlib->dir_get_all_categories_accept_sites(0, -1, 'name asc', $find, $_REQUEST["siteId"]);
$categs = $dirlib->dir_get_all_categories_accept_sites(0, -1, 'name_asc', $find, $_REQUEST["siteId"]);
$smarty->assign('categs', $categs);
$countries = $tikilib->get_flags();
$smarty->assign_by_ref('countries', $countries);
......
......@@ -93,7 +93,7 @@ if ($categ_info['allowSites'] == 'y') {
}
include_once ('tiki-section_options.php');
// Related categs
$related = $dirlib->dir_list_related_categories($_REQUEST['parent'], 0, -1, 'name_asc', '');
$related = $dirlib->dir_list_related_categories($_REQUEST['parent'], 0, -1);
$smarty->assign_by_ref('related', $related['data']);
$stats = $dirlib->dir_stats();
$smarty->assign_by_ref('stats', $stats);
......
......@@ -115,7 +115,7 @@ $smarty->assign('find_topic', $_REQUEST["topic"]);
$smarty->assign('find_type', $_REQUEST["type"]);
$smarty->assign('find_lang', $_REQUEST['lang']);
// Get a list of last changes to the Wiki database
$listpages = $artlib->list_articles($offset, $maxRecords, $sort_mode, $find, $date_min, $date_max, $user, $_REQUEST["type"], $_REQUEST["topic"], $visible_only, '', $filter["categId"], '', '', $_REQUEST['lang']);
$listpages = $artlib->list_articles($offset, $maxRecords, $sort_mode, $find, $date_min, $date_max, $user, $_REQUEST["type"], $_REQUEST["topic"], $visible_only, '', $filter["categId"], '', $_REQUEST['lang']);
// If there're more records then assign next_offset
$smarty->assign_by_ref('cant', $listpages['cant']);
$smarty->assign_by_ref('listpages', $listpages["data"]);
......
......@@ -95,7 +95,7 @@ if (!isset($_REQUEST['lang'])) {
$_REQUEST['lang'] = '';
}
// Get a list of last changes to the Wiki database
$listpages = $artlib->list_articles($offset, $prefs['maxArticles'], $sort_mode, $find, $date_min, $date_max, $user, $type, $topic, 'y', $topicName, $categId, '', '', $_REQUEST['lang'], $min_rating, $max_rating);
$listpages = $artlib->list_articles($offset, $prefs['maxArticles'], $sort_mode, $find, $date_min, $date_max, $user, $type, $topic, 'y', $topicName, $categId, '', $_REQUEST['lang'], $min_rating, $max_rating);
if ($prefs['feature_multilingual'] == 'y') {
include_once ("lib/multilingual/multilinguallib.php");
$listpages['data'] = $multilinguallib->selectLangList('article', $listpages['data']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment