Skip to content

Commit

Permalink
change order of checking to avoid edgecases with the $egVariablesAreV…
Browse files Browse the repository at this point in the history
…olatile setting in Extension:Variables

add .gitignore file
moved some files around for cleanup purposes
renamed some files and moved to AutoloadNamespaces instead of AutoloadClasses
  • Loading branch information
FO-nTTaX committed Sep 3, 2019
1 parent dc92920 commit db91525
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/nbproject/
7 changes: 3 additions & 4 deletions extension.json
@@ -1,6 +1,6 @@
{
"name": "VariablesLua",
"version": "1.4.0",
"version": "1.4.1",
"author": [
"[https://fo-nttax.de Alex Winkler]"
],
Expand All @@ -20,9 +20,8 @@
"i18n"
]
},
"AutoloadClasses": {
"Liquipedia\\VariablesLua\\Hooks": "VariablesLuaHooks.php",
"Liquipedia\\VariablesLua\\Scribunto_LuaVariablesLuaLibrary": "Scribunto_LuaVariablesLuaLibrary.php"
"AutoloadNamespaces": {
"Liquipedia\\VariablesLua\\": "src/"
},
"Hooks": {
"ScribuntoExternalLibraries": [
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -15,7 +15,7 @@ public function register() {
'varexists' => [ $this, 'fn_varexists' ],
];
return $this->getEngine()->registerInterface(
__DIR__ . '/mw.ext.VariablesLua.lua', $lib, []
__DIR__ . '/../lua/mw.ext.VariablesLua.lua', $lib, []
);
}

Expand Down Expand Up @@ -46,10 +46,10 @@ public function fn_vardefineecho() {
public function fn_varexists() {
$params = func_get_args();
$parser = $this->getParser();
if ( method_exists( 'ExtVariables', 'pf_varexists' ) ) {
return [ ExtVariables::pf_varexists( $parser, ...$params ) ];
} else {
if ( method_exists( 'ExtVariables', 'pfObj_varexists' ) ) {
return [ ExtVariables::pfObj_varexists( $parser, $parser->getPreprocessor()->newFrame(), $params ) ];
} else {
return [ ExtVariables::pf_varexists( $parser, ...$params ) ];
}
}

Expand Down

0 comments on commit db91525

Please sign in to comment.