mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2025-12-24 01:57:51 -05:00
Set folder upload folder permissions to 755 (#1014)
Don't load item avatar if item_pic is empty
This commit is contained in:
@@ -14,7 +14,7 @@ RUN echo -e “$(hostname -i)\t$(hostname) $(hostname).localhost” >> /etc/host
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN ln -s /app/*[^public] /var/www && rm -rf /var/www/html && ln -nsf /app/public /var/www/html
|
||||
RUN chmod 775 /app/public/uploads && chown -R www-data:www-data /app/public/uploads
|
||||
RUN chmod 755 /app/public/uploads && chown -R www-data:www-data /app/public/uploads
|
||||
|
||||
RUN cp application/config/database.php.tmpl application/config/database.php && \
|
||||
sed -i -e "s/\(localhost\)/web/g" test/ospos.js && \
|
||||
|
||||
@@ -190,8 +190,11 @@ class Items extends Secure_Controller
|
||||
$data['selected_supplier'] = $item_info->supplier_id;
|
||||
|
||||
$data['logo_exists'] = $item_info->pic_id != '';
|
||||
$images = glob('./uploads/item_pics/' . $item_info->pic_id . '.*');
|
||||
$data['image_path'] = sizeof($images) > 0 ? base_url($images[0]) : '';
|
||||
if (!empty($item_info->pic_id))
|
||||
{
|
||||
$images = glob('./uploads/item_pics/' . $item_info->pic_id . '.*');
|
||||
$data['image_path'] = sizeof($images) > 0 ? base_url($images[0]) : '';
|
||||
}
|
||||
|
||||
$stock_locations = $this->Stock_location->get_undeleted_all()->result_array();
|
||||
foreach($stock_locations as $location)
|
||||
|
||||
Reference in New Issue
Block a user