Skip to content

Commit

Permalink
- Prevent a lot of notices about redeines in development mode
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
torinfo committed Oct 23, 2012
1 parent 62408ec commit 1f2c025
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion functions.php
Expand Up @@ -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/';
Expand Down Expand Up @@ -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?");
Expand Down
2 changes: 1 addition & 1 deletion website_code/php/properties/properties_library.php
Expand Up @@ -83,7 +83,7 @@ function properties_display($xerte_toolkits_site,$tutorial_id,$change){

echo "<p>" . PROPERTIES_LIBRARY_PROJECT_MODIFY . " " . $row['date_modified'] . "</p>";

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 "<p>" . PROPERTIES_LIBRARY_PROJECT_LINK . "</p>";

Expand Down

0 comments on commit 1f2c025

Please sign in to comment.