[LocalFiles Editor] Only webmasters can create or modify local files.

git-svn-id: http://piwigo.org/svn/trunk@5256 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice 2010-03-22 12:42:42 +00:00
commit 98c7158ec0
8 changed files with 40 additions and 26 deletions

View file

@ -294,6 +294,12 @@ if (isset($_POST['restore']) and !is_adviser())
// +-----------------------------------------------------------------------+
if (isset($_POST['submit']) and !is_adviser())
{
if ($user['status'] != 'webmaster')
{
array_push($page['errors'], l10n('locfiledit_webmaster_only'));
}
else
{
$edited_file = $_POST['edited_file'];
$content_file = stripslashes($_POST['text']);
if (get_extension($edited_file) == 'php')
@ -328,6 +334,7 @@ if (isset($_POST['submit']) and !is_adviser())
array_push($page['errors'], l10n('locfiledit_cant_save'));
}
}
}
}
// +-----------------------------------------------------------------------+

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Verbotene Zeichen im Dateinamen.';
$lang['locfiledit_file_already_exists'] = 'Datei ist bereits vorhanden.';
$lang['locfiledit_model_error'] = 'Sie müssen ein Modell wählen.';
$lang['locfiledit_empty_filename'] = 'Sie müssen einen Dateiname eingeben.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Forbidden caraters in file name.';
$lang['locfiledit_file_already_exists'] = 'File already exists.';
$lang['locfiledit_model_error'] = 'You must choose a model.';
$lang['locfiledit_empty_filename'] = 'You must fill file name.';
$lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Carácteres prohibidos en el nombre del fi
$lang['locfiledit_file_already_exists'] = 'El fichero ya existe.';
$lang['locfiledit_model_error'] = 'Por favor, seleccione un modelo.';
/* TODO */ $lang['locfiledit_empty_filename'] = 'Por favor, indique un nombre de fichero.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Caractères interdits dans le nom du fichi
$lang['locfiledit_file_already_exists'] = 'Le fichier existe déjà.';
$lang['locfiledit_model_error'] = 'Veuillez sélectionner un modèle.';
$lang['locfiledit_empty_filename'] = 'Veuillez indiquer un nom de fichier.';
$lang['locfiledit_webmaster_only'] = 'Seuls les webmasters sont autorisés à créer ou modifier les fichiers locaux.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Nem használható fájlnév vagy karakter.
$lang['locfiledit_file_already_exists'] = 'Ilyen fájl már létezik.';
$lang['locfiledit_model_error'] = 'A típust ki kell választani.';
$lang['locfiledit_empty_filename'] = 'A fájlnevet ki kell tölteni.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Caratteri vietati nel nome del file.';
$lang['locfiledit_file_already_exists'] = 'Il file esiste già.';
$lang['locfiledit_model_error'] = 'Selezionare un modello.';
$lang['locfiledit_empty_filename'] = 'Indicate un nome di file.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>

View file

@ -52,5 +52,6 @@ $lang['locfiledit_filename_error'] = 'Plik zawiera niedozwolone znaki.';
$lang['locfiledit_file_already_exists'] = 'Plik już istnieje.';
$lang['locfiledit_model_error'] = 'Musisz wybrać model.';
$lang['locfiledit_empty_filename'] = 'Musisz wpisać nazwę pliku.';
/* TODO */ $lang['locfiledit_webmaster_only'] = 'Only webmasters can create or modify local files.';
?>