Hailstorm Posted May 31, 2003 Posted May 31, 2003 Greetings noble members of the osc-forum. I've installed the latest version of additional images and I'm very satified with it. But while testing all functions I had a problem. When I want to delete a picture form the admin panel, I recieve this message: Fatal error: Call to undefined function: si() in /homepages/18/d13508335/htdocs/catalog/admin/categories.php on line 319 So I had a look at this section but found no obvious error? So here is the "delete image" section of the categories.php: case 'del_images': $additional_images_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); if ( ($HTTP_POST_VARS['products_id']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) { $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $additional_images_id = $HTTP_POST_VARS['additional_images_id']; for ($i=0; $i<si($additional_images_id); $i++) { tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'"); } } //tep_db_query("de from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $HTTP_POST_VARS['additional_images_id'] . "'"); tep_redirect(tep_hlink(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); break; At line 319 you'll find this: for ($i=0; $i<si($additional_images_id); $i++) { tep_db_query("te from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'"); } } So if someone has an idea how to fix my problem? Quote Mike May the force be with you.
rixride Posted June 2, 2003 Posted June 2, 2003 From an Earlier Post: The code is missing characters all over the place. Here is the correct code. case 'del_images': $additional_images_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); if ( ($HTTP_POST_VARS['products_id']) && (is_array($HTTP_POST_VARS['additional_images_id'])) ) { $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $additional_images_id = $HTTP_POST_VARS['additional_images_id']; for ($i=0; $i<sizeof($additional_images_id); $i++) { tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . tep_db_input($additional_images_id[$i]) . "'"); } } //tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where additional_images_id = '" . $HTTP_POST_VARS['additional_images_id'] . "'"); tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); break; I changed this in Categories.php and it worked for me Good Luck Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.