Add missing language variable "NO_FILE_B3P"
This commit is contained in:
@@ -106,7 +106,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
</link-group>
|
||||
<history>
|
||||
<entry>
|
||||
<date>2012-08-26</date>
|
||||
<date>2012-10-13</date>
|
||||
<rev-version>2.0.1</rev-version>
|
||||
<changelog lang="en">
|
||||
<change>Redirect to portal.php when detecting incorrect announcement parameter</change>
|
||||
@@ -133,6 +133,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
<change>Add missing error messages to links & main menu modules</change>
|
||||
<change>Remove update instructions for old releases</change>
|
||||
<change>Remove update for beta version</change>
|
||||
<change>Add missing language variable "NO_FILE_B3P"</change>
|
||||
</changelog>
|
||||
<changelog lang="de">
|
||||
<change>Leite bei falschen Parametern für Ankündigungen an die portal.php weiter</change>
|
||||
@@ -159,6 +160,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
<change>Füge fehlende Fehlermeldungen zu Links & Menü Modulen hinzu</change>
|
||||
<change>Entferne Update Anleitungen für ältere Veröffentlichungen</change>
|
||||
<change>Entferne Update Anleitung für Beta Version</change>
|
||||
<change>Füge fehlende Sprachvariable "NO_FILE_B3P" hinzu</change>
|
||||
</changelog>
|
||||
</entry>
|
||||
<entry>
|
||||
|
||||
@@ -113,6 +113,7 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_UPLOAD_EXP' => 'Wähle die ZIP-Datei des Moduls das du hochladen willst:',
|
||||
'MODULE_UPLOAD_GO' => 'Hochladen',
|
||||
'NO_MODULE_UPLOAD' => 'Deine Server-Konfiguration erlaubt das Hochladen von Dateien nicht.',
|
||||
'NO_FILE_B3P' => 'Es wurde keine Zip-Datei ausgewählt.',
|
||||
'MODULE_UPLOADED' => 'Modul erfolgreich hochgeladen.',
|
||||
'MODULE_UPLOAD_MKDIR_FAILURE' => 'Es konnte kein Ordner erstellt werden.',
|
||||
'MODULE_COPY_FAILURE' => 'Die folgende Datei konnte nicht kopiert werden: %1$s',
|
||||
|
||||
@@ -112,6 +112,7 @@ $lang = array_merge($lang, array(
|
||||
'MODULE_UPLOAD_EXP' => 'Choose the zip file of the module you want to upload:',
|
||||
'MODULE_UPLOAD_GO' => 'Upload',
|
||||
'NO_MODULE_UPLOAD' => 'Your server configuration does not allow file uploads.',
|
||||
'NO_FILE_B3P' => 'No zip file specified.',
|
||||
'MODULE_UPLOADED' => 'Module uploaded successfully.',
|
||||
'MODULE_UPLOAD_MKDIR_FAILURE' => 'Unable to create a folder.',
|
||||
'MODULE_COPY_FAILURE' => 'Unable to copy the following file: %1$s',
|
||||
|
||||
@@ -52,10 +52,11 @@ class portal_upload
|
||||
$upload->set_allowed_extensions(array('zip'));
|
||||
|
||||
$file = $upload->form_upload('modupload');
|
||||
|
||||
if (empty($file->filename))
|
||||
|
||||
// this is for module zips so don't allow anything else
|
||||
if (empty($file->filename) || !preg_match('.zip.', $file->get('realname')))
|
||||
{
|
||||
trigger_error($user->lang['NO_UPLOAD_FILE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
trigger_error($user->lang['NO_FILE_B3P'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -113,7 +114,17 @@ class portal_upload
|
||||
$cur_path = str_replace($mod_dir . '/', '', $cur_path);
|
||||
$cut_pos = strpos($cur_path, '/');
|
||||
|
||||
// Only allow files in adm, language, portal and styles folder
|
||||
/*
|
||||
* We only copy files. The recursive iterator might grab paths depending on
|
||||
* the PHP version. This will trigger our error handle with trigger_error()
|
||||
* though. If we are trying to copy a directory just move on.
|
||||
*/
|
||||
if (is_dir($cur_path))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only allow files in adm, language, portal and styles folder and a license.txt
|
||||
if(!in_array(substr($cur_path, 0, $cut_pos), array('adm', 'language', 'portal', 'styles')) && $cur_file->getFilename() != 'license.txt')
|
||||
{
|
||||
$file->remove();
|
||||
|
||||
Reference in New Issue
Block a user