Commit Graph

56 Commits

Author SHA1 Message Date
Daniel Hensby
8c8231c03e
NEW Director::host() to determine host name of site 2017-01-31 21:36:04 +00:00
Daniel Hensby
873fd8c5bc
NEW replace _ss_environment.php with .env and environment vars 2017-01-31 20:40:17 +00:00
Damian Mooyman
77d1677304
Fix issue with core/Core.php includes
Fix PHP 5.5 compatibility issue
2016-09-08 16:31:02 +12:00
Damian Mooyman
8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00
Sam Minnee
822f9f4390 Remove unnecessary require calls.
Now that we have PSR-4 compliance on these classes, manual include
statements aren’t needed.
2016-07-11 12:08:17 +12:00
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00
Daniel Hensby
65ba709271 Giving composer more responsibility over autoloading (#5572) 2016-05-24 08:40:05 +12:00
Daniel Hensby
4240785fc7 Check whether run from cli or from web request within cli-script.php (#3984)
* ENHANCEMENT - Improved access determination
* ENHANCEMENT - Added an additional check for the existence of the mod_rewrite module
2016-04-19 18:54:11 +12:00
Robbie Averill
5d2a86db47 Fix #5071 - add newline to default no-arg message in cli-script.php 2016-02-22 13:52:12 +13:00
Damian Mooyman
dff65867cc Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	control/HTTP.php
	control/HTTPResponse.php
	docs/en/05_Contributing/01_Code.md
	forms/CompositeField.php
	forms/FormAction.php
	forms/FormField.php
	forms/InlineFormAction.php
	forms/NumericField.php
	forms/TreeDropdownField.php
	forms/TreeMultiselectField.php
	templates/forms/TreeDropdownField.ss
	tests/core/CoreTest.php
	tests/forms/NumericFieldTest.php
	tests/model/DataDifferencerTest.php
2015-02-20 10:17:19 +13:00
Cam Findlay
2e4bf9abc4 ENHANCEMENT Update sake to reference new docs 2015-01-22 08:49:25 +13:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Simon Welsh
151baeede1 Correct line length and indentation 2013-08-21 18:54:05 +12:00
Ryan Wachtl
0cf6b78b0e Update cli-script.php
Use DIRECTORY_SEPARATOR for cross platform
2013-06-19 10:12:42 -05:00
Ryan Wachtl
7a3fcfc839 Missing directory separators in output of suggested _ss_environment paths 2013-06-19 00:52:12 -05:00
Jeremy Thomerson
6f16034ac8 MINOR: fix a couple minor typos 2013-06-18 18:28:46 +00:00
Sam Minnee
f1e567eb93 NEW: More helpful message for 'sake dev/build' on new envs.
This change alters the no-db message on cli execution to give a bit more of a helpful set-up instruction.
The main motivation for this is so that composer can be set to run dev/build on post-install and post-update.

With that feature added, this will ensure that users installing with composer create-project won't be left
in the dark.

An improvement on this would be a shell script that interactively asked for details to populate this file
with, but one step at a time.
2013-05-30 16:49:43 +12:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13: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
Ingo Schommer
85480142c1 CLI bootstrap: Merge existing $_GET and $_REQUEST data
Necessary to have the <get name="db" /> directive
working in phpunit.xml definitions, which in turns allows
us to use GET parameters to switch the database connection
for running automated tests.
2012-07-04 15:20:08 +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
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08: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
Ingo Schommer
823cae3f32 BUGFIX Setting mbstring defaults in cli-script.php (same as main.php), and default mb_regex_encoding() to UTF-8 as well (in both files) 2011-10-07 14:12:46 +02:00
Sam Minnee
7fbb919ce8 API CHANGE: Introduce DataModel object, as a representation of the project's entire data model, and tie it to $this->model an all DataObjects, Controllers, and RequestHandlers for easy non-static access.
API CHANGE: Add DataList::newObject(), which creates a new object on that DataList.
API CHANGE: RequestHandler::handleRequest() now needs to handle a $model argument, if you override it.
2011-05-01 17:33:02 +12:00
Ingo Schommer
9b29616710 API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure 2011-03-31 09:56:21 +13:00
Ingo Schommer
6e640d1dd6 BUGFIX Setting $_REQUEST['url'] in cli-script.php to emulate normal request processing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115115 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 04:04:06 +00:00
Ingo Schommer
d99caf31f7 BUGFIX Fixed spelling error of $databaseConfig in cli-script.php causing database configuration to not load (thanks aimcom!) (from r107369)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112571 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:23:57 +00:00
Sam Minnee
cb435df6af ENHANCEMENT If no arguments specified for cli-script.php/sake, then provide a friendly message to the user on where to get help (from r100989)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:29:40 +00:00
Sam Minnee
12e62c6329 ENHANCEMENT: Change MySQLDatabase connection to operate in ANSI SQL mode, to ease the transition to DB abstraction
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66399 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-22 03:51:04 +00:00
Sam Minnee
96e2c82075 Removed #! entry from cli-script.php; its unreliable and cli-script.php should be called as 'php cli-script.php' instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 21:25:30 +00:00
Sam Minnee
ba85bc7614 Fixed bug in cli-script argument parsing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63431 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-01 00:55:18 +00:00
Sam Minnee
2af039785c ENHANCEMENT: Updated cli-script handling to be more in line with web calls, and improved Director::setBaseURL() calls.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63321 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-29 23:41:50 +00:00
Ingo Schommer
21944a2e06 BUGFIX Moved *_PATH and PR_*constants from main.php/cli-script.php back to Core.php - was causing problems with installer (directly includes Core.php, but doesn't run through main.php) - see ticket #2867 for improvement suggestions in bootstrapping code to avoid these bugs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63290 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-29 12:33:07 +00:00
Ingo Schommer
a30532becb BUGFIX Moved TEMP_FOLDER define back from main.php/cli-script.php to Core.php, as it was causing problems with the installer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63204 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-28 23:03:28 +00:00
Ingo Schommer
9371f4688b ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:02:38 +00:00
Ingo Schommer
12a73455ac ENHANCEMENT Moved procedural bootstrapping code hiding away between function definitions in Core.php to main.php and cli-script.php (TEMP_FOLDER and PR_* constants)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 13:17:58 +00:00
Sam Minnee
13d55cdfc4 ENHANCEMENT: Updated argument handling for sake
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-25 04:49:01 +00:00
Sam Minnee
0e0fc7a1cb Allow flush=1 to be added as 2nd argument to cli-script.
Removed code that used 2nd arg as HTTP_HOST value, in favour of more robust $_FILE_TO_URL_MAPPING

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60579 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 01:44:43 +00:00
Sam Minnee
0bd9bc4ff8 Merged changes from 2.2.2-assets - everything except the asset refactoring
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-12 02:51:33 +00:00
Sam Minnee
75aa4167bf Set [REQUEST_URI] in cli-script for better error reporting
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60375 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 04:40:37 +00:00
Ingo Schommer
bf9f349210 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 00:03:57 +00:00
Ingo Schommer
0a8f2a67f6 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60228 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 06:18:32 +00:00
Ingo Schommer
016cff2093 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60209 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 04:38:44 +00:00
Sam Minnee
5562885c69 Added flush=1 to test, to ensure that templates are rebuilt
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@55084 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-24 05:57:09 +00:00
Sam Minnee
4fd99b5490 Moved director rules from main.php into _config.php so that they work with cli-script
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54637 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-15 08:45:46 +00:00
Matt Peel
7d13ba7fb8 Reverted geoffm's accidental commit to /open
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 02:10:37 +00:00
Geoff Munn
bf3c09bec6 First post
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50105 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 01:06:39 +00:00
Sam Minnee
1d304a995c Removed notice level errors for better cli-script operation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48146 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-17 01:58:37 +00:00