[CS-Project-svn_notify] SF.net SVN: cs-project: [702] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-12-18 22:04:21
|
Revision: 702 http://cs-project.svn.sourceforge.net/cs-project/?rev=702&view=rev Author: crazedsanity Date: 2007-12-18 14:04:15 -0800 (Tue, 18 Dec 2007) Log Message: ----------- Fix order of tags when viewing issue (#123). /includes/content/helpdesk.inc: * set second arg for helpdeskClass::get_category_list() to TRUE. /lib/helpdeskClass.php: * get_category_list(): -- ARG CHANGE: NEW ARG: #2 ($orderByMod=FALSE) -- ability to pass arg #2 to tagClass::get_tag_list(). /lib/tagClass.php: * get_tag_list(): -- ARG CHANGE: #2 ($orderByMod=FALSE) -- changed default for $orderByMod to false. Modified Paths: -------------- trunk/includes/content/helpdesk.inc trunk/lib/helpdeskClass.php trunk/lib/tagClass.php Modified: trunk/includes/content/helpdesk.inc =================================================================== --- trunk/includes/content/helpdesk.inc 2007-12-18 21:44:28 UTC (rev 701) +++ trunk/includes/content/helpdesk.inc 2007-12-18 22:04:15 UTC (rev 702) @@ -221,7 +221,7 @@ $page->set_all_block_rows("content"); //show the "category" selection. - $categoryList = $proj->helpdeskObj->get_category_list('bug'); + $categoryList = $proj->helpdeskObj->get_category_list('bug', TRUE); $page->add_template_var("select_tags", $categoryList); // Modified: trunk/lib/helpdeskClass.php =================================================================== --- trunk/lib/helpdeskClass.php 2007-12-18 21:44:28 UTC (rev 701) +++ trunk/lib/helpdeskClass.php 2007-12-18 22:04:15 UTC (rev 702) @@ -410,10 +410,10 @@ /** * This returns a list of available TAGS (the "helpdesk_cat" table is deprecated) */ - function get_category_list($selectThis=NULL) { + function get_category_list($selectThis=NULL, $orderByMod=FALSE) { //create a list of tags. $object = new tagClass($this->db); - $mainTagList = $object->get_tag_list(TRUE); + $mainTagList = $object->get_tag_list(TRUE, $orderByMod); //create the "replacement array" and such. $tagList = array(); Modified: trunk/lib/tagClass.php =================================================================== --- trunk/lib/tagClass.php 2007-12-18 21:44:28 UTC (rev 701) +++ trunk/lib/tagClass.php 2007-12-18 22:04:15 UTC (rev 702) @@ -53,7 +53,7 @@ * @return (array) PASS: contains tag_name_id=>name array. * @return (exception) database error or no rows. */ - public function get_tag_list($getAllData=FALSE, $orderByMod=TRUE) { + public function get_tag_list($getAllData=FALSE, $orderByMod=FALSE) { $orderBy = "ORDER BY lower(name)"; if($orderByMod) { $orderBy = "ORDER BY modifier, lower(name)"; @@ -148,7 +148,8 @@ $sqlArr = array ( 'record_id' => cleanString($recordId, 'numeric') ); - $sql = "SELECT tag_name_id, name FROM tag_name_table INNER JOIN tag_table USING (tag_name_id) WHERE ". string_from_array($sqlArr, 'select'); + $sql = "SELECT tag_name_id, name FROM tag_name_table INNER JOIN tag_table USING (tag_name_id) " . + "WHERE ". string_from_array($sqlArr, 'select') .' ORDER BY lower(name)'; $numrows = $this->db->exec($sql); $dberror = $this->db->errorMsg(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |