From 1f2c0256f5e7698646f31fa82daad9b372e33bb4 Mon Sep 17 00:00:00 2001 From: Tom Reijnders Date: Tue, 23 Oct 2012 06:59:19 +0000 Subject: [PATCH] - Prevent a lot of notices about redeines in development mode - Make sure the link and Embed code are visible when Access is 'Other' git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@457 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- functions.php | 11 ++++++++++- website_code/php/properties/properties_library.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 8167966a6a..0ed98c0916 100755 --- a/functions.php +++ b/functions.php @@ -32,7 +32,7 @@ function _debug($string, $up = 0) */ function _load_language_file($file_path) { - + global $development; Zend_Locale::setDefault('en_GB'); $languages = dirname(__FILE__) . '/languages/'; @@ -83,7 +83,16 @@ function _load_language_file($file_path) } } if (file_exists($en_gb_file_path)) { + // prevent notices from redefines of other languages + if ($development) + { + $prev_el = error_reporting(E_ALL ^(E_NOTICE | E_WARNING)); + } require_once($en_gb_file_path); + if ($development) + { + error_reporting($prev_el); + } } else { // stuff will break at this point. //die("Where was $real_file_path?"); diff --git a/website_code/php/properties/properties_library.php b/website_code/php/properties/properties_library.php index 2431497ab9..07b8ed485b 100644 --- a/website_code/php/properties/properties_library.php +++ b/website_code/php/properties/properties_library.php @@ -83,7 +83,7 @@ function properties_display($xerte_toolkits_site,$tutorial_id,$change){ echo "

" . PROPERTIES_LIBRARY_PROJECT_MODIFY . " " . $row['date_modified'] . "

"; - if(template_access_settings(mysql_real_escape_string($_POST['template_id']))=="Public" || template_access_settings(mysql_real_escape_string($_POST['template_id']))=='Password'){ + if(template_access_settings(mysql_real_escape_string($_POST['template_id']))!='Private'){ echo "

" . PROPERTIES_LIBRARY_PROJECT_LINK . "

";