mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-18 14:48:42 -05:00
Fix bugs (#1026)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 == '')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user