From a3b35d668abbc0aeb45b16346482de3e035556c6 Mon Sep 17 00:00:00 2001 From: uriel Date: Thu, 25 Sep 2008 07:01:30 +0200 Subject: [PATCH] Enable search for lib files in deprecated paths only if disableDeprecated is not true. --- bin/controller.rc | 10 +++++----- etc/initrc | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index bafa70c..d43a654 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -25,16 +25,16 @@ fn get_lib_file { echo -n lib/$wantedfile # DEPRECATED - if (test -f $sitedir/_inc/$wantedfile) { + if not if (~ $#disableDeprecated 0 && test -f $sitedir/_inc/$wantedfile) { echo -n $sitedir/_inc/$wantedfile dprint DEPRECATION WARNING: Using file in depracted path: $sitedir/_inc/$wantedfile XXX } - if not if(! ~ $masterSite 0 && test -f sites/$masterSite/_inc/$wantedfile) { - echo -n sites/$masterSite/_inc/$wantedfile + if not if(~ $#disableDeprecated 0 && ! ~ $masterSite 0 && test -f sites/$masterSite/_inc/$wantedfile) { + echo -n sites/$masterSite/_inc/$wantedfile dprint DEPRECATION WARNING: Using file in depracted path: sites/$masterSite/_inc/$wantedfile XXX } - if not if (test -f inc/$wantedfile) { - echo -n inc/$wantedfile + if not if (~ $#disableDeprecated 0 && test -f inc/$wantedfile) { + echo -n inc/$wantedfile dprint DEPRECATION WARNING: Using file in depracted path: inc/$wantedfile XXX } } diff --git a/etc/initrc b/etc/initrc index c79dfc5..2082b10 100644 --- a/etc/initrc +++ b/etc/initrc @@ -23,6 +23,9 @@ formatter=md_cache # Enable debugging, to disable set to () debug=true +# Disable deprecated interfaces +disableDeprecated=true + # Default site variables, must be set in initrc.local or _werc/config, only siteTitle is required. #masterSite=cat-v.org # Not required! #siteTitle='cat-v'