X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=inc%2Ftemplates_upgrade.php;h=9c3a24ab3411dfc13cb0150f337aeb62fd1e1222;hp=410790ad180f67e66b36771d7786958eb0e10a41;hb=b6cae6a5698c5d0655d921f78f0ccab470bf034c;hpb=9acc365249b5e630da6b5cdd23e3a8015f39ddc7 diff --git a/inc/templates_upgrade.php b/inc/templates_upgrade.php index 410790a..9c3a24a 100644 --- a/inc/templates_upgrade.php +++ b/inc/templates_upgrade.php @@ -1,10 +1,13 @@ - + @@ -20,19 +23,15 @@ $thumbfilename = getthumbsdir () . "/mini_" . $feature->imgpath; if ((file_exists ($imgfilename)) && (!(file_exists ($thumbfilename)))) { - try { - create_thumbnail ($imgfilename, $thumbfilename); - } catch (Exception $e) { - return false; - } + create_thumbnail_or_copy ($imgfilename, $thumbfilename); } } } return true; } - require_once ("./inc/settings.php"); require_once ("./inc/db/mysql.php"); + require_once ("./inc/install_utils.php"); require_once ("./inc/utils.php"); $error = false; @@ -48,14 +47,14 @@ } if ($error) { die(sprintf('

%s

', trans('SYP is not correctly installed. Please follow README.txt instructions - and go to wizard.'))); + and go to wizard.'))); } safe_create_writable_dir (getthumbsdir ()); if (create_all_thumbs ($connection)) { par_success (trans('Thumbnails successfully created.')); } else { - par_error (trans('Error when creating thumbnails.')); + par_error_and_leave (trans('Error when creating thumbnails.')); } par_success (trans ('SYP upgrade went smoothly. You can now go to admin area'));