Commit 76dd0c0e authored by Jordan Breton's avatar Jordan Breton

splited into modules + light modification to uploader (WIP multifiles upload support)

parent 54c9ad2a
......@@ -56,8 +56,11 @@ try{
if(!is_dir("$site/webroot/$dir")) mkdir("$site/webroot/$dir");
if(is_link("$site/webroot/$dir/$p")) unlink("$site/webroot/$dir/$p");
chdir("$site/webroot/$dir");
if(!$m) $exec("ln -s \"../../../$l/package/$p/webroot/$dir\" \"$p\"");
else $exec("ln -s \"../../../$l/$p/webroot/$dir\" \"$p\"");
if(!is_dir(dirname($p))) mkdir(dirname($p),0777,true);
$relativeAdapt = str_repeat("../",count(explode("/",$p))+2);
$relativeAdapt = substr($relativeAdapt,0,-1);
if(!$m) $exec("ln -s \"$relativeAdapt/$l/package/$p/webroot/$dir\" \"$p\"");
else $exec("ln -s \"$relativeAdapt/$l/$p/webroot/$dir\" \"$p\"");
}
fwrite(STDOUT,"$package installed.\n");
}else fwrite(STDOUT,"$package : nothing to do (no webroot folder found).\n");
......
#!/usr/bin/php -q
<?php
use wfw\Autoloader;
use wfw\engine\core\conf\FileBasedConf;
use wfw\engine\core\conf\io\adapters\JSONConfIOAdapter;
use wfw\engine\core\data\DBAccess\SQLDB\MySQLDBAccess;
use wfw\engine\core\data\query\RawQuery;
use wfw\engine\lib\data\string\compressor\GZCompressor;
use wfw\engine\lib\data\string\serializer\LightSerializer;
use wfw\engine\lib\data\string\serializer\PHPSerializer;
require_once(dirname(__DIR__)."/init.environment.php");
/**
* @param $search
* @param $replace
* @param $subject
* @param $pos
* @return mixed|null
*/
function str_replace_first($search, $replace, $subject, &$pos) {
$pos = strpos($subject, $search);
if ($pos !== false) {
return substr_replace($subject, $replace, $pos, strlen($search));
}else return null;
}
/**
*
* @param string $serialized Serialized string to change
* @param array $params ["search" => "replace"]
* @return string Changed serialisation string.
*/
function changeSerializedNamespace(
string $serialized,
array $params
):string{
$res = $serialized;
foreach($params as $before=>$after){
$correctedLength = strlen($after)-strlen($before);
while($replaced = str_replace_first($before,$after,$res,$pos)){
$res = $replaced;
$tmp = array_reverse(str_split(substr($res,0,$pos)));
if($correctedLength !== 0){
$backward = 0;
$dotsFound = 0;
$nullChar = false;
$lastNumber = [];
while($dotsFound < 2){
if($tmp[$backward] === ':') $dotsFound++;
else if($tmp[$backward] === "\0") $nullChar = true;
else if($tmp[$backward] !== '"') $lastNumber[]=$tmp[$backward];
$backward++;
}
$lastNumber = intval(implode('',array_reverse($lastNumber)));
//start
$st = substr($res,0,$pos-(strlen($lastNumber)+3+($nullChar ? 1 : 0)));
$md = ':'.($lastNumber+$correctedLength).":";
$en = "\"".($nullChar ? "\0" : '').substr($res,$pos);
$res = $st.$md.$en;
}
}
}
return $res;
}
/**
* @param $id
* @return string
*/
function readableId($id):string{
return \wfw\engine\lib\PHP\types\UUID::restoreDashes($id);
}
foreach(array_slice($argv,1) as $path){
if(is_string($path) && is_dir($path)){
(new Autoloader([],$path))->register(false,true);
$engineConf = new FileBasedConf("$path/engine/config/conf.json",$io = new JSONConfIOAdapter());
$siteConf = new FileBasedConf("$path/site/config/conf.json",$io);
$engineConf->merge($siteConf);
$db = new MySQLDBAccess(
$engineConf->getString("server/databases/default/host"),
$dbName = $engineConf->getString("server/databases/default/database"),
$engineConf->getString("server/databases/default/login"),
$engineConf->getString("server/databases/default/password")
);
$aggregates = $db->execute(new RawQuery("SELECT hex(id) as id,type FROM aggregates"))->fetchAll();
$events = $db->execute(new RawQuery("SELECT hex(id) as id,type,data FROM events"))->fetchAll();
$commands = $db->execute(new RawQuery("SELECT hex(id) as id,type,data FROM commands"))->fetchAll();
//$snapshots = $db->execute(new RawQuery("SELECT unhex(id),data FROM snapshots"))->fetchAll();
fwrite(STDOUT,"$dbName data loaded, begin transaction...\n");
$db->beginTransaction();
try{
$compressor = new GZCompressor();
$serializer = new LightSerializer($compressor,new PHPSerializer());
fwrite(STDOUT,count($aggregates)." aggregates to check...\n");
$aggregatesChanged = 0;
foreach($aggregates as $k=>$aggregate){
$type = $aggregate["type"];
if(strpos($type,"wfw\\engine\\package\\users") !== 0){
$aggregate["type"] = str_replace(
"engine\\package",
"modules\\BeeColor",
$type
);
$res = $db->execute((new RawQuery(
"UPDATE aggregates SET type=? WHERE id=unhex(?)"
))->addParams([
$aggregate["type"],
$aggregate["id"]
]));
if($res->rowCount() > 0){
$aggregatesChanged++;
fwrite(
STDOUT,
"Aggregate ".readableId($aggregate["id"])." updated from type $type to ".$aggregate["type"]."\n"
);
}else fwrite(STDOUT,"\e[41mRow not updated.\e[0m\n");
}
}
fwrite(STDOUT,"\e[32mAggregates updated ($aggregatesChanged changes)\e[0m\n");
fwrite(STDOUT,count($commands)." commands to check...\n");
$commandsChanged = 0;
foreach($commands as $k=>$command){
$type = $command["type"];
if(strpos($type,"wfw\\engine\\package\\users") !== 0){
$command["type"] = str_replace(
"engine\\package",
"modules\\BeeColor",
$type
);
$command["data"] = $compressor->compress(
$replaced = changeSerializedNamespace(
$raw = $compressor->decompress($command["data"]),
[
"wfw\\engine\\package\\contact" => "wfw\\modules\\BeeColor\\contact",
"wfw\\engine\\package\\news" => "wfw\\modules\\BeeColor\\news"
]
)
);
$unserialized = $serializer->unserialize($command["data"]);
if($unserialized instanceof \wfw\engine\core\command\ICommand){
$res = $db->execute((new RawQuery(
"UPDATE commands SET type=?, data=? WHERE id=unhex(?)"
))->addParams([
$command["type"],
$command["data"],
$command["id"]
]));
if($res->rowCount() > 0){
$commandsChanged++;
fwrite(STDOUT,
"Aggregate ".readableId($command["id"])
." updated from type $type to ".$command["type"]."\n"
);
}else fwrite(STDOUT,"\e[41mRow not updated.\e[0m\n");
}else throw new Error(
"Unable to load command ".$command["type"]." (previously $type)"
." (id: ".readableId($command["id"]).")"
);
}
}
fwrite(STDOUT,"\e[32mCommands updated ($commandsChanged changes)\e[0m\n");
fwrite(STDOUT,count($events)." events to check...\n");
$eventsChanged = 0;
foreach($events as $k=>$event){
$type = $event["type"];
if(strpos($type,"wfw\\engine\\package\\users") !== 0){
$events["type"] = str_replace(
"engine\\package",
"modules\\BeeColor",
$type
);
$event["data"] = $compressor->compress(
$replaced = changeSerializedNamespace(
$raw = $compressor->decompress($event["data"]),
[
"wfw\\engine\\package\\contact" => "wfw\\modules\\BeeColor\\contact",
"wfw\\engine\\package\\news" => "wfw\\modules\\BeeColor\\news"
]
)
);
$unserialized = $serializer->unserialize($event["data"]);
if($unserialized instanceof \wfw\engine\core\domain\events\IDomainEvent){
$res = $db->execute((new RawQuery(
"UPDATE events SET type=?, data=? WHERE id=unhex(?)"
))->addParams([
$event["type"],
$event["data"],
$event["id"]
]));
if($res->rowCount() > 0){
$eventsChanged++;
fwrite(
STDOUT,
"Aggregate ".readableId($event["id"])." updated from type $type to ".$event["type"]."\n"
);
}else fwrite(STDOUT,"\e[41mRow not updated.\e[0m\n");
}else throw new Error(
"Unable to load event ".$event["type"]." (previously $type)"
." (id: ".readableId($event["id"]).")"
);
}
}
fwrite(STDOUT,"\e[32mEvents updated ($eventsChanged changes)\e[0m\n");
$db->commit();
fwrite(STDOUT,"\e[32m$dbName updated. Please remove msserver snapshots and restart daemons.\e[0m\n");
}catch(Error | Exception $e){
$db->rollBack();
fwrite(STDOUT,"\e[31m$dbName changes discarded: \e[0m\n");
fwrite(STDOUT,"\e[41m$e\e[0m\n");
}
}else{
fwrite(STDOUT,"\e[31m$path is not a valid directory.\e[0m\n");
exit(1);
}
}
......@@ -90,7 +90,6 @@ try{
);
}
}
$server = new MSServer(
$confs->getSocketPath($name),
new MSServerSocketProtocol(),
......
......@@ -159,6 +159,9 @@ final class MSServer {
'streams_to_close' => [ $this->_acquiredLockFile ]
]
);
$this->_logger->log(
"[MSServer] ".$component->getName()." initialized.",ILogger::LOG
);
$component->start();
$this->_logger->log(
"[MSServer] ".$component->getName()." started.",ILogger::LOG
......
......@@ -14,12 +14,6 @@
}
},
"package" : {
"contact" : {
"forms" : {
"INVALID_ID_IN_LIST" : "One of the given ID is invalid !",
"INVALID_ID" : "This ID is invalid !"
}
},
"lang" : {
"forms" : {
"GENERAl_ERROR" : "Invalid data !",
......@@ -37,43 +31,6 @@
"INVALID_COUNTRY_NAME" : "This country name is invalid !"
}
},
"miel" : {
"forms" : {
"GENERAL_ERROR" : "Some fields are invalid !",
"REQUIRED" : "This field is required !",
"TOO_LARGE_KEY" : "The key length can't exceed [$] chars !",
"TOO_LARGE_STRING" : "This field length can't exceed [$] chars !",
"NOT_EMPTY" : "This field can't be empty !"
},
"ERROR" : "Invalid data !"
},
"news" : {
"forms" : {
"GENERAL_ERROR" : "Invalid data !",
"REQUIRED" : "The article ID is required !",
"INVALID_ID_IN_LIST" : "One of the given IDS is invalid !",
"INVALID_ID" : "Invalid ID !",
"INVALID_STRING" : "This isn't a valid string !",
"NOT_EMPTY" : "This field can't be empty !",
"MAX_TITLE_LENGTH" : "The title length can't exceed [$] chars !",
"MAX_CONTENT_LENGTH" : "The content length can't exceed [$] chars !",
"MAX_VISUAL_LENGTH" : "The path to the visual can't exceed [$] chars !",
"EMPTY_OR_BOOLEAN" : "This field must be empty or boolean.",
"INVALID_FIELD" : "This field isn't valid !",
"MUST_BE_EMPTY" : "This field must be empty !",
"INVALID_TITLE" : "Invalid title !",
"INVALID_CONTENT" : "Invalid content !",
"INVALID_VISUAL" : "Invalid visual path !"
},
"ERROR_WRITTEN_EVENT_NOT_RECIEVED" : "An error occured while truing to create the article, please contact the administrator (WrittentEvent not recieved)",
"NOT_FOUND" : "Article not found !",
"OFFLINE" : "This article is offline !",
"REMOVED" : "This article have been removed !",
"service_unavailable" : {
"LIST" : "Unable to fetch articles : service temporarily unavailable. Please try again later.",
"ARTICLE" : "Unable to fetch article : service temporarily unavailable. Please try again later."
}
},
"users" : {
"mail" : {
"subject" : {
......@@ -154,7 +111,7 @@
"INVALID_FILE" : "This file is invalid or too large !",
"INVALID_FILE_NAME" : "Invalid file name.\nA valid file name must contain less thant [$] characters and no /"
},
"STORAGE_QUOTA_EXCEED" : "Insufficient storage quota exceed !",
"STORAGE_QUOTA_EXCEED" : "Insufficient storage : quota exceeded !",
"RENAME_LIST_ERROR" : "Elems to rename list doesn't match new name list !"
}
}
......@@ -208,74 +165,6 @@
}
},
"packages" : {
"news" : {
"CREATE_NEW" : "Create an article",
"EDIT_NEW" : "Edit an article",
"TITLE_NEW" : "Article title",
"VISUAL" : "Article illustration",
"EDIT" : "Edit",
"CREATE" : "Create",
"CANCEL" : "Cancel",
"ARCHIVE" : "Delete",
"WAITING_CREATE" : "Creating article in progress, please wait...",
"WAITING_EDIT" : "Editing article in progress, please wait...",
"ERR_EDIT" : "Can't edit this article !",
"ERR_CREATE" : "Can't create this article !",
"WARN_MUST_SELECT_ONE" : "You must select at least one article !",
"CONFIRM_ARCHIVING" : "Do you really want to delete this article ?",
"WAIT_ARCHIVING" : "Selected articles will be removed, please wait...",
"ERR_ARCHIVING" : "Can't remove selected articles !",
"WAIT_PUT_ONLINE" : "Selected articles will be put online, please wait...",
"ONLINE" : "Online",
"EDATE" : "Edit date",
"CDATE" : "Creation date",
"TITLE" : "Title",
"YES" : "Yes",
"NO" : "No",
"ERR_PUT_ONLINE" : "Can't put online selected articles !",
"WAIT_PUT_OFFLINE" : "Selected articles will be put offline, please wait...",
"ERR_PUT_OFFLINE" : "Can't put offline selected articles !",
"BTN_WRITE" : "Writting a new article",
"BTN_ARCHIVE" : "Delete selected articles",
"BTN_PUT_ONLINE" : "Put online selected articles",
"BTN_PUT_OFFLINE" : "Put offline selected articles",
"WAIT_LOADING_NEWS" : "Loading articles in progress, please wait...",
"ERR_LOADING_NEWS" : "Can't load article list !",
"CHOOSE_PICTURE" : "Choose a picture",
"CHOOSE" : "Choose",
"WARN_ONLY_CHOOSE_ONE" : "You can't select more than one picture !",
"WARN_MUST_SELECT_PICTURE" : "You must select a picture !"
},
"contact" : {
"EDIT_CONTACT" : "See a message",
"LABEL" : "Origin",
"READ" : "Message detail",
"CANCEL" : "Cancel",
"ARCHIVE" : "Delete",
"WARN_MUST_SELECT_ONE" : "You must select at least one message !",
"CONFIRM_ARCHIVING" : "Do you really want to delete those messages ?",
"WAIT_ARCHIVING" : "Selected messages will be deleted, please wait...",
"ERR_ARCHIVING" : "Can't remove selected messages !",
"WAIT_MARK_AS_READ" : "Selected messages will be marked as read, please wait...",
"STATE_DESC" : "State",
"STATE" : "Read",
"NOT_READ" : "Unread",
"CLOSE" : "Close",
"RDATE" : "Read",
"CDATE" : "Recieved",
"CDATE_DESC" : "Receipt date",
"CONTENT" : "Message",
"YES" : "Yes",
"NO" : "No",
"ERR_MARK_AS_READ" : "Can't mark selected messages as read !",
"WAIT_MARK_AS_UNREAD" : "Selected messages will be marked as read, please wait...",
"ERR_MARK_AS_UNREAD" : "Can't mark selected messages as unread !",
"BTN_ARCHIVE" : "Delete selected messages",
"BTN_MARK_AS_READ" : "Mark all selected messages as read",
"BTN_MARK_AS_UNREAD" : "Mark all selected messages as unread",
"WAIT_LOADING_CONTACTS" : "Loading messages list, please wait...",
"ERR_LOADING_CONTACTS" : "Can't load messages list !"
},
"users" : {
"CREATE_USER" : "Create a new user",
"EDIT_USER" : "Edit an user",
......@@ -375,29 +264,6 @@
"WARN_MUST_CHOOSE_ONE" : "You must choose a file !",
"WARN_MUST_SELECT_MEDIA" : "You must choose a media !"
}
},
"miel" : {
"default" : {
"ERROR" : "Can't save your data. </br>Please check you're logged !",
"SAVE_DONE" : "Changes successfully saved !"
},
"medias" : {
"SAVE" : "Save",
"CANCEL" : "Cancel",
"MANAGE" : "Media management",
"WAIT_UPDATE" : "Saving change, please wait...</br>(Once saved, this page will be automatically refreshed)",
"ERROR" : "Can't edit media list !",
"BTN_ADD" : "Add one or more media",
"BTN_REMOVE" : "Delete",
"CHOOSE" : "Choose",
"CHOOSE_MEDIAS" : "Media list",
"WARN_MUST_SELECT_MEDIA" : "You must select at least one media !\n(Allowed medias : [$])",
"IMAGE" : "Pictures",
"VIDEO" : "Videos",
"AUDIO" : "Audios",
"CONFIRM_REMOVE" : "Do you really want to remove selected medias ?",
"WARN_MUST_SELECT_ONE" : "You must select at least one item !"
}
}
}
}
......
......@@ -14,12 +14,6 @@
}
},
"package" : {
"contact" : {
"forms" : {
"INVALID_ID_IN_LIST" : "L'un des identifiants n'est pas valide !",
"INVALID_ID" : "Cet identifiant est invalide !"
}
},
"lang" : {
"forms" : {
"GENERAL_ERROR" : "Les données sont invalides !",
......@@ -37,43 +31,6 @@
"INVALID_COUNTRY_NAME" : "Ce nom de pays n'est pas valide !"
}
},
"miel" : {
"forms" : {
"GENERAL_ERROR" : "Certains champs sont invalides !",
"REQUIRED" : "Ce champ est requis !",
"TOO_LARGE_KEY" : "La clé ne peut pas excéder [$] caractères de long !",
"TOO_LARGE_STRING" : "Ce champ ne peut excéder les [$] caractères de long !",
"NOT_EMPTY" : "Ce champ ne peut pas être vide !"
},
"ERROR" : "Données invalides !"
},
"news" : {
"forms" : {
"GENERAL_ERROR" : "Les données sont invalides !",
"REQUIRED" : "L'identifiant de l'article est requis !",
"INVALID_ID_IN_LIST" : "L'un des identifiants n'est pas valide !",
"INVALID_ID" : "Cet identifiant est invalide !",
"INVALID_STRING" : "Ceci n'est pas une chaîne de caractères valide !",
"NOT_EMPTY" : "Ce champ ne peut pas être vide !",
"MAX_TITLE_LENGTH" : "Le titre d'un article ne peut pas éxcéder les [$] caractères !",
"MAX_CONTENT_LENGTH" : "Le contenu d'un article ne peut pas éxcéder les [$] caractères !",
"MAX_VISUAL_LENGTH" : "Le chemin vers le visuel d'un article ne peut pas éxcéder les [$] caractères !",
"EMPTY_OR_BOOLEAN" : "Ce champ doit être vide ou booléen.",
"INVALID_FIELD" : "Ce champ n'est pas valide !",
"MUST_BE_EMPTY" : "Ce champ doit être vide !",
"INVALID_TITLE" : "Ce titre n'est pas valide !",
"INVALID_CONTENT" : "Ce contenu n'est pas valide !",
"INVALID_VISUAL" : "Le chemin vers ce visuel n'est pas valide !"
},
"ERROR_WRITTEN_EVENT_NOT_RECIEVED" : "Une erreur est survenue lors de la création de l'article. Merci de contacter l'administrateur (WrittentEvent not recieved)",
"NOT_FOUND" : "Cet article n'existe pas !",
"OFFLINE" : "Cet article n'est plus en ligne !",
"REMOVED" : "Cet article a été supprimé !",
"service_unavailable" : {
"LIST" : "Impossible de récupérer les articles : service momentanément indisponible. Merci de réessayer ultérieurement.",
"ARTICLE" : "Impossible de récupérer l'article : service momentanément indisponible. Merci de réessayer ultérieurement."
}
},
"users" : {
"mail" : {
"subject" : {
......@@ -179,7 +136,7 @@
"ERR_RENAME_MOVE" : "L'élement n'a pas pu être renommé ou déplacé !",
"CREATE_FOLDER" : "Créer un dossier",
"WARN_MEDIA_TYPE_ACCEPTED" : "Seuls les fichiers audio mp3, video mp4 et images sont admis !",
"WAITING_SEND_FILE" : "Envoi du fichier en cours, veuillez patienter...",
"WAITING_SEND_FILE" : "Envoi du/des fichier(s) en cours, veuillez patienter...",
"ERR_SERVER_REFUSES_FILE" : "Le serveur n'a pas pu enregistrer votre fichier.\nSeuls les fichiers images, mp3 et mp4 de moins de 300Mo sont acceptés !\nSi votre fichier est valide, c'est que votre espace de stockage est plein, pensez à supprimer les fichiers intuiles.",
"ADD_FILE" : "Ajouter un fichier",
"REMOVE_SELECTED" : "Supprimer le(s) élément(s) séléctionné(s)",
......@@ -208,74 +165,6 @@
}
},
"packages" : {
"news" : {
"CREATE_NEW" : "Créer un article",
"EDIT_NEW" : "Éditer un article",
"TITLE_NEW" : "Titre de l'article",
"VISUAL" : "Visuel de l'article",
"EDIT" : "Éditer",
"CREATE" : "Créer",
"CANCEL" : "Annuler",
"ARCHIVE" : "Supprimer",
"WAITING_CREATE" : "Création de l'article en cours, veuillez patienter...",
"WAITING_EDIT" : "Édition de l'article en cours, veuillez patienter...",
"ERR_EDIT" : "Impossible d'éditer l'article !",
"ERR_CREATE" : "Impossible de créer l'article !",
"WARN_MUST_SELECT_ONE" : "Vous devez séléctionner au moins un article !",
"CONFIRM_ARCHIVING" : "Voulez-vous vraiment supprimer cet article ?",
"WAIT_ARCHIVING" : "Les articles séléctionnés vont être supprimés, veuillez patienter...",
"ERR_ARCHIVING" : "Impossible de supprimer les articles séléctionnés !",
"WAIT_PUT_ONLINE" : "Les articles vont être mis en ligne, veuillez patienter...",
"ONLINE" : "En ligne",
"EDATE" : "Modification",
"CDATE" : "Création",
"TITLE" : "Titre",
"YES" : "Oui",
"NO" : "Non",
"ERR_PUT_ONLINE" : "Impossible de mettre en ligne les articles séléctionnés !",
"WAIT_PUT_OFFLINE" : "Les articles vont être mis hors ligne, veuillez patienter...",
"ERR_PUT_OFFLINE" : "Impossible de mettre hors ligne les articles séléctionnés !",
"BTN_WRITE" : "Écrire un nouvel article",
"BTN_ARCHIVE" : "Supprimer les articles séléctionnés",
"BTN_PUT_ONLINE" : "Mettre en ligne les articles séléctionnés",
"BTN_PUT_OFFLINE" : "Mettre hors ligne les articles séléctionnés",
"WAIT_LOADING_NEWS" : "Chargement des articles en cours, veuillez patienter...",
"ERR_LOADING_NEWS" : "Impossible de charger la liste des articles !",
"CHOOSE_PICTURE" : "Choisir une image",
"CHOOSE" : "Choisir",
"WARN_ONLY_CHOOSE_ONE" : "Vous ne pouvez choisir qu'une seule image !",
"WARN_MUST_SELECT_PICTURE" : "Vous devez selectionner une image ! "
},
"contact" : {
"EDIT_CONTACT" : "Consulter une prise de contact",
"LABEL" : "Provenance",
"READ" : "Consultation d'une prise de contact",
"CANCEL" : "Annuler",
"ARCHIVE" : "Supprimer",
"WARN_MUST_SELECT_ONE" : "Vous devez séléctionner au moins une prise de contact !",
"CONFIRM_ARCHIVING" : "Voulez-vous vraiment supprimer ces prises de contact ?",
"WAIT_ARCHIVING" : "Les prises de contact séléctionnées vont être supprimées, veuillez patienter...",
"ERR_ARCHIVING" : "Impossible de supprimer les prises de contact séléctionnées !",
"WAIT_MARK_AS_READ" : "Les prises de contact vont être marquées comme lues, veuillez patienter...",
"STATE_DESC" : "État",
"STATE" : "Lu",
"NOT_READ" : "Non lu",
"CLOSE" : "Fermer",
"RDATE" : "Lecture",
"CDATE" : "Création",
"CDATE_DESC" : "Date de réception",
"CONTENT" : "Message",
"YES" : "Oui",
"NO" : "Non",
"ERR_MARK_AS_READ" : "Impossible de marquer comme lues les prises de contact séléctionnées !",
"WAIT_MARK_AS_UNREAD" : "Les prises de contact vont être marquées non lues, veuillez patienter...",
"ERR_MARK_AS_UNREAD" : "Impossible de marquer comme non lues les prises de contact séléctionnées !",
"BTN_ARCHIVE" : "Supprimer les prises de contact séléctionnées",
"BTN_MARK_AS_READ" : "Marquer les prises de contact séléctionnées comme lues",
"BTN_MARK_AS_UNREAD" : "Marquer les prises de contact séléctionnées comme non lues",
"WAIT_LOADING_CONTACTS" : "Chargement des prises de contact en cours, veuillez patienter...",
"ERR_LOADING_CONTACTS" : "Impossible de charger la liste des prises de contact !"
},
"users" : {
"CREATE_USER" : "Créer un utilisateur",
"EDIT_USER" : "Modifier un utilisateur",
......@@ -405,29 +294,6 @@
"WARN_MUST_CHOOSE_ONE" : "Vous devez choisir un fichier !",
"WARN_MUST_SELECT_MEDIA" : "Vous devez selectionner un média !"
}
},
"miel" : {
"default" : {
"ERROR" : "Vos données n'ont pas pu être enregistrées. </br>Merci de vérifier que vous êtes bien connecté !",
"SAVE_DONE" : "Vos modifications ont bien été enregistrées !"
},
"medias" : {
"SAVE" : "Enregistrer",
"CANCEL" : "Annuler",
"MANAGE" : "Gestion des médias",
"WAIT_UPDATE" : "Modification en cours, veuillez patienter...</br>(Une fois terminé, la page se rechargera automatiquement)",
"ERROR" : "Impossible de modifier la liste des médias.",
"BTN_ADD" : "Ajouter un ou plusieurs média(s)",
"BTN_REMOVE" : "Supprimer",
"CHOOSE" : "Choisir",
"CHOOSE_MEDIAS" : "Liste des médias",
"WARN_MUST_SELECT_MEDIA" : "Vous devez séléctionner au moins un média !\n(Médias autorisé : [$])",
"IMAGE" : "Images",
"VIDEO" : "Vidéos",
"AUDIO" : "Fichiers audio",
"CONFIRM_REMOVE" : "Voulez-vous vraiment supprimer le(s) média(s) séléctionné(s) ?",
"WARN_MUST_SELECT_ONE" : "Vous devez séléctionner au moins un éléments à supprimer !"
}
}
}
}
......
......@@ -38,6 +38,7 @@ final class ActionRouter implements IActionRouter {
* @return bool
*/
private function enabledPackage(string $package, ?string $location = null):bool{
$package = str_replace("\\","/",$package);
if(is_null($location)) return isset($this->_enabledPackages["site/$package"])