diff options
author | patdenice <patdenice@piwigo.org> | 2010-03-27 17:32:45 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2010-03-27 17:32:45 +0000 |
commit | 66d2cd6ec2e61dac3ccd0003294370d8035dc900 (patch) | |
tree | efd87d6a7975143fe25563e2a7f15d25c9dc5031 /admin/languages_new.php | |
parent | 0b38088a7e860bbfe64c5b2726859607eb086d2d (diff) |
Add token to themes installation.
Only webmasters can install new plugins, themes or languages.
git-svn-id: http://piwigo.org/svn/trunk@5406 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/languages_new.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/admin/languages_new.php b/admin/languages_new.php index a4e68fac5..f80ee33ee 100644 --- a/admin/languages_new.php +++ b/admin/languages_new.php @@ -58,11 +58,18 @@ if (!is_writable($languages_dir)) if (isset($_GET['revision']) and !is_adviser()) { - check_pwg_token(); + if (!is_webmaster()) + { + array_push($page['errors'], l10n('Webmaster status is required.')); + } + else + { + check_pwg_token(); - $install_status = $languages->extract_language_files('install', $_GET['revision']); - - redirect($base_url.'&installstatus='.$install_status); + $install_status = $languages->extract_language_files('install', $_GET['revision']); + + redirect($base_url.'&installstatus='.$install_status); + } } // +-----------------------------------------------------------------------+ |