From 66d2cd6ec2e61dac3ccd0003294370d8035dc900 Mon Sep 17 00:00:00 2001 From: patdenice Date: Sat, 27 Mar 2010 17:32:45 +0000 Subject: 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 --- admin/languages_new.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'admin/languages_new.php') 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); + } } // +-----------------------------------------------------------------------+ -- cgit v1.2.3