Skip to content
Snippets Groups Projects
Commit 6908c0a8 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Version 3.0.0: Added functions in the rules; added packaging variables;...

Version 3.0.0: Added functions in the rules; added packaging variables; variable substitutions in the name variable
parent 2f360567
No related branches found
No related tags found
No related merge requests found
BASE=rules_shipping BASE=rules_shipping
BASE_ADV=rules_shipping_advanced BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment PLUGINTYPE=vmshipment
VERSION=2.4.7 ZIPBASE=opentools_vm2
VERSION=3.0.0
PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html
PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html
...@@ -10,8 +11,8 @@ TRANSLATIONS=$(call wildcard,language/en*/*.plg_$(PLUGINTYPE)_$(BASE).*ini) ...@@ -10,8 +11,8 @@ TRANSLATIONS=$(call wildcard,language/en*/*.plg_$(PLUGINTYPE)_$(BASE).*ini)
TRANSLATIONS_ADV=$(subst $(BASE),$(BASE_ADV),$(TRANSLATIONS)) TRANSLATIONS_ADV=$(subst $(BASE),$(BASE_ADV),$(TRANSLATIONS))
INDEXFILES=language/index.html $(call wildcard,language/**/index.html) $(call wildcard,elements/*.html) INDEXFILES=language/index.html $(call wildcard,language/**/index.html) $(call wildcard,elements/*.html)
ELEMENTS=$(call wildcard,elements/*.php) ELEMENTS=$(call wildcard,elements/*.php)
ZIPFILE=plg_$(PLUGINTYPE)_$(BASE)_v$(VERSION).zip ZIPFILE=plg_$(ZIPBASE)_$(BASE)_v$(VERSION).zip
ZIPFILE_ADV=plg_$(PLUGINTYPE)_$(BASE_ADV)_v$(VERSION).zip ZIPFILE_ADV=plg_$(ZIPBASE)_$(BASE_ADV)_v$(VERSION).zip
ADVANCEDFILES=$(call wildcard,$(BASE)_advanced.*) ADVANCEDFILES=$(call wildcard,$(BASE)_advanced.*)
......
File added
File added
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl> <authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>2.4.7</version> <version>3.0.0</version>
<description>VMSHIPMENT_RULES_DESC</description> <description>VMSHIPMENT_RULES_DESC</description>
<files> <files>
<filename plugin="rules_shipping">rules_shipping.php</filename> <filename plugin="rules_shipping">rules_shipping.php</filename>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl> <authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>2.4.7</version> <version>3.0.0</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description> <description>VMSHIPMENT_RULES_ADV_DESC</description>
<files> <files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename> <filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
...@@ -853,8 +853,9 @@ class ShippingRule { ...@@ -853,8 +853,9 @@ class ShippingRule {
preg_match_all('/{([A-Za-z0-9_]+)}/', $name, $matches); preg_match_all('/{([A-Za-z0-9_]+)}/', $name, $matches);
foreach ($matches[1] as $m) { foreach ($matches[1] as $m) {
if (isset($vals[$m])) { $var=strtolower($m);
$name = str_replace("{".$m."}", strval($vals[$m]), $name); if (isset($vals[$var])) {
$name = str_replace("{".$m."}", strval($vals[$var]), $name);
} }
} }
return $name; return $name;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment