Supletech Posted December 20, 2005 Posted December 20, 2005 I just installed the articles content module v0222, and I got everything working fine until I wanted to move an article from a subcategory to a main category ... This is the message I got : Fatal error: Call to undefined function: tep_array_reverse() in /home/dilmer/public_html/tienda/admin/includes/functions/articles_general.php on line 155 Could you guys take a look at this code please! function tep_generate_articlecategory_path($id, $from = 'category', $articlecat_array = '', $index = 0) { global $languages_id; if (!is_array($articlecat_array)) $articlecat_array = array(); if ($from == 'article') { $articlecat_query = tep_db_query("select articlecat_id from " . TABLE_ARTICLES_TO_ARTICLECAT . " where articles_id = '" . $id . "'"); while ($articlecat = tep_db_fetch_array($articlecat_query)) { if ($articlecat['articlecat_id'] == '0') { $articlecat_array[$index][] = array('id' => '0', 'text' => TEXT_TOP); } else { $category_query = tep_db_query("select cd.articlecat_name, c.parent_id from " . TABLE_ARTICLECAT . " c, " . TABLE_ARTICLECAT_DESCRIPTION . " cd where c.articlecat_id = '" . $articlecat['articlecat_id'] . "' and c.articlecat_id = cd.articlecat_id and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); $articlecat_array[$index][] = array('id' => $articlecat['articlecat_id'], 'text' => $category['articlecat_name']); if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) $articlecat_array = tep_generate_articlecategory_path($category['parent_id'], 'category', $articlecat_array, $index); $articlecat_array[$index] = tep_array_reverse($articlecat_array[$index]); } $index++; } } elseif ($from == 'category') { $category_query = tep_db_query("select cd.articlecat_name, c.parent_id from " . TABLE_ARTICLECAT . " c, " . TABLE_ARTICLECAT_DESCRIPTION . " cd where c.articlecat_id = '" . $id . "' and c.articlecat_id = cd.articlecat_id and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); $articlecat_array[$index][] = array('id' => $id, 'text' => $category['articlecat_name']); if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) $articlecat_array = tep_generate_articlecategory_path($category['parent_id'], 'category', $articlecat_array, $index); } return $articlecat_array; }
Guest Posted December 20, 2005 Posted December 20, 2005 Check the install instructions again if you're missing that function.
Supletech Posted December 21, 2005 Author Posted December 21, 2005 Check the install instructions again if you're missing that function. I did it couple times and I followed all the instructions!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.