Merge pull request #450 from DakuTree/patch-zipcheck

Hide "Download All Images" if ZipArchive doesn't exist/not enabled - Fixes #441
This commit is contained in:
Shish 2014-10-15 18:33:30 +01:00
commit 565b466721
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@
* <br>Download the contents of the database in plain text format, useful
* for backups.
* <p>Image dump:
* <br>Download all the images as a .zip file
* <br>Download all the images as a .zip file (Requires ZipArchive)
*/
/**

View file

@ -45,7 +45,8 @@ class AdminPageTheme extends Themelet {
$html = "";
$html .= $this->button("All tags to lowercase", "lowercase_all_tags", true);
$html .= $this->button("Recount tag use", "recount_tag_use", false);
$html .= $this->button("Download all images", "download_all_images", false);
if(class_exists('ZipArchive'))
$html .= $this->button("Download all images", "download_all_images", false);
$html .= $this->button("Download database contents", "database_dump", false);
if($database->get_driver_name() == "mysql")
$html .= $this->button("Reset image IDs", "reset_image_ids", true);