Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl admin-dev/themes/default/template/controllers/modules/list.tpl admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl admin-dev/themes/default/template/controllers/products/informations.tpl admin-dev/themes/default/template/controllers/products/prices.tpl admin-dev/themes/default/template/controllers/products/suppliers.tpl admin-dev/themes/default/template/helpers/form/form.tpl admin-dev/themes/default/template/toolbar.tpl classes/helper/HelperList.php controllers/admin/AdminGroupsController.php controllers/admin/AdminManufacturersController.php
This commit is contained in:
+10
-20
@@ -1261,6 +1261,13 @@ class ToolsCore
|
||||
return Tools::strtoupper(Tools::substr($str, 0, 1)).Tools::substr($str, 1);
|
||||
}
|
||||
|
||||
public static function ucwords($str)
|
||||
{
|
||||
if (function_exists('mb_convert_case'))
|
||||
return mb_convert_case($str, MB_CASE_TITLE);
|
||||
return ucwords(strtolower($str));
|
||||
}
|
||||
|
||||
public static function orderbyPrice(&$array, $order_way)
|
||||
{
|
||||
foreach ($array as &$row)
|
||||
@@ -1402,26 +1409,9 @@ class ToolsCore
|
||||
|
||||
public static function copy($source, $destination, $stream_context = null)
|
||||
{
|
||||
if ($stream_context == null && preg_match('/^https?:\/\//', $source))
|
||||
$stream_context = @stream_context_create(array('http' => array('timeout' => 10)));
|
||||
|
||||
if (in_array(@ini_get('allow_url_fopen'), array('On', 'on', '1')) || !preg_match('/^https?:\/\//', $source))
|
||||
return @copy($source, $destination, $stream_context);
|
||||
elseif (function_exists('curl_init'))
|
||||
{
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_URL, $source);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
$opts = stream_context_get_options($stream_context);
|
||||
$content = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return file_put_contents($destination, $content);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
if (is_null($stream_context) && !preg_match('/^https?:\/\//', $source))
|
||||
return @copy($source, $destination);
|
||||
return @file_put_contents($destination, Tools::file_get_contents($source, false, $stream_context));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user