Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Refactor upload method to make it more readable. Fix wrong event sent…
Browse files Browse the repository at this point in the history
… after partial uploads.
  • Loading branch information
cdujeu committed Feb 27, 2015
1 parent 0b81a92 commit 4fc619d
Show file tree
Hide file tree
Showing 29 changed files with 321 additions and 121 deletions.
274 changes: 156 additions & 118 deletions core/src/plugins/access.fs/class.fsAccessDriver.php

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ca.php
Expand Up @@ -628,5 +628,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
8 changes: 7 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/cs.php
Expand Up @@ -628,4 +628,10 @@
"plugtype.desc.mailer" => "Pomůcky pro zasílání e-mailů z aplikací",
"plugtype.title.mq" => "Komunikační služby",
"plugtype.desc.mq" => "Implementace jednoduchého PUB/SUB serveru",
);
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/da.php
Expand Up @@ -631,5 +631,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/de.php
Expand Up @@ -634,5 +634,11 @@
"plugtype.desc.mailer" => "Werkzeuge für den Versand von E-Mails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementation eines einfachen PUB/SUB-Servers",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/en.php
Expand Up @@ -628,4 +628,10 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/es.php
Expand Up @@ -632,5 +632,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/et.php
Expand Up @@ -629,5 +629,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/eus.php
Expand Up @@ -627,5 +627,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/fi.php
Expand Up @@ -629,5 +629,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/fr.php
Expand Up @@ -628,5 +628,11 @@
"plugtype.desc.mailer" => "Outils pour permettre à l'application d'envoyer des courriels",
"plugtype.title.mq" => "Discution instantannée",
"plugtype.desc.mq" => "Implémentations d'un simple serveur PUB/SUB",
"537" => "Le fichier est trop gros! La taille maximum autorisée est %i",
"538" => "Erreur de transfert: fichier introuvable sur le serveur!",
"539" => "Erreur de transfert: le fichier est partiellement transferé.",
"540" => "Erreur de transfert: impossible d'ouvrir le répertoire temporaire.",
"541" => "Erreur de transfert: impossible d'écrire dans le répertoire temporaire.",
"542" => "Erreur de transfert: une extension PHP a stoppé le processus."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/gr.php
Expand Up @@ -626,5 +626,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/he.php
Expand Up @@ -626,5 +626,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/hu.php
Expand Up @@ -631,5 +631,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/it.php
Expand Up @@ -646,5 +646,11 @@
"plugtype.desc.mailer" => "Strumenti per consentire all'applicazione di inviare email",
"plugtype.title.mq" => "Messaggistica Istantanea",
"plugtype.desc.mq" => "Implementazione di un semplice server PUB/SUB",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ja.php
Expand Up @@ -631,6 +631,12 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* 文章はここまで */
/* 文章終了 */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/kr.php
Expand Up @@ -635,5 +635,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/nl.php
Expand Up @@ -632,5 +632,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/no.php
Expand Up @@ -630,5 +630,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/pl.php
Expand Up @@ -626,5 +626,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
8 changes: 7 additions & 1 deletion core/src/plugins/core.ajaxplorer/i18n/pt-br.php
Expand Up @@ -630,5 +630,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
/* END SENTENCE */
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/pt.php
Expand Up @@ -626,6 +626,12 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
/* password strength tester */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ru.php
Expand Up @@ -628,4 +628,10 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "IM - сообщения",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/si.php
Expand Up @@ -627,6 +627,12 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
/* password strength tester */
/* quick access keys */
Expand Down
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/sv.php
Expand Up @@ -626,5 +626,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/tr.php
Expand Up @@ -629,5 +629,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/zh-tw.php
Expand Up @@ -629,5 +629,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
6 changes: 6 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/zh.php
Expand Up @@ -638,5 +638,11 @@
"plugtype.desc.mailer" => "Tools for letting the application send emails",
"plugtype.title.mq" => "Instant Messaging",
"plugtype.desc.mq" => "Implementations of a simple PUB/SUB server",
"537" => "File is too large! Maximum authorized size is %i",
"538" => "Upload error: no file found on server!",
"539" => "Upload error: file is partial",
"540" => "Upload error: cannot find the temporary directory",
"541" => "Upload error: cannot write into the temporary directory",
"542" => "Upload error: a PHP extension stopped the upload process."
/* END SENTENCE */
);
Expand Up @@ -109,7 +109,7 @@ public function postProcess($action, $httpVars, $postProcessData)
}
AJXP_XMLWriter::close();
/* for further implementation */
if (!$result["PREVENT_NOTIF"]) {
if (!isSet($result["PREVENT_NOTIF"])) {
if (isset($result["CREATED_NODE"])) {
AJXP_Controller::applyHook("node.change", array(null, $result["CREATED_NODE"], false));
} else if (isSet($result["UPDATED_NODE"])) {
Expand Down

0 comments on commit 4fc619d

Please sign in to comment.