Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Bee-color framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jordan Breton
Bee-color framework
Commits
53ad72a1
Commit
53ad72a1
authored
Aug 01, 2019
by
Jordan Breton
✏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActionRouter now try to find modules action and reject not imported packages
parent
f6ba38a5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
112 additions
and
52 deletions
+112
-52
daemons/modelSupervisor/MSServerLauncher.php
daemons/modelSupervisor/MSServerLauncher.php
+3
-3
engine/config/lang/en_US.lang.json
engine/config/lang/en_US.lang.json
+1
-0
engine/config/lang/fr_FR.lang.json
engine/config/lang/fr_FR.lang.json
+2
-1
engine/core/action/ActionRouter.php
engine/core/action/ActionRouter.php
+44
-11
engine/core/action/errors/ActionHandlerNotEnabled.php
engine/core/action/errors/ActionHandlerNotEnabled.php
+8
-0
engine/core/app/WebApp.php
engine/core/app/WebApp.php
+20
-21
engine/core/app/context/DefaultContext.php
engine/core/app/context/DefaultContext.php
+13
-13
engine/core/conf/WFW.php
engine/core/conf/WFW.php
+1
-1
engine/core/response/errors/ResponseHandlerNotEnabled.php
engine/core/response/errors/ResponseHandlerNotEnabled.php
+8
-0
engine/lib/network/http/HTTPStatus.php
engine/lib/network/http/HTTPStatus.php
+3
-0
engine/webroot/JavaScript/plugins/miel/medias.js
engine/webroot/JavaScript/plugins/miel/medias.js
+9
-2
No files found.
daemons/modelSupervisor/MSServerLauncher.php
View file @
53ad72a1
...
...
@@ -12,7 +12,7 @@ use wfw\daemons\modelSupervisor\server\MSServerPool;
use
wfw\daemons\modelSupervisor\server\requestHandler\MSServerRequestHandlerManager
;
use
wfw\daemons\modelSupervisor\socket\protocol\MSServerSocketProtocol
;
use
wfw\engine\core\conf\WFW
ModulesCollector
;
use
wfw\engine\core\conf\WFW
;
use
wfw\engine\core\data\DBAccess\NOSQLDB\kvs\KVSAccess
;
use
wfw\engine\core\data\model\loaders\KVStoreBasedModelLoader
;
use
wfw\engine\lib\cli\argv\ArgvOpt
;
...
...
@@ -66,7 +66,7 @@ try{
if
(
!
is_null
(
$pPath
=
$confs
->
getProjectPath
(
$name
)))
(
new
Autoloader
([],
$pPath
))
->
register
(
false
,
true
);
WFW
ModulesCollector
::
collectModules
();
WFW
::
collectModules
();
if
(
$oldPID
){
sleep
(
10
);
//ugly but let the time for childs to die;...
...
...
@@ -105,7 +105,7 @@ try{
$confs
->
getKVSContainer
(
$name
),
$confs
->
getKVSDefaultStorage
(
$name
)
??
null
),
WFW
ModulesCollector
::
models
()
WFW
::
models
()
),
$confs
->
getUsers
(
$name
),
$confs
->
getGroups
(
$name
),
...
...
engine/config/lang/en_US.lang.json
View file @
53ad72a1
...
...
@@ -4,6 +4,7 @@
"core"
:
{
"app"
:
{
"ACTION_HANDLER_NOT_FOUND"
:
"ActionHandler [[$]] doesn't exists"
,
"DISABLED_MODULE"
:
"Trying to access to a disabled module/package."
,
"INTERNAL_ERROR"
:
"Internal error : [$]"
,
"MUST_BE_LOGGED"
:
"You must be connected."
,
"ACCESS_DENIED"
:
"Access denied"
,
...
...
engine/config/lang/fr_FR.lang.json
View file @
53ad72a1
...
...
@@ -4,8 +4,9 @@
"core"
:
{
"app"
:
{
"ACTION_HANDLER_NOT_FOUND"
:
"L'ActionHandler [[$]] n'existe pas !"
,
"DISABLED_MODULE"
:
"Le package et/ou module auquel vous tentez d'accéder n'est pas activé."
,
"INTERNAL_ERROR"
:
"Erreur interne : [$]"
,
"MUST_BE_LOGGED"
:
"Vous devez être connecté pour effectuer cette action
!
"
,
"MUST_BE_LOGGED"
:
"Vous devez être connecté pour effectuer cette action
.
"
,
"ACCESS_DENIED"
:
"Accès refusé"
,
"INSUFFICIENT_PRIVILEGIES"
:
"Privilèges utilisateur insuffisants."
,
"BAD_CSRF_TOKEN"
:
"Token CSRF invalide."
,
...
...
engine/core/action/ActionRouter.php
View file @
53ad72a1
<?php
namespace
wfw\engine\core\action
;
use
wfw\engine\core\action\errors\ActionHandlerNotEnabled
;
use
wfw\engine\core\action\errors\ActionHandlerNotFound
;
use
wfw\engine\core\action\errors\InvalidActionHandler
;
use
wfw\engine\core\conf\IConf
;
/**
* Router d'actions de base.
*/
final
class
ActionRouter
implements
IActionRouter
{
/** @var string[] $_enabledPackages */
private
$_enabledPackages
;
/** @var IActionHandlerFactory $_factory */
private
$_factory
;
/** @var int $_foldingLimit */
...
...
@@ -16,42 +20,71 @@ final class ActionRouter implements IActionRouter {
/**
* ActionRouter constructor.
*
* @param IActionHandlerFactory $factory Factory pour les ActionHandlers
* @param int $foldingLimit (optionnel defaut : 5) Limite du nombre de sous
* repertoirs de recherche. Si la limite est atteinte, et que le
* handler n'est pas trouvé, l'exception HandlerNotFound sera levée.
* @param IConf $conf
* @param IActionHandlerFactory $factory Factory pour les ActionHandlers
* @param int $foldingLimit (optionnel defaut : 5) Limite du nombre de sous
* repertoirs de recherche. Si la limite est atteinte, et que le
* handler n'est pas trouvé, l'exception HandlerNotFound sera levée.
*/
public
function
__construct
(
IActionHandlerFactory
$factory
,
int
$foldingLimit
=
5
)
{
public
function
__construct
(
IConf
$conf
,
IActionHandlerFactory
$factory
,
int
$foldingLimit
=
5
)
{
$this
->
_enabledPackages
=
array_flip
(
$conf
->
getArray
(
"server/packages"
)
??
[]);
$this
->
_factory
=
$factory
;
$this
->
_foldingLimit
=
$foldingLimit
;
}
/**
* @param string $package
* @param null|string $location
* @return bool
*/
private
function
enabledPackage
(
string
$package
,
?string
$location
=
null
):
bool
{
if
(
is_null
(
$location
))
return
isset
(
$this
->
_enabledPackages
[
"site/
$package
"
])
||
isset
(
$this
->
_enabledPackages
[
"modules/
$package
"
])
||
isset
(
$this
->
_enabledPackages
[
"engine/
$package
"
]);
else
return
isset
(
$this
->
_enabledPackages
[
"
$location
/
$package
"
]);
}
/**
* @param IAction $action Action à router
* @return IActionHandler Handler destinataire de l'action
*/
public
function
findActionHandler
(
IAction
$action
):
IActionHandler
{
$path
=
explode
(
'/'
,
$action
->
getInternalPath
());
if
(
!
is_null
(
$package
=
array_shift
(
$path
))){
$handlerClass
=
"package
\\
$package
\\
handlers
\\
action"
;
if
(
!
empty
(
$this
->
_enabledPackages
)
&&
!
is_null
(
$package
=
array_shift
(
$path
))){
$handlerClass
=
"handlers
\\
action"
;
$modulePackage
=
$package
;
$moduleHandlerClass
=
$handlerClass
;
$handlerFound
=
false
;
$folding
=
0
;
while
(
!
is_null
(
$part
=
array_shift
(
$path
))
&&
$folding
<
$this
->
_foldingLimit
){
$handlerClass
.
=
"
\\
"
;
$tmpName
=
ucfirst
(
$part
)
.
"Handler"
;
if
(
class_exists
(
"wfw
\\
site
\\
"
.
$handlerClass
.
$tmpName
)){
$handlerClass
=
"wfw
\\
site
\\
"
.
$handlerClass
.
$tmpName
;
if
(
class_exists
(
"wfw
\\
site
\\
package
\\
$package
\\
"
.
$handlerClass
.
$tmpName
)){
$handlerClass
=
"wfw
\\
site
\\
package
\\
$package
\\
"
.
$handlerClass
.
$tmpName
;
$handlerFound
=
true
;
break
;
}
else
if
(
class_exists
(
"wfw
\\
engine
\\
"
.
$handlerClass
.
$tmpName
)){
$handlerClass
=
"wfw
\\
engine
\\
"
.
$handlerClass
.
$tmpName
;
}
else
if
(
class_exists
(
"wfw
\\
modules
\\
$modulePackage
\\
"
.
$moduleHandlerClass
.
$tmpName
)){
$handlerClass
=
"wfw
\\
modules
\\
$modulePackage
\\
"
.
$moduleHandlerClass
.
$tmpName
;
$handlerFound
=
true
;
break
;
}
else
if
(
class_exists
(
"wfw
\\
engine
\\
package
\\
$package
\\
"
.
$handlerClass
.
$tmpName
)){
$handlerClass
=
"wfw
\\
engine
\\
package
\\
$package
\\
"
.
$handlerClass
.
$tmpName
;
$handlerFound
=
true
;
break
;
}
else
{
$handlerClass
.
=
$part
;
if
(
$this
->
enabledPackage
(
$modulePackage
,
"modules"
))
$moduleHandlerClass
.
=
"
\\
$part
\\
"
;
else
$modulePackage
.
=
"
\\
$part
"
;
}
}
if
(
$handlerFound
&&
!
(
new
\
ReflectionClass
(
$handlerClass
))
->
isAbstract
()){
if
(
!
$this
->
enabledPackage
(
$package
)
&&
!
$this
->
enabledPackage
(
$modulePackage
,
"modules"
))
{
throw
new
ActionHandlerNotEnabled
(
"Action found :
$handlerClass
, but the '
$package
' package or the module '
$modulePackage
' haven't been enabled. "
.
"Please check your project configuration and add this package to the 'server/packages' list."
);
}
try
{
return
$this
->
_factory
->
create
(
$handlerClass
,
...
...
engine/core/action/errors/ActionHandlerNotEnabled.php
0 → 100644
View file @
53ad72a1
<?php
namespace
wfw\engine\core\action\errors
;
/**
* Thrown when an action have been found, but it's package were not enabled.
*/
final
class
ActionHandlerNotEnabled
extends
ActionResolutionFailure
{}
\ No newline at end of file
engine/core/app/WebApp.php
View file @
53ad72a1
<?php
namespace
wfw\engine\core\app
;
use
wfw\engine\core\action\errors\ActionHandlerNotEnabled
;
use
wfw\engine\core\action\errors\ActionResolutionFailure
;
use
wfw\engine\core\notifier\Message
;
use
wfw\engine\core\response\responses\ErrorResponse
;
...
...
@@ -50,26 +51,25 @@ final class WebApp {
$actionRouter
=
$this
->
_context
->
getActionRouter
();
$handler
=
$actionRouter
->
findActionHandler
(
$action
);
$response
=
$handler
->
handle
(
$action
);
}
catch
(
ActionHandlerNotEnabled
$e
){
$response
=
new
ErrorResponse
(
HTTPStatus
::
FORBIDDEN
,
$translator
->
get
(
"server/engine/core/app/DISABLED_MODULE"
)
);
}
catch
(
ActionResolutionFailure
$e
){
if
(
$action
->
getRequest
()
->
isAjax
()){
$response
=
new
ErrorResponse
(
500
,
$translator
->
getTranslateAndReplace
(
"server/engine/core/app/ACTION_HANDLER_NOT_FOUND"
,
null
,
$action
->
getInternalPath
()
)
);
}
else
{
$response
=
new
StaticResponse
(
$action
);
}
if
(
$action
->
getRequest
()
->
isAjax
())
$response
=
new
ErrorResponse
(
HTTPStatus
::
INTERNAL_SERVER_ERROR
,
$translator
->
getAndReplace
(
"server/engine/core/app/ACTION_HANDLER_NOT_FOUND"
,
$action
->
getInternalPath
()
)
);
else
$response
=
new
StaticResponse
(
$action
);
}
catch
(
\
Error
$e
){
$response
=
new
ErrorResponse
(
500
,
$translator
->
getTranslateAndReplace
(
"server/engine/core/app/INTERNAL_ERROR"
,
null
,
$e
HTTPStatus
::
INTERNAL_SERVER_ERROR
,
$translator
->
getAndReplace
(
"server/engine/core/app/INTERNAL_ERROR"
,
$e
)
);
}
...
...
@@ -77,7 +77,7 @@ final class WebApp {
if
(
is_null
(
$permission
->
getResponse
())){
if
(
$action
->
getRequest
()
->
isAjax
()){
$response
=
new
ErrorResponse
(
100
,
HTTPStatus
::
FORBIDDEN
,
$translator
->
getAndTranslate
(
"server/engine/core/app/MUST_BE_LOGGED"
)
...
...
@@ -109,10 +109,9 @@ final class WebApp {
$handler
=
$responseRouter
->
findResponseHandler
(
$action
,
$response
);
}
catch
(
ResponseResolutionFailure
$e
){
$response
=
new
ErrorResponse
(
404
,
$translator
->
get
Translate
AndReplace
(
HTTPStatus
::
NOT_FOUND
,
$translator
->
getAndReplace
(
"server/engine/core/app/404_NOT_FOUND"
,
null
,
$action
->
getInternalPath
()
)
);
...
...
engine/core/app/context/DefaultContext.php
View file @
53ad72a1
...
...
@@ -24,7 +24,7 @@ use wfw\engine\core\command\security\CommandSecurityCenter;
use
wfw\engine\core\command\security\ICommandSecurityCenter
;
use
wfw\engine\core\command\security\rules\CommandAccessRulesCollector
;
use
wfw\engine\core\command\SynchroneCommandBus
;
use
wfw\engine\core\conf\WFW
ModulesCollector
;
use
wfw\engine\core\conf\WFW
;
use
wfw\engine\core\data\DBAccess\NOSQLDB\msServer\IMSServerAccess
;
use
wfw\engine\core\data\DBAccess\NOSQLDB\msServer\MSServerWriterAccess
;
use
wfw\engine\core\data\DBAccess\SQLDB\IDBAccess
;
...
...
@@ -520,19 +520,19 @@ class DefaultContext implements IWebAppContext {
protected
function
loadModules
():
void
{
$modules
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
MODULES
]);
if
(
is_null
(
$modules
)){
WFW
ModulesCollector
::
collectModules
();
WFW
::
collectModules
();
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
MODULES
],
WFW
ModulesCollector
::
modules
()
WFW
::
modules
()
);
}
else
WFW
ModulesCollector
::
restoreModulesFromCache
(
$modules
);
}
else
WFW
::
restoreModulesFromCache
(
$modules
);
}
/**
* @return array
*/
protected
function
getDi
():
array
{
return
WFW
ModulesCollector
::
di
();
return
WFW
::
di
();
}
/**
...
...
@@ -541,7 +541,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getDomainEventListeners
():
array
{
$listeners
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
DOMAIN_EVENT_LISTENERS
]);
if
(
is_null
(
$listeners
)){
$listeners
=
WFW
ModulesCollector
::
domainEventListeners
();
$listeners
=
WFW
::
domainEventListeners
();
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
DOMAIN_EVENT_LISTENERS
],
$listeners
);
}
return
$listeners
;
...
...
@@ -553,7 +553,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getCommandHandlers
():
array
{
$handlers
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
COMMAND_HANDLERS
]);
if
(
is_null
(
$handlers
)){
$handlers
=
WFW
ModulesCollector
::
commandHandlers
();
$handlers
=
WFW
::
commandHandlers
();
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
DOMAIN_EVENT_LISTENERS
],
$handlers
);
}
return
$handlers
;
...
...
@@ -565,7 +565,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getConfs
():
array
{
$confFiles
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
CONF_FILES
]);
if
(
is_null
(
$confFiles
)){
$confFiles
=
WFW
ModulesCollector
::
confs
();
$confFiles
=
WFW
::
confs
();
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
CONF_FILES
],
$confFiles
);
}
return
$confFiles
;
...
...
@@ -578,7 +578,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getAccessRules
(
?array
$access
=
null
):
array
{
$rules
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
ACCESS_RULES
]);
if
(
is_null
(
$rules
)){
$rules
=
WFW
ModulesCollector
::
accessPolicy
(
!
empty
(
$access
)
?
$access
:
null
);
$rules
=
WFW
::
accessPolicy
(
!
empty
(
$access
)
?
$access
:
null
);
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
ACCESS_RULES
],
$rules
);
}
return
$rules
;
...
...
@@ -591,7 +591,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getCommandRules
(
?array
$commands
=
null
):
array
{
$rules
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
COMMAND_RULES
]);
if
(
is_null
(
$rules
)){
$rules
=
WFW
ModulesCollector
::
commandsPolicy
(
!
empty
(
$commands
)
?
$commands
:
null
);
$rules
=
WFW
::
commandsPolicy
(
!
empty
(
$commands
)
?
$commands
:
null
);
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
COMMAND_RULES
],
$rules
);
}
return
$rules
;
...
...
@@ -604,7 +604,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getQueryRules
(
?array
$queries
=
null
):
array
{
$rules
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
QUERY_RULES
]);
if
(
is_null
(
$rules
)){
$rules
=
WFW
ModulesCollector
::
queriesPolicy
(
!
empty
(
$queries
)
?
$queries
:
null
);
$rules
=
WFW
::
queriesPolicy
(
!
empty
(
$queries
)
?
$queries
:
null
);
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
QUERY_RULES
],
$rules
);
}
return
$rules
;
...
...
@@ -617,7 +617,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getHooks
(
?array
$hooks
=
null
):
array
{
$hooksPolicy
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
HOOKS
]);
if
(
is_null
(
$hooksPolicy
)){
$hooksPolicy
=
WFW
ModulesCollector
::
hooksPolicy
(
!
empty
(
$hooks
)
?
$hooks
:
null
);
$hooksPolicy
=
WFW
::
hooksPolicy
(
!
empty
(
$hooks
)
?
$hooks
:
null
);
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
HOOKS
],
$hooksPolicy
);
}
return
$hooksPolicy
;
...
...
@@ -630,7 +630,7 @@ class DefaultContext implements IWebAppContext {
protected
function
getLangs
(
array
$langs
):
array
{
$lc
=
$this
->
getCacheSystem
()
->
get
(
self
::
CACHE_KEYS
[
self
::
LANGS
]);
if
(
is_null
(
$lc
)){
$langs
=
WFW
ModulesCollector
::
langs
(
$langs
);
$langs
=
WFW
::
langs
(
$langs
);
$this
->
getCacheSystem
()
->
set
(
self
::
CACHE_KEYS
[
self
::
LANGS
],
$langs
);
}
else
$langs
=
$lc
;
return
$langs
;
...
...
engine/core/conf/WFW
ModulesCollector
.php
→
engine/core/conf/WFW.php
View file @
53ad72a1
...
...
@@ -8,7 +8,7 @@ use wfw\engine\core\security\WFWDefaultSecurityPolicy;
/**
* Base descriptor
*/
final
class
WFW
ModulesCollector
extends
ModuleDescriptor
implements
IAppModulesCollector
,
ISecurityPolicy
{
final
class
WFW
extends
ModuleDescriptor
implements
IAppModulesCollector
,
ISecurityPolicy
{
private
static
$_modules
=
[];
private
static
$_collected
=
false
;
...
...
engine/core/response/errors/ResponseHandlerNotEnabled.php
0 → 100644
View file @
53ad72a1
<?php
namespace
wfw\engine\core\response\errors
;
/**
* Thrown when the module/package that owns a response havn't been enabled in configurations.
*/
final
class
ResponseHandlerNotEnabled
extends
ResponseResolutionFailure
{}
\ No newline at end of file
engine/lib/network/http/HTTPStatus.php
View file @
53ad72a1
...
...
@@ -24,6 +24,9 @@ final class HTTPStatus extends PHPEnum {
public
const
MULTI_STATUS
=
207
;
public
const
ALREADY_REPORTED
=
208
;
public
const
IM_USED
=
226
;
//non-standard
public
const
DONE
=
249
;
public
const
DATA
=
250
;
//300
public
const
MUTLIPLE_CHOICES
=
300
;
...
...
engine/webroot/JavaScript/plugins/miel/medias.js
View file @
53ad72a1
...
...
@@ -48,7 +48,7 @@ wfw.define("plugins/miel/medias",function($params){
[
'
title
'
,
'
description
'
].
forEach
(
$e
=>
{
if
(
!
(
$e
in
$params
.
editable
))
$params
.
editable
[
$e
]
=
false
;
});
let
$uniques
=
{};
wfw
.
dom
.
appendTo
(
$window
,
wfw
.
dom
.
appendTo
(
wfw
.
dom
.
create
(
"
div
"
,{
className
:
"
head
"
}),
wfw
.
dom
.
appendTo
(
wfw
.
dom
.
create
(
"
div
"
,{
className
:
"
title
"
}),
...
...
@@ -71,9 +71,15 @@ wfw.define("plugins/miel/medias",function($params){
wfw
.
dom
.
create
(
"
button
"
,{
innerHTML
:
$lstr
(
'
SAVE
'
),
on
:{
click
:()
=>
{
$update
(
$node
.
getAttribute
(
'
data-miel_key
'
),
Array
.
from
(
$o
.
list
.
querySelectorAll
(
"
.item
"
)).
map
(
$n
=>
$compileListNode
(
$n
)),
Array
.
from
(
$o
.
list
.
querySelectorAll
(
"
.item
"
)).
map
(
$n
=>
$compileListNode
(
$n
)).
filter
(
$i
=>
{
if
(
!
(
$i
.
file
in
$uniques
)){
$uniques
[
$i
.
file
]
=
true
;
return
true
;
}
else
return
false
;
}),
$window
);
$uniques
=
{};
$window
.
parentNode
.
removeChild
(
$window
)
}}}),
wfw
.
dom
.
create
(
"
button
"
,{
innerHTML
:
$lstr
(
'
CANCEL
'
),
on
:{
...
...
@@ -236,6 +242,7 @@ wfw.define("plugins/miel/medias",function($params){
);
};
let
$update
=
(
$k
,
$arr
,
$window
)
=>
{
console
.
log
(
$arr
);
let
$loader
=
$displayLoader
(
$lstr
(
"
WAIT_UPDATE
"
),
$window
.
querySelector
(
"
.body
"
));
wfw
.
network
.
wfwAPI
(
wfw
.
webroot
+
"
miel/update
"
,{
type
:
"
POST
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment