[CS-Project-svn_notify] SF.net SVN: cs-project: [661] trunk/lib
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-21 18:59:57
|
Revision: 661 http://cs-project.svn.sourceforge.net/cs-project/?rev=661&view=rev Author: crazedsanity Date: 2007-11-21 10:59:54 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Fix problem with displaying tags on existing issues. FIXES ISSUE::: #118: Helpdesk tag list shows "Array" /lib/helpdeskClass.php: * get_category_list(): -- pass TRUE to the call to tagClass::get_tag_list(). /lib/tagClass.php: * get_tag_list(): -- ARG CHANGE: NEW ARG: #1 ($getAllData=FALSE) -- option to retrieve all data vs. the traditional tag_name_id + name. Modified Paths: -------------- trunk/lib/helpdeskClass.php trunk/lib/tagClass.php Modified: trunk/lib/helpdeskClass.php =================================================================== --- trunk/lib/helpdeskClass.php 2007-11-21 18:08:22 UTC (rev 660) +++ trunk/lib/helpdeskClass.php 2007-11-21 18:59:54 UTC (rev 661) @@ -413,7 +413,7 @@ function get_category_list($selectThis=NULL) { //create a list of tags. $object = new tagClass($this->db); - $mainTagList = $object->get_tag_list(); + $mainTagList = $object->get_tag_list(TRUE); //create the "replacement array" and such. $tagList = array(); Modified: trunk/lib/tagClass.php =================================================================== --- trunk/lib/tagClass.php 2007-11-21 18:08:22 UTC (rev 660) +++ trunk/lib/tagClass.php 2007-11-21 18:59:54 UTC (rev 661) @@ -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() { + public function get_tag_list($getAllData=FALSE) { $sql = "SELECT * FROM tag_name_table ORDER BY modifier, lower(name)"; $numrows = $this->db->exec($sql); $dberror = $this->db->errorMsg(); @@ -67,7 +67,12 @@ } else { //good to go! - $data = $this->db->farray_fieldnames("tag_name_id", NULL, 0); + if($getAllData) { + $data = $this->db->farray_fieldnames("tag_name_id", NULL, 0); + } + else { + $data = $this->db->farray_nvp('tag_name_id', 'name'); + } return($data); } }//end get_tag_list() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |