aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upload.inc.php4
-rw-r--r--admin/photos_add_direct.php10
-rw-r--r--admin/themes/default/default-layout.css10
-rw-r--r--admin/themes/default/icon/warnings.pngbin0 -> 2241 bytes
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl11
5 files changed, 33 insertions, 2 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index a52142d0c..d1aed33ca 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -141,6 +141,10 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
}
// update metadata from the uploaded file (exif/iptc)
+ if ($conf['use_exif'] and !function_exists('read_exif_data'))
+ {
+ $conf['use_exif'] = false;
+ }
update_metadata(array($image_id=>$file_path));
invalidate_user_cache();
diff --git a/admin/photos_add_direct.php b/admin/photos_add_direct.php
index 7d094755d..6a7aea884 100644
--- a/admin/photos_add_direct.php
+++ b/admin/photos_add_direct.php
@@ -443,6 +443,7 @@ $template->assign(
// +-----------------------------------------------------------------------+
$setup_errors = array();
+$setup_warnings = array();
$error_message = ready_for_upload_message();
if (!empty($error_message))
@@ -455,9 +456,18 @@ if (!function_exists('gd_info'))
array_push($setup_errors, l10n('GD library is missing'));
}
+if ($conf['use_exif'] and !function_exists('read_exif_data'))
+{
+ array_push(
+ $setup_warnings,
+ l10n('Exif extension not available, admin should disable exif use')
+ );
+}
+
$template->assign(
array(
'setup_errors'=> $setup_errors,
+ 'setup_warnings' => $setup_warnings,
)
);
diff --git a/admin/themes/default/default-layout.css b/admin/themes/default/default-layout.css
index 5458de7ae..344818541 100644
--- a/admin/themes/default/default-layout.css
+++ b/admin/themes/default/default-layout.css
@@ -822,7 +822,7 @@ h2:lang(en) { text-transform:capitalize; }
/**
* Informations box in administration
*/
-.infos, .errors {
+.infos, .errors, .warnings {
text-align: left;
margin: 5px;
padding: 10px 50px 10px 10px;
@@ -845,7 +845,13 @@ h2:lang(en) { text-transform:capitalize; }
background-image: url(icon/errors.png);
}
-.infos li, .errors li { list-style-type:square; }
+.warnings {
+ color: #ee8800;
+ background-color:#ffdd99;
+ background-image: url(icon/warnings.png);
+}
+
+.infos li, .errors li, .warnings li { list-style-type:square; }
.infos .submit {margin-left:30px;}
.checkActions {text-align:left;padding:0;margin:0;}
diff --git a/admin/themes/default/icon/warnings.png b/admin/themes/default/icon/warnings.png
new file mode 100644
index 000000000..03454e334
--- /dev/null
+++ b/admin/themes/default/icon/warnings.png
Binary files differ
diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl
index b7684f430..ff1ada8e2 100644
--- a/admin/themes/default/template/photos_add_direct.tpl
+++ b/admin/themes/default/template/photos_add_direct.tpl
@@ -216,6 +216,17 @@ var buttonText = 'Browse';
</div>
{else}
+ {if count($setup_warnings) > 0}
+<div class="warnings">
+ <ul>
+ {foreach from=$setup_warnings item=warning}
+ <li>{$warning}</li>
+ {/foreach}
+ </ul>
+</div>
+ {/if}
+
+
{if !empty($thumbnails)}
<fieldset>
<legend>{'Uploaded Photos'|@translate}</legend>