mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Fix build
This commit is contained in:
@@ -828,7 +828,8 @@ abstract class task_abstract
|
||||
(null, 0, "stopped", 0, :active,
|
||||
:name, "0000/00/00 00:00:00", :class, :settings)';
|
||||
|
||||
if ($settings && ! DOMDocument::loadXML($settings)) {
|
||||
$domdoc = new DOMDocument();
|
||||
if ($settings && ! $domdoc->loadXML($settings)) {
|
||||
throw new Exception('settings invalide');
|
||||
} elseif ( ! $settings) {
|
||||
$settings = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<tasksettings>\n</tasksettings>";
|
||||
|
@@ -50,7 +50,8 @@ class task_period_ftp extends task_appboxAbstract
|
||||
, "proxyport"
|
||||
, "period"
|
||||
);
|
||||
if (($dom = @DOMDocument::loadXML($oldxml)) != FALSE) {
|
||||
$dom = new DOMDocument();
|
||||
if ((@$dom->loadXML($oldxml)) != FALSE) {
|
||||
$xmlchanged = false;
|
||||
foreach (array("str:proxy", "str:proxyport", "str:period") as $pname) {
|
||||
$ptype = substr($pname, 0, 3);
|
||||
@@ -167,7 +168,8 @@ class task_period_ftp extends task_appboxAbstract
|
||||
|
||||
if ($parm["xml"] === null) {
|
||||
// pas de xml 'raw' : on accepte les champs 'graphic view'
|
||||
if (($domTaskSettings = @DOMDocument::loadXML($taskrow["settings"])) != FALSE) {
|
||||
$domTaskSettings = new DOMDocument();
|
||||
if ((@$domTaskSettings->loadXML($taskrow["settings"])) != FALSE) {
|
||||
$xmlchanged = false;
|
||||
foreach (array("proxy", "proxyport", "period") as $f) {
|
||||
if ($parm[$f] !== NULL) {
|
||||
@@ -194,7 +196,8 @@ class task_period_ftp extends task_appboxAbstract
|
||||
}
|
||||
|
||||
// si on doit changer le xml, on verifie qu'il est valide
|
||||
if ($parm["xml"] && ! @DOMDocument::loadXML($parm["xml"])) {
|
||||
$domdoc = new DOMDocument();
|
||||
if ($parm["xml"] && ! @$domdoc->loadXML($parm["xml"])) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,8 @@ class task_period_ftpPull extends task_appboxAbstract
|
||||
, "password", "ssl", "ftppath", "localpath"
|
||||
, "passive", "period"
|
||||
);
|
||||
if ($dom = @DOMDocument::loadXML($oldxml)) {
|
||||
$dom = new DOMDocument();
|
||||
if (@$dom->loadXML($oldxml)) {
|
||||
$xmlchanged = false;
|
||||
foreach (array("str:proxy", "str:proxyport", "str:period", "boo:passive", "boo:ssl", "str:password", "str:user", "str:ftppath", "str:localpath", "str:port", "str:host") as $pname) {
|
||||
$ptype = substr($pname, 0, 3);
|
||||
@@ -189,7 +190,8 @@ class task_period_ftpPull extends task_appboxAbstract
|
||||
|
||||
if ($parm["xml"] === null) {
|
||||
// pas de xml 'raw' : on accepte les champs 'graphic view'
|
||||
if (($domTaskSettings = DOMDocument::loadXML($taskrow["settings"])) != FALSE) {
|
||||
$domdoc = new DOMDocument();
|
||||
if (($domTaskSettings = $domdoc->loadXML($taskrow["settings"])) != FALSE) {
|
||||
$xmlchanged = false;
|
||||
foreach (array("proxy", "proxyport", "period", "host", "port", "user", "password", "ssl", "passive", "localpath", "ftppath") as $f) {
|
||||
if ($parm[$f] !== NULL) {
|
||||
@@ -216,7 +218,8 @@ class task_period_ftpPull extends task_appboxAbstract
|
||||
}
|
||||
|
||||
// si on doit changer le xml, on verifie qu'il est valide
|
||||
if ($parm["xml"] && ! DOMDocument::loadXML($parm["xml"])) {
|
||||
$domdoc = new DOMDocument();
|
||||
if ($parm["xml"] && ! $domdoc->loadXML($parm["xml"])) {
|
||||
|
||||
return(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user