- show correct path in APS-error message, fixes #30
This commit is contained in:
@@ -37,6 +37,7 @@ class ApsParser
|
||||
private $userinfo = array();
|
||||
private $settings = array();
|
||||
private $db = false;
|
||||
private $RootDir = '';
|
||||
|
||||
/**
|
||||
* Constructor of class, setup basic variables needed by the class
|
||||
@@ -51,6 +52,7 @@ class ApsParser
|
||||
$this->settings = $settings;
|
||||
$this->userinfo = $userinfo;
|
||||
$this->db = $db;
|
||||
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -793,7 +795,8 @@ class ApsParser
|
||||
}
|
||||
else
|
||||
{
|
||||
$Errors[] = $lng['aps']['moveproblem'];
|
||||
$moveproblem = str_replace('{$path}', $this->RootDir, $lng['aps']['moveproblem']);
|
||||
$Errors[] = $moveproblem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1688,10 +1691,11 @@ class ApsParser
|
||||
$Error.= '<li>' . $lng['aps']['class_zip_missing'] . '</li>';
|
||||
}
|
||||
|
||||
if(!is_writable('./temp/')
|
||||
|| !is_writable('./packages/'))
|
||||
if(!is_writable($this->RootDir.'temp/')
|
||||
|| !is_writable($this->RootDir.'packages/'))
|
||||
{
|
||||
$Error.= '<li>' . $lng['aps']['dir_permissions'] . '</li>';
|
||||
$dirpermission = str_replace('{$path}', $this->RootDir, $lng['aps']['dir_permissions']);
|
||||
$Error.= '<li>' . $dirpermission . '</li>';
|
||||
}
|
||||
|
||||
if($Error != '')
|
||||
|
||||
@@ -1110,7 +1110,7 @@ $lng['aps']['invalidzipfile'] = '<strong>Errors for <em>%s</em></strong><br/><ul
|
||||
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> successfully installed as a Package update</strong>';
|
||||
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> successfully installed as a new Package</strong>';
|
||||
$lng['aps']['class_zip_missing'] = 'SimpleXML Class, exec function or ZIP Functions missing or not enabled! For further information about this problem look into the handbook for this module.';
|
||||
$lng['aps']['dir_permissions'] = 'The PHP/Webserver process must be able to write in the directory /var/www/froxlor/temp/ and /var/www/froxlor/packages/';
|
||||
$lng['aps']['dir_permissions'] = 'The PHP/Webserver process must be able to write in the directory {$path}temp/ and {$path}packages/';
|
||||
$lng['aps']['initerror'] = '<strong>There are some problems with this module:</strong><ul>%s</ul>Fix these problems, otherwise the module cannot be used!';
|
||||
$lng['aps']['iderror'] = 'Wrong id specified!';
|
||||
$lng['aps']['nopacketsforinstallation'] = 'There are no packages to install.';
|
||||
|
||||
@@ -1065,7 +1065,7 @@ $lng['aps']['notazipfile'] = 'Die hochgeladene Datei ist keine gültige ZIP-
|
||||
$lng['aps']['filetoobig'] = 'Die Datei ist zu groß.';
|
||||
$lng['aps']['filenotcomplete'] = 'Die Datei wurde nicht vollständig hochgeladen.';
|
||||
$lng['aps']['phperror'] = 'Es trat ein PHP interner Fehler auf. Der Upload Fehlercode lautet #';
|
||||
$lng['aps']['moveproblem'] = 'Die hochgeladene Datei konnte nicht aus dem temporären Ordner verschoben werden. Prüfen Sie ob alle Rechte korrekt gesetzt sind. Dies gilt insbesondere fü die Ordner /var/www/froxlor/temp/ und /var/www/froxlor/packages/.';
|
||||
$lng['aps']['moveproblem'] = 'Die hochgeladene Datei konnte nicht aus dem temporären Ordner verschoben werden. Prüfen Sie ob alle Rechte korrekt gesetzt sind. Dies gilt insbesondere fü die Ordner {$path}temp/ und {$path}packages/.';
|
||||
$lng['aps']['uploaderrors'] = '<strong>Fehler für die Datei <em>%s</em></strong><br/><ul>%s</ul>';
|
||||
$lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaubt!';
|
||||
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
||||
@@ -1115,7 +1115,7 @@ $lng['aps']['invalidzipfile'] = '<strong>Fehler für <em>%s</em></strong><br
|
||||
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> erfolgreich als Paketupdate installiert</strong>';
|
||||
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> erfolgreich als neues Paket installiert</strong>';
|
||||
$lng['aps']['class_zip_missing'] = 'SimpleXML Klasse, exec Funktion oder ZIP Funktionen nicht vorhanden bzw. aktiviert! Für genauere Informationen zu diesem Problem schauen Sie bitte in das Handbuch zu diesem Modul.';
|
||||
$lng['aps']['dir_permissions'] = 'Der PHP bzw. Webserver Prozess muss Schreibrechte für /var/www/froxlor/temp/ und /var/www/froxlor/packages/ haben.';
|
||||
$lng['aps']['dir_permissions'] = 'Der PHP bzw. Webserver Prozess muss Schreibrechte für {$path}temp/ und {$path}packages/ haben.';
|
||||
$lng['aps']['initerror'] = '<strong>Es gibt ein paar Probleme mit diesem Modul:</strong><ul>%s</ul>Beheben Sie diese Probleme oder das Modul kann nicht genutzt werden!';
|
||||
$lng['aps']['iderror'] = 'Es wurde eine falsche Id übergeben!';
|
||||
$lng['aps']['nopacketsforinstallation'] = 'Es wurden keine Pakete zur Installation gefunden.';
|
||||
|
||||
Reference in New Issue
Block a user