From 8d8c6d80650c21c3194c9f5af126c5818af74529 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 2 Jan 2006 15:52:45 +0000 Subject: [PATCH] merging 6.8.4 changes --- docs/gotcha.txt | 5 --- lib/WebGUI/Help/Macro_If.pm | 20 ------------ lib/WebGUI/i18n/English/Macro_If.pm | 48 ----------------------------- 3 files changed, 73 deletions(-) delete mode 100644 lib/WebGUI/Help/Macro_If.pm delete mode 100644 lib/WebGUI/i18n/English/Macro_If.pm diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 8c45b8f37..917473605 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -9,11 +9,6 @@ save you many hours of grief. 6.9.0 -------------------------------------------------------------------- - * The If macro has been removed because it's far too dangerous and - error prone. If you use the If macro you may continue to use - it at your own risk, maintenance, and support cost, but it - is no longer supported by Plain Black. - * The session system has been replaced by a new object-oriented one, which has caused massive API changes. Please consult migration.txt to bring your custom code up to date with the diff --git a/lib/WebGUI/Help/Macro_If.pm b/lib/WebGUI/Help/Macro_If.pm deleted file mode 100644 index 312fafd4e..000000000 --- a/lib/WebGUI/Help/Macro_If.pm +++ /dev/null @@ -1,20 +0,0 @@ -package WebGUI::Help::Macro_If; - -our $HELP = { - - 'if' => { - title => 'if title', - body => 'if body', - fields => [ - ], - related => [ - { - tag => 'macros using', - namespace => 'Macros' - }, - ] - }, - -}; - -1; diff --git a/lib/WebGUI/i18n/English/Macro_If.pm b/lib/WebGUI/i18n/English/Macro_If.pm deleted file mode 100644 index b5b2e8fe1..000000000 --- a/lib/WebGUI/i18n/English/Macro_If.pm +++ /dev/null @@ -1,48 +0,0 @@ -package WebGUI::i18n::English::Macro_If; - -our $I18N = { - - 'macroName' => { - message => q|If|, - lastUpdated => 1128838656, - }, - - 'eval error' => { - message => q|

If Macro failed: %s

Expression: %s -
Display if true: %s
Display if false: %s|, - lastUpdated => 1134967651, - }, - - 'if title' => { - message => q|If Macro|, - lastUpdated => 1112466408, - }, - - 'if body' => { - message => q| -^If();
-A simple conditional statement (IF/THEN/ELSE) to control layout and messages. -

-Examples:
-Display Happy New Year on 1st January: - ^If('^D("%m%d");' eq '0101' , Happy New Year); -

-Display a message to people on your subnet (192.168.1.*):
-^If('^Env("REMOTE_ADDR");' =~ /^192.168.1/,"Hi co-worker","Hi Stranger"); -

-Display a message to Windows users:
- ^If('^URLEncode("^Env("HTTP_USER_AGENT");");' =~ /windows/i,"Hey... Linux is free !"); -

-Display a message if a user is behind a proxy:
- ^If('^Env("HTTP_VIA");' ne "", You're behind a proxy !, Proxy-free is the best...); -

-Display Good Morning/Afternoon/Evening:
- ^If(^D("%J");<=12,Good Morning,^If(^D("%J");<=18,Good Afternoon,Good evening);); -

- -|, - lastUpdated => 1112466919, - }, -}; - -1;