This commit is contained in:
FrancescoUK committed 2017-01-31 23:03:53 +00:00
1 parent 87247333cc
commit be66258bfc
2 files changed
+7 -4

No files matched your search

+6 -3
View File
@@ -71,9 +71,12 @@ class Items extends Secure_Controller
if($ext == '')
{
$images = glob('./uploads/item_pics/' . $item->pic_filename . '.*');
$new_pic_filename = pathinfo($images[0], PATHINFO_BASENAME);
$item_data = array('pic_filename' => $new_pic_filename);
$this->Item->save($item_data, $item->item_id);
if(sizeof($images) > 0)
{
$new_pic_filename = pathinfo($images[0], PATHINFO_BASENAME);
$item_data = array('pic_filename' => $new_pic_filename);
$this->Item->save($item_data, $item->item_id);
}
}
}
+1 -1
View File
@@ -269,9 +269,9 @@ function get_item_data_row($item, $controller)
$tax_percents = substr($tax_percents, 0, -2);
$controller_name = strtolower(get_class($CI));
$image = NULL;
if ($item->pic_filename != '')
{
$image = '';
$ext = pathinfo($item->pic_filename, PATHINFO_EXTENSION);
if($ext == '')
{