Commit Graph

148 Commits

Author SHA1 Message Date
Andrew Short
b8a51c3792 Merge branch '3.0' into 3.1 2013-03-19 22:27:09 +11:00
Stephen Shkardoon
9ac104b8c7 BUG $_COOKIES is not un-magic_quotes'd
Added stripslashes_recursively to $_COOKIE (fixes #6309)
2013-03-19 22:13:07 +13:00
Ingo Schommer
e0be520fef Require config manifests in Core.php to avoid upgrading issues
They need to be present for the autoloader to rebuild
the manifest in the first place.
2013-03-14 11:40:00 +01:00
Hamish Friedlander
beafcf38db Don't use Zend_Cache in manifests
The overhead of Zend_Cache in manifests is too high - we don't
need LRU or tags, just somewhere to dump a bunch of data that
persists

You can replace the class used by defining SS_MANIFESTCACHE
to be a class that implements the ManifestCache interface
(we can't use the Config system to set this, as it isn't
initialised yet).
2013-03-14 12:07:07 +13:00
Hamish Friedlander
6b986cb17d Extract statics via code analysis rather than introspection 2013-02-28 09:43:33 +13:00
Daniel Hensby
be78098065 Arbitrary placement of _ss_environment.php in parent folders
Removes hardcoding to three levels
2013-01-21 22:33:54 +01:00
Will Rossiter
683db8dc1d API Explicitly load project template files after modules
Resolves an issue where if not using the themes directory (i.e just a single app folder) you cannot override module templates.
Changes the SS_TemplateManifest constructor with a new $project argument.
2012-12-04 10:47:37 +01:00
Ingo Schommer
c55c7c33f8 Merge branch '3.0'
Conflicts:
	admin/code/CMSProfileController.php
	composer.json
	tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Ingo Schommer
e4d71c2a20 Add Composer autoloader
Mainly to get PHPUnit going as a composer requirement
rather than through PEAR (which is easier to set up).
2012-11-15 13:40:09 +01:00
Sean Harvey
b6870add90 Removing deprecated Core.php functions 2012-11-15 14:43:13 +13:00
Ingo Schommer
a5fd3cf985 BUG Inspect current directory for include_path
This fixes problems where require/include calls rely
on the relative file path, e.g. in i18n.php.

Followup from https://github.com/silverstripe/sapphire/pull/904
2012-11-01 10:10:06 +01:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Sean Harvey
b075fa29c5 Have tiny_mce_gzip.php use local silverstripe-cache folder if available
This is a fix for ticket #7670. Some hosting situations don't
allow write access to the system temp path. tiny_mce_gzip.php is currently
using sys_get_temp_dir() by default, and not using a local silverstripe-cache
folder that may exist in the SilverStripe project.

This change moves the getTempFolder() function into a common file, and
includes that in core/Core.php, as well as thirdparty/tinymce/tiny_mce_gzip.php
so both locations share the same code to work out the temp path.
2012-09-19 16:43:17 +12:00
Sean Harvey
e0beca198b Added missing $tempPath argument (regression from last commit) 2012-09-19 13:30:05 +12:00
Sean Harvey
aa4fa75091 Consistently use the $base argument to getTempFolder() 2012-09-19 13:27:43 +12:00
Sam Minnee
6ef4f9ad3f BUG: Fix increase_memory_limit_to() to reduce installation errors.
increase_memory_limit_to() was broken a while ago, and this causes a lot of problems for people trying to install on environments where the memory limit is 32M.
2012-06-26 12:39:50 +12:00
Sam Minnée
5062bb8ff5 Merge pull request #533 from halkyon/supress_mkdir_temp
BUGFIX Supress mkdir() when attempting to create a temp folder, instead
2012-06-14 16:53:54 -07:00
Sean Harvey
105986392b BUGFIX Supress mkdir() when attempting to create a temp folder, instead
of the variable. This gives a nicer error in the installer.
2012-06-15 11:48:42 +12:00
Marcus Nyeholt
77099ddf9d BUGFIX Moved initialisation of injector to the start of Core.php to make sure that it is initialised correctly before additional code blocks reference it (in particular some of the code introduced by Sam that is triggered during add_extension). 2012-06-14 20:28:20 +10:00
Sam Minnee
114ebb6953 API CHANGE: Don't have any instance caching in singleton(), rely on Injector for this. 2012-06-11 22:41:12 +12:00
Sam Minnee
f65a7c6b21 API CHANGE: Remove dodgy DataObject::destroy() behaviour, opting instead for using PHP5.3's garbage collector. 2012-06-11 22:41:12 +12:00
Sam Minnée
f8921f7c9f Merge pull request #500 from nyeholt/injector_strong_create
RECOMMIT This is a recommit of a previously merged, but reverted, commit...
2012-06-04 15:32:19 -07:00
Marcus Nyeholt
82a1e7d282 MINOR Use injector for creating Member_GroupSet object
MINOR Use injector for creating many many list objects

MINOR Use injector for creating objects from within the DataList

MINOR Use Injector::inst() for creating objects; cannot rely on this->injector being present due to many classes being created with 'new', so use inst() directly

MINOR Remove injector autoset property for now; automatically setting it breaks a few test cases that don't know about it for now, and it's not needed just yet
2012-06-05 01:33:44 +10:00
Marcus Nyeholt
ae7fc6f4d2 RECOMMIT This is a recommit of a previously merged, but reverted, commit. The initial commit had problems when running "tests/all flush=all" when dev/build would re-analyse a bunch of stuff; fixes to address this went into https://github.com/silverstripe/sapphire/pull/487, but for some reason the actual base changes didn't, so I'm re-submitting them in a separate pull.
BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through

CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-06-03 20:41:00 +10:00
Sean Harvey
29e04a1049 Revert "BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through"
This reverts commit 5eaca340b4.
2012-05-23 09:52:57 +12:00
Marcus Nyeholt
5eaca340b4 BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-05-22 19:09:35 +10:00
Marcus Nyeholt
b269badfbe FEATURE: Added dependency injector for managing creation of new objects and their dependencies.
API CHANGE: Pass Object::create() calls to Injector::create().
API CHANGE: Add "RequestProcessor" injection point in Director, that Director will call preRequest() and postRequest() on.
2012-05-18 12:39:57 +12:00
Ingo Schommer
1671b9c65c BUGFIX Checking for mbstring PHP extension support in installer, as it has been a documented installation requirement for a while. Removing method_exists() checks from mbstring usage in core for the same reasons 2012-05-09 10:25:31 +02:00
Ingo Schommer
431b9589b6 BUGFIX Fixed arguments in global _t() function, added check for $returnValue fallback that its not the injection array as second parameter 2012-05-01 22:17:01 +02:00
Julian Seidenberg
523c19e88a BUGFIX: fixing core error that occurs when there are two or more proxy servers in front of the SilverStripe application server 2012-04-27 11:03:05 +02:00
Sean Harvey
5f73643e3f BUGFIX Hardcoding locales in installer, because we can't include i18n
properly, and including core/Core.php is too much.
2012-04-17 11:02:18 +12:00
Sean Harvey
ad2a21cc92 API CHANGE getSysTempDir() is now deprecated, use sys_get_temp_dir()
instead!
2012-04-17 10:53:41 +12:00
Sean Harvey
3ff6002936 ENHANCEMENT Always use sys_get_temp_dir() which will return the system
temp folder for PHP 5.2+, since we don't support older versions we don't
need to patch around this any longer.
2012-04-17 10:53:40 +12:00
Ingo Schommer
d44f6b3e1f MINOR Removed deprecated usage of $priority argument in _t() calls 2012-04-15 17:17:17 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Sean Harvey
6db8f85450 API CHANGE Enable E_STRICT, but include DebugView, Log classes as these are not always guaranteed to be loaded by ClassLoader at the time a strict error is issued. 2012-04-13 13:23:26 +12:00
Sean Harvey
aa14a5191e MINOR Temporarily disabled E_STRICT until we can solve Debug issues with
SS error handler
2012-04-13 12:03:01 +12:00
Sean Harvey
630bfcc823 MINOR error_reporting() now defaults to E_ALL | E_STRICT which means
strict errors are now reported *unless* the site is in live mode (which
supresses everything except fatal errors and warnings)
2012-04-12 12:01:15 +12:00
Sam Minnee
213a08aac7 BUGFIX: Ensure site works if executed in a chrooted enviornment where BASE_PATH is '/'. (#4069) 2012-04-11 10:30:34 +12:00
Sean Harvey
cf014dc56d MINOR Replaced use of deprecated split() with preg_split() and fixed use of "&new Class()" which is deprecated in PHP 5.3
ENHANCEMENT E_DEPRECATED and E_USER_DEPRECATED are now handled as notice level errors in Debug.
2012-03-27 23:16:52 +13:00
Sean Harvey
fec5497873 MINOR Removed old array_fill_keys() replacement for PHP 5.1, which is no longer supported. 2012-03-27 20:09:01 +13:00
Simon Welsh
4be8ab0c62 MINOR Move definition of CMS_DIR and CMS_PATH into cms/_config.php 2012-03-24 11:47:27 +13:00
Simon Welsh
2f7fa90fc4 BUGFIX BASE_PATH was trimming trailing whitespace in paths rather than trailing DIRECTORY_SEPARATORs. 2012-03-13 09:18:12 +13:00
Hamish Friedlander
dff6c638ee ENHANCEMENT: Enable config manifest loading in core 2012-03-09 18:16:45 +13:00
Hamish Friedlander
407913f2cf MINOR: Add workaround for hitting XDebugs fairly conservative nesting level limit 2012-03-06 09:31:56 +13:00
Hamish Friedlander
927dbbe717 API-CHANGE: Global template variables can now be called directly using SSViewer_DataPresenter instead of needing to inherit off ViewableData 2012-03-06 09:11:46 +13:00
Simon Welsh
741f104749 FEATURE Allow setting of constant CUSTOM_INCLUDE_PATH in _ss_enivronment.php which is prepended to the include path 2012-02-11 14:33:55 +13:00
Simon Welsh
10b09420be MINOR Change error reporting level to explicitly exclude values rather than using XOR. 2011-12-17 14:40:58 +13:00
Ingo Schommer
755663a00a BUGFIX Set default mbstring encoding in Core.php instead of main.php and cli-script.php so phpunit binary test runs behave consistently (same as running through TestRunner+cli-script.php). Fixes URLSegmentFilterTest 2011-12-04 13:32:03 +01:00