Now: tagging Froxlor 0.9.9
This commit is contained in:
@@ -59,7 +59,7 @@ return array(
|
|||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'option_mode' => 'multiple',
|
'option_mode' => 'multiple',
|
||||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
|
||||||
'save_method' => 'storeSettingApsPhpExtensions',
|
'save_method' => 'storeSettingApsPhpExtensions',
|
||||||
),
|
),
|
||||||
'aps_php-function' => array(
|
'aps_php-function' => array(
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class ApsInstaller extends ApsParser
|
|||||||
private $RealPath = '';
|
private $RealPath = '';
|
||||||
private $RootDir = '';
|
private $RootDir = '';
|
||||||
private $Hosts = '';
|
private $Hosts = '';
|
||||||
|
private $aps_version = '1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructor of class. setup some basic variables
|
* constructor of class. setup some basic variables
|
||||||
@@ -72,6 +73,8 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
$XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml');
|
$XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml');
|
||||||
$Xml = new SimpleXMLElement($XmlContent);
|
$Xml = new SimpleXMLElement($XmlContent);
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check for unparseable xml data
|
//check for unparseable xml data
|
||||||
|
|
||||||
@@ -146,9 +149,16 @@ class ApsInstaller extends ApsParser
|
|||||||
$ReturnStatus = 0;
|
$ReturnStatus = 0;
|
||||||
|
|
||||||
// make configure-script executable
|
// make configure-script executable
|
||||||
chmod($this->RealPath . $this->DomainPath . '/install_scripts/configure', 0755);
|
if($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$scriptname = (string)$Xml->service->provision->{'configuration-script'}['name'];
|
||||||
|
} else {
|
||||||
|
$scriptname = 'configure';
|
||||||
|
}
|
||||||
|
|
||||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure') . ' install', $ReturnStatus);
|
chmod($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname, 0755);
|
||||||
|
|
||||||
|
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname) . ' install', $ReturnStatus);
|
||||||
|
|
||||||
if($ReturnStatus != 0)
|
if($ReturnStatus != 0)
|
||||||
{
|
{
|
||||||
@@ -214,7 +224,19 @@ class ApsInstaller extends ApsParser
|
|||||||
//remove permissions
|
//remove permissions
|
||||||
//drop database
|
//drop database
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
$XmlDb = new DynamicProperties;
|
||||||
|
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -278,6 +300,19 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
private function PrepareFiles($Xml, $Row, $Task)
|
private function PrepareFiles($Xml, $Row, $Task)
|
||||||
{
|
{
|
||||||
|
if($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$mapping = $Xml->service->provision->{'url-mapping'}->mapping;
|
||||||
|
$mapping_path = $Xml->service->provision->{'url-mapping'}->mapping['path'];
|
||||||
|
$mapping_url = $Xml->service->provision->{'url-mapping'}->mapping['url'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mapping = $Xml->mapping;
|
||||||
|
$mapping_path = $Xml->mapping['path'];
|
||||||
|
$mapping_url = $Xml->mapping['url'];
|
||||||
|
}
|
||||||
|
|
||||||
if($Task == TASK_INSTALL)
|
if($Task == TASK_INSTALL)
|
||||||
{
|
{
|
||||||
//FIXME truncate customer directory
|
//FIXME truncate customer directory
|
||||||
@@ -287,7 +322,7 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
//extract all files and chown them to the customer guid
|
//extract all files and chown them to the customer guid
|
||||||
|
|
||||||
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $Xml->mapping['path'], $this->RealPath . $this->DomainPath . '/') == false
|
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $mapping_path, $this->RealPath . $this->DomainPath . '/') == false
|
||||||
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false)
|
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false)
|
||||||
{
|
{
|
||||||
$this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
$this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
||||||
@@ -319,7 +354,7 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
//recursive mappings
|
//recursive mappings
|
||||||
|
|
||||||
self::PrepareMappings($Xml->mapping, $Xml->mapping['url'], $this->RealPath . $this->DomainPath . '/');
|
self::PrepareMappings($mapping, $mapping_url, $this->RealPath . $this->DomainPath . '/');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,34 +371,37 @@ class ApsInstaller extends ApsParser
|
|||||||
//check for special PHP permissions
|
//check for special PHP permissions
|
||||||
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
|
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
|
||||||
|
|
||||||
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
if($ParentMapping && $ParentMapping !== null)
|
||||||
$Result = $ParentMapping->xpath('p:permissions');
|
|
||||||
|
|
||||||
if($Result[0]['writable'] == 'true')
|
|
||||||
{
|
{
|
||||||
//fixing file permissions to writeable
|
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
||||||
|
$Result = $ParentMapping->xpath('p:permissions');
|
||||||
if(is_dir($Path))
|
|
||||||
|
if($Result[0]['writable'] == 'true')
|
||||||
{
|
{
|
||||||
chmod($Path, 0775);
|
//fixing file permissions to writeable
|
||||||
|
|
||||||
|
if(is_dir($Path))
|
||||||
|
{
|
||||||
|
chmod($Path, 0775);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
chmod($Path, 0664);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if($Result[0]['readable'] == 'false')
|
||||||
{
|
{
|
||||||
chmod($Path, 0664);
|
//fixing file permissions to non readable
|
||||||
}
|
|
||||||
}
|
if(is_dir($Path))
|
||||||
|
{
|
||||||
if($Result[0]['readable'] == 'false')
|
chmod($Path, 0333);
|
||||||
{
|
}
|
||||||
//fixing file permissions to non readable
|
else
|
||||||
|
{
|
||||||
if(is_dir($Path))
|
chmod($Path, 0222);
|
||||||
{
|
}
|
||||||
chmod($Path, 0333);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
chmod($Path, 0222);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,18 +411,20 @@ class ApsInstaller extends ApsParser
|
|||||||
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
||||||
|
|
||||||
//resolve deeper mappings
|
//resolve deeper mappings
|
||||||
|
if($ParentMapping && $ParentMapping !== null)
|
||||||
foreach($ParentMapping->mapping as $Mapping)
|
|
||||||
{
|
{
|
||||||
//recursive check of other mappings
|
foreach($ParentMapping->mapping as $Mapping)
|
||||||
|
|
||||||
if($Url == '/')
|
|
||||||
{
|
{
|
||||||
self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']);
|
//recursive check of other mappings
|
||||||
}
|
|
||||||
else
|
if($Url == '/')
|
||||||
{
|
{
|
||||||
self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']);
|
self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -434,8 +474,23 @@ class ApsInstaller extends ApsParser
|
|||||||
private function PrepareDatabase($Xml, $Row, $Task)
|
private function PrepareDatabase($Xml, $Row, $Task)
|
||||||
{
|
{
|
||||||
global $db_root;
|
global $db_root;
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
$XmlDb = new DynamicProperties;
|
||||||
|
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
//database management
|
//database management
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class ApsParser
|
|||||||
private $settings = array();
|
private $settings = array();
|
||||||
private $db = false;
|
private $db = false;
|
||||||
private $RootDir = '';
|
private $RootDir = '';
|
||||||
|
private $aps_version = '1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of class, setup basic variables needed by the class
|
* Constructor of class, setup basic variables needed by the class
|
||||||
@@ -988,14 +989,26 @@ class ApsParser
|
|||||||
if($Xml == false)continue;
|
if($Xml == false)continue;
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//show data and status of package
|
//show data and status of package
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row2['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->summary);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row2['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$Summary = $Xml->summary;
|
|
||||||
$Fieldname = $lng['aps']['version'];
|
$Fieldname = $lng['aps']['version'];
|
||||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
@@ -1345,16 +1358,36 @@ class ApsParser
|
|||||||
{
|
{
|
||||||
$Error = array();
|
$Error = array();
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check alot of stuff if package is supported
|
//check alot of stuff if package is supported
|
||||||
//php modules
|
//php modules
|
||||||
|
|
||||||
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('php', 'http://apstandard.com/ns/1/php');
|
||||||
|
|
||||||
|
$XmlPhp = new DynamicProperties;
|
||||||
|
$XmlPhp->extension = getXPathValue($Xml, '//php:extension', false);
|
||||||
|
$XmlPhp->function = getXPathValue($Xml, '//php:function', false);
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->extension)
|
if($XmlPhp->extension)
|
||||||
{
|
{
|
||||||
$ExtensionsLoaded = get_loaded_extensions();
|
$ExtensionsLoaded = get_loaded_extensions();
|
||||||
foreach($XmlPhp->extension as $Extension)
|
foreach($XmlPhp->extension as $Extension)
|
||||||
{
|
{
|
||||||
|
if(strtolower($Extension) == 'php')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(!in_array($Extension, $ExtensionsLoaded)
|
if(!in_array($Extension, $ExtensionsLoaded)
|
||||||
&& !self::CheckException('php', 'extension', $Extension))
|
&& !self::CheckException('php', 'extension', $Extension))
|
||||||
{
|
{
|
||||||
@@ -1389,6 +1422,11 @@ class ApsParser
|
|||||||
);
|
);
|
||||||
foreach($PhpValues as $Value)
|
foreach($PhpValues as $Value)
|
||||||
{
|
{
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{$Value} = getXPathValue($Xml, '//php:'.$Value);
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{$Value})
|
if($XmlPhp->{$Value})
|
||||||
{
|
{
|
||||||
if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value}
|
if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value}
|
||||||
@@ -1399,6 +1437,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'post-max-size'} = getXPathValue($Xml, '//php:post-max-size');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'post-max-size'})
|
if($XmlPhp->{'post-max-size'})
|
||||||
{
|
{
|
||||||
if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'})
|
if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'})
|
||||||
@@ -1408,6 +1451,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'memory-limit'} = getXPathValue($Xml, '//php:memory-limit');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'memory-limit'})
|
if($XmlPhp->{'memory-limit'})
|
||||||
{
|
{
|
||||||
if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'})
|
if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'})
|
||||||
@@ -1417,6 +1465,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'max-execution-time'} = getXPathValue($Xml, '//php:max-execution-time');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'max-execution-time'})
|
if($XmlPhp->{'max-execution-time'})
|
||||||
{
|
{
|
||||||
if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'})
|
if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'})
|
||||||
@@ -1450,7 +1503,21 @@ class ApsParser
|
|||||||
|
|
||||||
//database
|
//database
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
$XmlDb = new DynamicProperties;
|
||||||
|
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||||
|
$XmlDb->db->{'server-type'} = getXPathValue($Xml, '//db:server-type');
|
||||||
|
$XmlDb->db->{'server-min-version'} = getXPathValue($Xml, '//db:server-min-version');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -1467,7 +1534,21 @@ class ApsParser
|
|||||||
|
|
||||||
//ASP.NET
|
//ASP.NET
|
||||||
|
|
||||||
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('aspnet', 'http://apstandard.com/ns/1/aspnet');
|
||||||
|
|
||||||
|
$XmlAsp = new DynamicProperties;
|
||||||
|
$XmlAsp->handler = getXPathValue($Xml, '//aspnet:handler');
|
||||||
|
$XmlAsp->permissions = getXPathValue($Xml, '//aspnet:permissions');
|
||||||
|
$XmlAsp->version = getXPathValue($Xml, '//aspnet:version');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlAsp->handler
|
if($XmlAsp->handler
|
||||||
|| $XmlAsp->permissions
|
|| $XmlAsp->permissions
|
||||||
@@ -1478,7 +1559,19 @@ class ApsParser
|
|||||||
|
|
||||||
//CGI
|
//CGI
|
||||||
|
|
||||||
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('cgi', 'http://apstandard.com/ns/1/cgi');
|
||||||
|
|
||||||
|
$XmlCgi = new DynamicProperties;
|
||||||
|
$XmlCgi->handler = getXPathValue($Xml, '//cgi:handler');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlCgi->handler)
|
if($XmlCgi->handler)
|
||||||
{
|
{
|
||||||
@@ -1487,7 +1580,20 @@ class ApsParser
|
|||||||
|
|
||||||
//webserver modules
|
//webserver modules
|
||||||
|
|
||||||
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('apache', 'http://apstandard.com/ns/1/apache');
|
||||||
|
|
||||||
|
$XmlWebserver = new DynamicProperties;
|
||||||
|
$XmlWebserver->{'required-module'} = getXPathValue($Xml, '//apache:required-module');
|
||||||
|
$XmlWebserver->htaccess = getXPathValue($Xml, '//apache:htaccess');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlWebserver->{'required-module'})
|
if($XmlWebserver->{'required-module'})
|
||||||
{
|
{
|
||||||
@@ -1527,7 +1633,21 @@ class ApsParser
|
|||||||
|
|
||||||
//validation against a charset not possible in current version
|
//validation against a charset not possible in current version
|
||||||
|
|
||||||
foreach($Xml->settings->group as $Group)
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
{
|
{
|
||||||
@@ -1544,13 +1664,16 @@ class ApsParser
|
|||||||
|
|
||||||
//check different errors/features in submappings
|
//check different errors/features in submappings
|
||||||
|
|
||||||
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
||||||
|
|
||||||
if(count($Return) != 0)
|
if(count($Return) != 0)
|
||||||
{
|
|
||||||
foreach($Return as $Value)
|
|
||||||
{
|
{
|
||||||
if(!in_array($Value, $Error))$Error[] = $Value;
|
foreach($Return as $Value)
|
||||||
|
{
|
||||||
|
if(!in_array($Value, $Error))$Error[] = $Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1616,28 +1739,57 @@ class ApsParser
|
|||||||
self::GetContentFromZip($Filename, 'APP-META.xml', $Destination . 'APP-META.xml');
|
self::GetContentFromZip($Filename, 'APP-META.xml', $Destination . 'APP-META.xml');
|
||||||
|
|
||||||
//copy screenshots
|
//copy screenshots
|
||||||
|
|
||||||
if($Xml->screenshot)
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
foreach($Xml->screenshot as $Screenshot)
|
$xml_screenshots = $Xml->presentation->screenshot;;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_screenshots = $Xml->screenshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($xml_screenshots)
|
||||||
|
{
|
||||||
|
foreach($xml_screenshots as $Screenshot)
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path']));
|
self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy icon
|
//copy icon
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Xml->icon['path'], $Destination . basename($Xml->icon['path']));
|
$xml_iconpath = $Xml->presentation->icon['path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_iconpath = $Xml->icon['path'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_iconpath)
|
||||||
|
{
|
||||||
|
self::GetContentFromZip($Filename, $xml_iconpath, $Destination . basename($xml_iconpath));
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy license
|
//copy license
|
||||||
|
|
||||||
if($Xml->license
|
if ($this->aps_version != '1.0')
|
||||||
&& $Xml->license->text->file)
|
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Xml->license->text->file, $Destination . 'license.txt');
|
$xml_license = $Xml->service->license;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($xml_license
|
||||||
|
&& $xml_license->text->file)
|
||||||
|
{
|
||||||
|
self::GetContentFromZip($Filename, $xml_license->text->file, $Destination . 'license.txt');
|
||||||
}
|
}
|
||||||
|
|
||||||
//insert package to database
|
//insert package to database
|
||||||
@@ -2363,10 +2515,26 @@ class ApsParser
|
|||||||
|
|
||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check all data fields of xml file against inut of customer
|
//check all data fields of xml file against inut of customer
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$Error = array();
|
$Error = array();
|
||||||
foreach($Xml->settings->group as $Group)
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
{
|
{
|
||||||
@@ -2542,7 +2710,19 @@ class ApsParser
|
|||||||
|
|
||||||
//database required?
|
//database required?
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
$XmlDb = new DynamicProperties;
|
||||||
|
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -2664,10 +2844,19 @@ class ApsParser
|
|||||||
self::SetInstallationValue($PackageId, $CustomerId, 'main_location', '');
|
self::SetInstallationValue($PackageId, $CustomerId, 'main_location', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Xml->license)
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
if($Xml->license['must-accept']
|
$xml_license = $Xml->service->license;
|
||||||
&& $Xml->license['must-accept'] == 'true')
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_license)
|
||||||
|
{
|
||||||
|
if($xml_license['must-accept']
|
||||||
|
&& $xml_license['must-accept'] == 'true')
|
||||||
{
|
{
|
||||||
if(isset($_POST['license'])
|
if(isset($_POST['license'])
|
||||||
&& $_POST['license'] == 'true')
|
&& $_POST['license'] == 'true')
|
||||||
@@ -2712,6 +2901,8 @@ class ApsParser
|
|||||||
|
|
||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//show notifcation if customer has reached his installation limit
|
//show notifcation if customer has reached his installation limit
|
||||||
|
|
||||||
if($this->userinfo['aps_packages'] != '-1'
|
if($this->userinfo['aps_packages'] != '-1'
|
||||||
@@ -2724,10 +2915,19 @@ class ApsParser
|
|||||||
//icon for package
|
//icon for package
|
||||||
|
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//show error message if some input was wrong
|
//show error message if some input was wrong
|
||||||
@@ -2761,7 +2961,7 @@ class ApsParser
|
|||||||
{
|
{
|
||||||
if($Value)
|
if($Value)
|
||||||
{
|
{
|
||||||
if($Row3['ID'] == $Value)
|
if($Row3['id'] == $Value)
|
||||||
{
|
{
|
||||||
$Temp.= '<option selected="selected" value="' . $Row3['id'] . '">' . $Row3['domain'] . '</option>';
|
$Temp.= '<option selected="selected" value="' . $Row3['id'] . '">' . $Row3['domain'] . '</option>';
|
||||||
}
|
}
|
||||||
@@ -2813,7 +3013,19 @@ class ApsParser
|
|||||||
|
|
||||||
//database required?
|
//database required?
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||||
|
|
||||||
|
$XmlDb = new DynamicProperties;
|
||||||
|
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -2831,8 +3043,22 @@ class ApsParser
|
|||||||
$Fieldvalue = $Temp;
|
$Fieldvalue = $Temp;
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach($Xml->settings->group as $Group)
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
$GroupPrinted = false;
|
$GroupPrinted = false;
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
@@ -3015,16 +3241,25 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Xml->license)
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->service->license;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_license)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
|
|
||||||
if($Xml->license['must-accept']
|
if($xml_license['must-accept']
|
||||||
&& $Xml->license['must-accept'] == 'true')
|
&& $xml_license['must-accept'] == 'true')
|
||||||
{
|
{
|
||||||
if($Xml->license->text->name)$Temp.= $Xml->license->text->name . '<br/>';
|
if($xml_license->text->name)$Temp.= $xml_license->text->name . '<br/>';
|
||||||
|
|
||||||
if($Xml->license->text->file)
|
if($xml_license->text->file)
|
||||||
{
|
{
|
||||||
$Temp.= '<textarea name="text" rows="10" cols="55">';
|
$Temp.= '<textarea name="text" rows="10" cols="55">';
|
||||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||||
@@ -3037,7 +3272,7 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Temp.= '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
$Temp.= '<a target="_blank" href="' . htmlspecialchars($xml_license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
||||||
$Groupname = $lng['aps']['license'];
|
$Groupname = $lng['aps']['license'];
|
||||||
$Fieldname = $lng['aps']['license'];
|
$Fieldname = $lng['aps']['license'];
|
||||||
$Fieldvalue = $Temp;
|
$Fieldvalue = $Temp;
|
||||||
@@ -3088,14 +3323,37 @@ class ApsParser
|
|||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
//show icon and basic data
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
//show icon and basic data
|
||||||
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||||
|
$categories = $Xml->presentation->categories;
|
||||||
|
$languages = $Xml->presentation->languages;
|
||||||
|
$description = $Xml->presentation->description;
|
||||||
|
$changelogs = $Xml->presentation->changelog;
|
||||||
|
$license = $Xml->service->license;
|
||||||
|
$screenshots = $Xml->presentation->screenshot;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->summary);
|
||||||
|
$categories = $Xml->categories;
|
||||||
|
$languages = $Xml->languages;
|
||||||
|
$description = $Xml->description;
|
||||||
|
$changelogs = $Xml->changelog;
|
||||||
|
$license = $Xml->license;
|
||||||
|
$screenshots = $Xml->screenshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$Summary = htmlspecialchars($Xml->summary);
|
|
||||||
$Fieldname = $lng['aps']['version'];
|
$Fieldname = $lng['aps']['version'];
|
||||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
@@ -3120,12 +3378,12 @@ class ApsParser
|
|||||||
|
|
||||||
//show categories
|
//show categories
|
||||||
|
|
||||||
if($Xml->categories)
|
if($categories)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->categories->category as $Categories)
|
foreach($categories->category as $_categories)
|
||||||
{
|
{
|
||||||
$Temp.= htmlspecialchars($Categories[0]) . '<br/>';
|
$Temp.= htmlspecialchars($_categories[0]) . '<br/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['categories'];
|
$Fieldname = $lng['aps']['categories'];
|
||||||
@@ -3135,12 +3393,12 @@ class ApsParser
|
|||||||
|
|
||||||
//show available languages
|
//show available languages
|
||||||
|
|
||||||
if($Xml->languages)
|
if($languages)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->languages->language as $Languages)
|
foreach($languages->language as $_languages)
|
||||||
{
|
{
|
||||||
$Temp.= $Languages[0] . ' ';
|
$Temp.= $_languages[0] . ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['languages'];
|
$Fieldname = $lng['aps']['languages'];
|
||||||
@@ -3153,7 +3411,7 @@ class ApsParser
|
|||||||
if($All == true)
|
if($All == true)
|
||||||
{
|
{
|
||||||
$Fieldname = $lng['aps']['long_description'];
|
$Fieldname = $lng['aps']['long_description'];
|
||||||
$Fieldvalue = htmlspecialchars($Xml->description);
|
$Fieldvalue = htmlspecialchars($description);
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
|
|
||||||
//show config script language
|
//show config script language
|
||||||
@@ -3168,7 +3426,7 @@ class ApsParser
|
|||||||
//show changelog
|
//show changelog
|
||||||
|
|
||||||
$Temp = '<ul>';
|
$Temp = '<ul>';
|
||||||
foreach($Xml->changelog->version as $Versions)
|
foreach($changelogs->version as $Versions)
|
||||||
{
|
{
|
||||||
$Temp.= '<li><strong>' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')</strong>';
|
$Temp.= '<li><strong>' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')</strong>';
|
||||||
$Temp.= '<ul>';
|
$Temp.= '<ul>';
|
||||||
@@ -3187,13 +3445,13 @@ class ApsParser
|
|||||||
|
|
||||||
//show license
|
//show license
|
||||||
|
|
||||||
if($Xml->license)
|
if($license)
|
||||||
{
|
{
|
||||||
if($Xml->license->text->file)
|
if($license->text->file)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
|
|
||||||
if($Xml->license->text->name)$Temp = $Xml->license->text->name . '<br/>';
|
if($license->text->name)$Temp = $license->text->name . '<br/>';
|
||||||
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
|
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
|
||||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||||
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
|
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
|
||||||
@@ -3205,23 +3463,23 @@ class ApsParser
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Fieldname = $lng['aps']['license'];
|
$Fieldname = $lng['aps']['license'];
|
||||||
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//show screenshots
|
//show screenshots
|
||||||
|
|
||||||
if($Xml->screenshot)
|
if($screenshots)
|
||||||
{
|
{
|
||||||
$Count = 0;
|
$Count = 0;
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->screenshot as $Screenshot)
|
foreach($screenshots as $Screenshot)
|
||||||
{
|
{
|
||||||
$Count+= 1;
|
$Count+= 1;
|
||||||
$Temp.= '<img src="./packages/' . $Row['Path'] . '/' . basename($Screenshot['path']) . '" alt="' . $Screenshot->description . '"/><br/><em>' . $Screenshot->description . '</em><br/>';
|
$Temp.= '<img src="./packages/' . $Row['Path'] . '/' . basename($Screenshot['path']) . '" alt="' . $Screenshot->description . '"/><br/><em>' . $Screenshot->description . '</em><br/>';
|
||||||
|
|
||||||
if(count($Xml->screenshot) != $Count)$Temp.= '<br/>';
|
if(count($screenshots) != $Count)$Temp.= '<br/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['screenshots'];
|
$Fieldname = $lng['aps']['screenshots'];
|
||||||
|
|||||||
18
lib/classes/aps/class.DynamicProperties.php
Normal file
18
lib/classes/aps/class.DynamicProperties.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package APS
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
class DynamicProperties { /* empty class for some magic */ }
|
||||||
30
lib/functions/aps/function.getXPathValue.php
Normal file
30
lib/functions/aps/function.getXPathValue.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package APS
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getXPathValue($xmlobj = null, $path = null, $single = true)
|
||||||
|
{
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
$tmpxml = new DynamicProperties;
|
||||||
|
$tmpxml = ($xmlobj->xpath($path)) ? $xmlobj->xpath($path) : false;
|
||||||
|
|
||||||
|
if($result !== false)
|
||||||
|
{
|
||||||
|
$result = ($single == true) ? (string)$tmpxml[0] : $tmpxml;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
@@ -1065,7 +1065,7 @@ $lng['aps']['nospecialchars'] = 'Special characters are not allowed in the searc
|
|||||||
$lng['aps']['noitemsfound'] = 'No Packages were found!';
|
$lng['aps']['noitemsfound'] = 'No Packages were found!';
|
||||||
$lng['aps']['nopackagesinstalled'] = 'You haven\'t installed any package yet which could be shown.';
|
$lng['aps']['nopackagesinstalled'] = 'You haven\'t installed any package yet which could be shown.';
|
||||||
$lng['aps']['instance_install'] = 'Package Installation pending';
|
$lng['aps']['instance_install'] = 'Package Installation pending';
|
||||||
$lng['aps']['instance_task_active'] = 'Installation running at this moment';
|
$lng['aps']['instance_task_active'] = 'Package is currently being processed';
|
||||||
$lng['aps']['instance_success'] = 'Package is installed/was installed successfully';
|
$lng['aps']['instance_success'] = 'Package is installed/was installed successfully';
|
||||||
$lng['aps']['instance_error'] = 'Package isn\'t installed - there occured some errors on the Installation';
|
$lng['aps']['instance_error'] = 'Package isn\'t installed - there occured some errors on the Installation';
|
||||||
$lng['aps']['instance_uninstall'] = 'Package Uninstallation pending';
|
$lng['aps']['instance_uninstall'] = 'Package Uninstallation pending';
|
||||||
@@ -1426,5 +1426,5 @@ $lng['error']['exception'] = '%s';
|
|||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.9-svn1
|
// ADDED IN FROXLOR 0.9.9-svn1
|
||||||
$lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3- and smtp-"A record" also with MX-Servers set';
|
$lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3- and smtp-"A record" also with MX-Servers set';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1070,7 +1070,7 @@ $lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaub
|
|||||||
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
||||||
$lng['aps']['nopackagesinstalled'] = 'Sie haben noch kein Paket installiert welches angezeigt werden könnte.';
|
$lng['aps']['nopackagesinstalled'] = 'Sie haben noch kein Paket installiert welches angezeigt werden könnte.';
|
||||||
$lng['aps']['instance_install'] = 'Paket wurde zur Installation vorgemerkt';
|
$lng['aps']['instance_install'] = 'Paket wurde zur Installation vorgemerkt';
|
||||||
$lng['aps']['instance_task_active'] = 'Paket wird gerade installiert';
|
$lng['aps']['instance_task_active'] = 'Paket wird gerade bearbeitet';
|
||||||
$lng['aps']['instance_success'] = 'Paket ist installiert bzw. wurde erfolgreich installiert';
|
$lng['aps']['instance_success'] = 'Paket ist installiert bzw. wurde erfolgreich installiert';
|
||||||
$lng['aps']['instance_error'] = 'Paket ist nicht installiert - bei der Installation traten Fehler auf';
|
$lng['aps']['instance_error'] = 'Paket ist nicht installiert - bei der Installation traten Fehler auf';
|
||||||
$lng['aps']['instance_uninstall'] = 'Paket wurde zur Deinstallation vorgemerkt';
|
$lng['aps']['instance_uninstall'] = 'Paket wurde zur Deinstallation vorgemerkt';
|
||||||
@@ -1410,4 +1410,5 @@ $lng['tasks']['aps_task_sysdownload'] = 'Herunterladen neuer APS Pakete';
|
|||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.9-svn1
|
// ADDED IN FROXLOR 0.9.9-svn1
|
||||||
$lng['serversettings']['mail_also_with_mxservers'] = 'Erstelle mail-, imap-, pop3- and smtp-"A Record" auch wenn MX-Server angegeben sind';
|
$lng['serversettings']['mail_also_with_mxservers'] = 'Erstelle mail-, imap-, pop3- and smtp-"A Record" auch wenn MX-Server angegeben sind';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user