From e2d9fb9612936ce2c20a3e46239328eb855d7945 Mon Sep 17 00:00:00 2001 From: Patrick Lockley Date: Fri, 2 Mar 2012 20:38:55 +0000 Subject: [PATCH] Suggest leaving development = true in config.php on until dev finished Demo.txt fixed to allow for login bug in preview nesting resolved lots of require_once added to the PHP folder files - suspect more git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@265 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- config.php | 4 +- demo.txt | 11 +-- preview.php | 86 ++++++++++--------- website_code/php/templates/new_template.php | 6 +- website_code/php/templates/sort_templates.php | 4 +- website_code/php/templates/your_templates.php | 6 +- website_code/php/user_library.php | 2 +- 7 files changed, 62 insertions(+), 57 deletions(-) diff --git a/config.php b/config.php index 2fc01137dd..a3135ae44d 100644 --- a/config.php +++ b/config.php @@ -27,7 +27,7 @@ // Change this to FALSE for production sites. global $development; -$development = false; +$development = true; ini_set('error_reporting', 0); if($development) { @@ -54,7 +54,7 @@ function _debug($string, $up = 0) { if(!function_exists('_load_language_file')) { function _load_language_file($file_path) { if(isset($_SESSION['toolkits_language'])) { - $file_path = dirname(__FILE__) . '/languages/' . $_SESSION['toolkits_language'] . $file_path; + $file_path = dirname(__FILE__) . '/languages/' . $_SESSION['toolkits_language'] . "/" . $file_path; } else { // additional logic could use e.g. $_GET['language'] or $_COOKIE['language'] at this point... or something like Zend_Locale and HTTP accept headers... diff --git a/demo.txt b/demo.txt index 5f416f38a4..9fbb0ffc90 100644 --- a/demo.txt +++ b/demo.txt @@ -16,6 +16,7 @@ _load_language_file("/index.inc"); include $xerte_toolkits_site->php_library_path . "login_library.php"; +include $xerte_toolkits_site->php_library_path . "user_library.php"; include $xerte_toolkits_site->php_library_path . "display_library.php"; /* @@ -24,12 +25,11 @@ include $xerte_toolkits_site->php_library_path . "display_library.php"; $_SESSION['toolkits_firstname'] = "Guest"; $_SESSION['toolkits_surname'] = "User 2"; - -if(check_if_first_time($_SESSION['toolkits_logon_username'])){ + $_SESSION['toolkits_logon_username'] = "guest_user"; $mysql_id=database_connect("index.php database connect success","index.php database connect fail"); - $_SESSION['toolkits_logon_username'] = "guestuser2"; + $_SESSION['toolkits_logon_id'] = "guestuser2"; /* * Check to see if this is a users' first time on the site @@ -47,7 +47,6 @@ if(check_if_first_time($_SESSION['toolkits_logon_username'])){ * create a virtual root folder for this user */ -} }else{ @@ -63,8 +62,6 @@ if(check_if_first_time($_SESSION['toolkits_logon_username'])){ } -echo "