|
From: <gem...@li...> - 2012-12-30 18:23:53
|
Revision: 1081
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1081&view=rev
Author: matijsdejong
Date: 2012-12-30 18:23:40 +0000 (Sun, 30 Dec 2012)
Log Message:
-----------
Cleaned up dead code
Moved date_default_timezone_set to index.php
Modified Paths:
--------------
trunk/library/changelog.txt
trunk/library/classes/Gems/Loader/LoaderAbstract.php
trunk/library/classes/MUtil/Lazy.php
trunk/library/pre_bootstrap.php
Modified: trunk/library/changelog.txt
===================================================================
--- trunk/library/changelog.txt 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/changelog.txt 2012-12-30 18:23:40 UTC (rev 1081)
@@ -1,3 +1,8 @@
+Important changes from 1.5.7 => 1.6
+============================================================
+Defined constant GEMS_PROJECT_PATH removed from code
+Moved date_default_timezone_set to index.php (can generate warnings)
+
Important changes from 1.5.6 => 1.5.7
============================================================
In LimeSurvey tokenanswerpersistence must be set to true for all surveys
Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php
===================================================================
--- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -37,7 +37,7 @@
/**
* LoaderAbstract is used for classes that chain from Gems_Loader and that thus allow
- * projects to overrule the origingal implementation.
+ * projects to overrule the original implementation.
*
* I.e if you create a class <Project_name>_Model or <Project_name>_Util, that class is loaded
* automatically instead of Gems_Model or Gems_Util. <Project_name>_Model should be a subclass
Modified: trunk/library/classes/MUtil/Lazy.php
===================================================================
--- trunk/library/classes/MUtil/Lazy.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/classes/MUtil/Lazy.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -253,26 +253,3 @@
return new MUtil_Lazy_Stack_EmptyStack($source);
}
}
-
-if (defined('MUTIL_LAZY_FUNCTIONS')) {
-
- function iff($if, $then, $else = null)
- {
- return MUtil_Lazy::iff($if, $then, $else = null);
- }
-
- function iif($if, $then, $else = null)
- {
- return MUtil_Lazy::iif($if, $then, $else = null);
- }
-
- function L($var)
- {
- return MUtil_Lazy::L($var);
- }
-
- function lazy($var)
- {
- return MUtil_Lazy::L($var);
- }
- }
Modified: trunk/library/pre_bootstrap.php
===================================================================
--- trunk/library/pre_bootstrap.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/pre_bootstrap.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -38,15 +38,11 @@
* @subpackage Project
*/
-// GENERAL PHP SETUP
+// PHP ENCODING SETUP
+defined('APPLICATION_ENCODING') || define('APPLICATION_ENCODING', 'UTF-8');
-// Needed for strict on >= PHP 5.1.2
-if (version_compare(phpversion(), '5.1.2') > 0) {
- date_default_timezone_set('Europe/Amsterdam');
-}
+mb_internal_encoding(APPLICATION_ENCODING);
-mb_internal_encoding('UTF-8');
-
// ZEND FRAMEWORK STARTS HERE
/**
@@ -55,18 +51,13 @@
defined('APPLICATION_PATH') || define('APPLICATION_PATH', GEMS_ROOT_DIR . '/application');
/**
- * Compatibility, remove in 1.6
- */
-define('GEMS_PROJECT_PATH', APPLICATION_PATH);
-
-/**
* Set path to Zend Framework
* then to project directory
* then to Gems application directory
*/
set_include_path(
- GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR .
APPLICATION_PATH . '/classes' . PATH_SEPARATOR .
+ GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR .
get_include_path()
//. PATH_SEPARATOR . GEMS_ROOT_DIR . '/library' //Shouldn't be needed, uncomment when neccessary
);
@@ -76,10 +67,6 @@
'Gems' => GEMS_LIBRARY_DIR . '/classes'
);
-// Make sure Lazy is loaded
-// defined('MUTIL_LAZY_FUNCTIONS') || define('MUTIL_LAZY_FUNCTIONS', 1);
-require_once 'MUtil/Lazy.php';
-
// Zend_Application: loads the autoloader
require_once 'Zend/Application.php';
@@ -89,15 +76,12 @@
APPLICATION_PATH . '/configs/application.ini'
);
-// Set up autoload.
-// require_once "Zend/Loader/Autoloader.php";
+// Set up autoload (included by Zend_Application).
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('MUtil_');
$autoloader->registerNamespace('Gems_');
$autoloader->registerNamespace(GEMS_PROJECT_NAME_UC . '_');
-// Zend_Date::setOptions(array('format_type' => 'php'));
-
// MUtil_Model::$verbose = true;
$application->bootstrap()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|