[TEP-COMMIT] CVS: admin/admin/includes/functions general.php,1.158,1.159

Harald Ponce de Leon <[email protected]>
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /cvsroot/tep/admin/admin/includes/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv26424/includes/functions

Modified Files:
	general.php 
Log Message:
introduce a new function to return the generated category path IDs


Index: general.php
===================================================================
RCS file: /cvsroot/tep/admin/admin/includes/functions/general.php,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- general.php	20 Jun 2003 15:32:13 -0000	1.158
+++ general.php	11 Jul 2003 14:39:28 -0000	1.159
@@ -836,6 +836,22 @@
     return $calculated_category_path_string;
   }
 
+  function tep_get_generated_category_path_ids($id, $from = 'category') {
+    $calculated_category_path_string = '';
+    $calculated_category_path = tep_generate_category_path($id, $from);
+    for ($i=0, $n=sizeof($calculated_category_path); $i<$n; $i++) {
+      for ($j=0, $k=sizeof($calculated_category_path[$i]); $j<$k; $j++) {
+        $calculated_category_path_string .= $calculated_category_path[$i][$j]['id'] . '_';
+      }
+      $calculated_category_path_string = substr($calculated_category_path_string, 0, -1) . '<br>';
+    }
+    $calculated_category_path_string = substr($calculated_category_path_string, 0, -4);
+
+    if (strlen($calculated_category_path_string) < 1) $calculated_category_path_string = TEXT_TOP;
+
+    return $calculated_category_path_string;
+  }
+
   function tep_remove_category($category_id) {
     $category_image_query = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$category_id . "'");
     $category_image = tep_db_fetch_array($category_image_query);



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.