Skip to content

Commit db91525

Browse files
committed
change order of checking to avoid edgecases with the $egVariablesAreVolatile setting in Extension:Variables
add .gitignore file moved some files around for cleanup purposes renamed some files and moved to AutoloadNamespaces instead of AutoloadClasses
1 parent dc92920 commit db91525

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nbproject/

extension.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "VariablesLua",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"author": [
55
"[https://fo-nttax.de Alex Winkler]"
66
],
@@ -20,9 +20,8 @@
2020
"i18n"
2121
]
2222
},
23-
"AutoloadClasses": {
24-
"Liquipedia\\VariablesLua\\Hooks": "VariablesLuaHooks.php",
25-
"Liquipedia\\VariablesLua\\Scribunto_LuaVariablesLuaLibrary": "Scribunto_LuaVariablesLuaLibrary.php"
23+
"AutoloadNamespaces": {
24+
"Liquipedia\\VariablesLua\\": "src/"
2625
},
2726
"Hooks": {
2827
"ScribuntoExternalLibraries": [
File renamed without changes.
File renamed without changes.

Scribunto_LuaVariablesLuaLibrary.php renamed to src/Scribunto_LuaVariablesLuaLibrary.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function register() {
1515
'varexists' => [ $this, 'fn_varexists' ],
1616
];
1717
return $this->getEngine()->registerInterface(
18-
__DIR__ . '/mw.ext.VariablesLua.lua', $lib, []
18+
__DIR__ . '/../lua/mw.ext.VariablesLua.lua', $lib, []
1919
);
2020
}
2121

@@ -46,10 +46,10 @@ public function fn_vardefineecho() {
4646
public function fn_varexists() {
4747
$params = func_get_args();
4848
$parser = $this->getParser();
49-
if ( method_exists( 'ExtVariables', 'pf_varexists' ) ) {
50-
return [ ExtVariables::pf_varexists( $parser, ...$params ) ];
51-
} else {
49+
if ( method_exists( 'ExtVariables', 'pfObj_varexists' ) ) {
5250
return [ ExtVariables::pfObj_varexists( $parser, $parser->getPreprocessor()->newFrame(), $params ) ];
51+
} else {
52+
return [ ExtVariables::pf_varexists( $parser, ...$params ) ];
5353
}
5454
}
5555

0 commit comments

Comments
 (0)