diff --git a/admin/javascript/LeftAndMain.EditForm.js b/admin/javascript/LeftAndMain.EditForm.js index 643de0c54..575f8a8a8 100644 --- a/admin/javascript/LeftAndMain.EditForm.js +++ b/admin/javascript/LeftAndMain.EditForm.js @@ -206,7 +206,9 @@ * Function: onclick */ onclick: function(e) { - this.parents('form').trigger('submit', [this]); + if(!this.is(':disabled')) { + this.parents('form').trigger('submit', [this]); + } e.preventDefault(); return false; } diff --git a/dev/install/config-form.html b/dev/install/config-form.html index 9cfecc056..2b008df00 100644 --- a/dev/install/config-form.html +++ b/dev/install/config-form.html @@ -32,7 +32,7 @@

You aren't currently able to install the software. Please see below for details.
- If you are having problems meeting the requirements, see the server requirements. + If you are having problems meeting the requirements, see the server requirements.

Your php.ini file is located at

@@ -46,7 +46,7 @@ hasWarnings()) { ?>

There are some issues that we recommend you look at before installing, however, you are still able to install the software. -
Please see below for details. If you are having problems meeting the requirements, see the server requirements.

+
Please see below for details. If you are having problems meeting the requirements, see the server requirements.

hasErrors() && !$adminReq->hasErrors()) { ?>

You're ready to install! Please confirm the configuration options below. Install SilverStripe

@@ -71,7 +71,7 @@ showTable(); ?>

- Read more about our server requirements. + Read more about our server requirements.

@@ -178,7 +178,7 @@
> - +
@@ -244,7 +244,7 @@

Theme selection Step 4 of 5

You can change the theme or download another from the SilverStripe website after installation.

Confirm Install Step 5 of 5

diff --git a/dev/install/php5-required.html b/dev/install/php5-required.html index 658caa2da..8db360a21 100644 --- a/dev/install/php5-required.html +++ b/dev/install/php5-required.html @@ -1,7 +1,7 @@ PHP 5.3.2 is required - +
diff --git a/docs/en/changelogs/3.1.0.md b/docs/en/changelogs/3.1.0.md index 86a409ab2..20f531d1f 100644 --- a/docs/en/changelogs/3.1.0.md +++ b/docs/en/changelogs/3.1.0.md @@ -8,4 +8,5 @@ * Deprecated `Profiler` class, use third-party solutions like [xhprof](https://github.com/facebook/xhprof/) * Removed defunct or unnecessary debug GET parameters: `debug_profile`, `debug_memory`, `profile_trace`, `debug_javascript`, `debug_behaviour` - * Removed `Member_ProfileForm`, use `CMSProfileController` instead \ No newline at end of file + * Removed `Member_ProfileForm`, use `CMSProfileController` instead + * `SiteTree::$nested_urls` enabled by default. To disable, call `SiteTree::disable_nested_urls()`. \ No newline at end of file diff --git a/docs/en/howto/simple-contact-form.md b/docs/en/howto/simple-contact-form.md index 6ffe4a47c..f785270ff 100644 --- a/docs/en/howto/simple-contact-form.md +++ b/docs/en/howto/simple-contact-form.md @@ -104,6 +104,7 @@ All forms have some basic validation built in – email fields will only let the The framework comes with a predefined validator called `[api:RequiredFields]`, which performs the common task of making sure particular fields are filled out. Below is the code to add validation to a contact form: + :::php public function Form() { // ... $validator = new RequiredFields('Name', 'Message'); diff --git a/docs/en/index.md b/docs/en/index.md index f62f043fd..447404dbc 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -16,7 +16,7 @@ Please read our [guide to contributing documentation](misc/contributing#writing- ### Level 1: Building your first SilverStripe website - * [Introduction to PHP5 (zend.com)](http://devzone.zend.com/node/view/id/627) + * [Introduction to PHP5 (zend.com)](http://devzone.zend.com/6/php-101--php-for-the-absolute-beginner) * [Tutorials](tutorials) * [1. Building a basic site](tutorials/1-building-a-basic-site) * [2. Extending a basic site](tutorials/2-extending-a-basic-site) @@ -49,7 +49,6 @@ Please read our [guide to contributing documentation](misc/contributing#writing- * [Debugging](topics/debugging) * [Errorhandling](topics/error-handling) * [Testing Guide](topics/testing/): Framework for automated testing like Unittests -* [Built-in Page Controls](reference/built-in-page-controls) * [Execution Pipeline](reference/execution-pipeline): Tracking a request from director to template-rendering * [Recipes/Howtos](howto/) diff --git a/docs/en/reference/dataextension.md b/docs/en/reference/dataextension.md index ace00e9aa..9750558c0 100644 --- a/docs/en/reference/dataextension.md +++ b/docs/en/reference/dataextension.md @@ -27,7 +27,7 @@ class you want to extend. ### Adding a extension to a built-in class Sometimes you will want to add extension to classes that you didn't make. For example, you might want to add the -`[api:ForumRole]` extension to the `[api:Member]` object. +ForumRole extension to the `[api:Member]` object. :::php @@ -38,7 +38,7 @@ For example above we want to override Member with a Custom Member so we would wr :::php // add to mysite/_config.php - Object::add_extension('Member', 'CustomMember'); + Object::add_extension('Member', 'CustomMember'); ## Implementation diff --git a/docs/en/reference/index.md b/docs/en/reference/index.md index 2975c8ba8..3d06b9e89 100644 --- a/docs/en/reference/index.md +++ b/docs/en/reference/index.md @@ -4,7 +4,6 @@ Reference articles complement our auto-generated [API docs](http://api.silverstr * [Advanced templates](advanced-templates): Advanced SilverStripe template syntax * [BBCode](bbcode): Extensible shortcode syntax -* [Built-in page controls](built-in-page-controls): Explains the template syntax and available variables/placeholders * [ComplexTableField](complextablefield): Manage records and their relations inside the CMS * [Database Structure](database-structure): Conventions and best practices for database tables and fields * [DataObject](dataobject): Base class for database records diff --git a/docs/en/reference/templates.md b/docs/en/reference/templates.md index 710cffae3..1fe556dde 100644 --- a/docs/en/reference/templates.md +++ b/docs/en/reference/templates.md @@ -68,7 +68,8 @@ If a variable returns a string, that string will be inserted into the template. the system will attempt to render the object through its forTemplate() method. If the `forTemplate()` method has not been defined, the system will return an error. -SilverStripe provides lots of properties and methods. For more details on built-in page controls and variables, see http://doc.silverstripe.org/framework/en/reference/built-in-page-controls +SilverStripe provides many additional properties on the `SiteTree` class, +see [Page Type Templates](/topics/page-type-templates) for details. ### Escaping diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php index cfa10d4ac..3ec2deb1a 100644 --- a/forms/ComplexTableField.php +++ b/forms/ComplexTableField.php @@ -129,20 +129,20 @@ class ComplexTableField extends TableListField { public $actions = array( 'show' => array( 'label' => 'Show', - 'icon' => 'sapphire/images/show.png', - 'icon_disabled' => 'sapphire/images/show_disabled.png', + 'icon' => 'framework/images/show.png', + 'icon_disabled' => 'framework/images/show_disabled.png', 'class' => 'popuplink showlink', ), 'edit' => array( 'label' => 'Edit', - 'icon' => 'sapphire/images/edit.gif', - 'icon_disabled' => 'sapphire/images/edit_disabled.gif', + 'icon' => 'framework/images/edit.gif', + 'icon_disabled' => 'framework/images/edit_disabled.gif', 'class' => 'popuplink editlink', ), 'delete' => array( 'label' => 'Delete', - 'icon' => 'sapphire/images/delete.gif', - 'icon_disabled' => 'sapphire/images/delete_disabled.gif', + 'icon' => 'framework/images/delete.gif', + 'icon_disabled' => 'framework/images/delete_disabled.gif', 'class' => 'popuplink deletelink', ), ); diff --git a/forms/DateField.php b/forms/DateField.php index 2a0b09732..a412934ff 100644 --- a/forms/DateField.php +++ b/forms/DateField.php @@ -37,7 +37,7 @@ require_once 'Zend/Date.php'; * configuration accordingly. Changing the locale through {@link setLocale()} will not update the * `dateformat` configuration automatically. * - * See http://doc.silverstripe.org/sapphire/en/topics/i18n for more information about localizing form fields. + * See http://doc.silverstripe.org/framework/en/topics/i18n for more information about localizing form fields. * * # Usage * diff --git a/forms/TableListField.php b/forms/TableListField.php index 928cf7366..82196c021 100644 --- a/forms/TableListField.php +++ b/forms/TableListField.php @@ -104,8 +104,8 @@ class TableListField extends FormField { * array( * 'delete' => array( * 'label' => 'Delete', - * 'icon' => 'sapphire/images/delete.gif', - * 'icon_disabled' => 'sapphire/images/delete_disabled.gif', + * 'icon' => 'framework/images/delete.gif', + * 'icon_disabled' => 'framework/images/delete_disabled.gif', * 'class' => 'deletelink', * ) * ) @@ -113,8 +113,8 @@ class TableListField extends FormField { public $actions = array( 'delete' => array( 'label' => 'Delete', - 'icon' => 'sapphire/images/delete.gif', - 'icon_disabled' => 'sapphire/images/delete_disabled.gif', + 'icon' => 'framework/images/delete.gif', + 'icon_disabled' => 'framework/images/delete_disabled.gif', 'class' => 'deletelink' ) ); @@ -238,9 +238,6 @@ class TableListField extends FormField { */ public function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = null, $sourceSort = null, $sourceJoin = null) { - if(FRAMEWORK_DIR != 'sapphire' && !SapphireTest::is_running_test()) { - user_error('TableListField requires FRAMEWORK_DIR to be sapphire.', E_USER_WARNING); - } if($sourceClass) { // You can optionally pass a list @@ -1106,7 +1103,6 @@ JS Requirements::css(CMS_DIR . '/css/typography.css'); Requirements::css(CMS_DIR . '/css/cms_right.css'); } - Requirements::css('sapphire/css/TableListField_print.css'); $this->cachedSourceItems = null; $oldShowPagination = $this->showPagination; diff --git a/forms/gridfield/GridFieldAddExistingAutocompleter.php b/forms/gridfield/GridFieldAddExistingAutocompleter.php index efa0481c1..9956febf8 100644 --- a/forms/gridfield/GridFieldAddExistingAutocompleter.php +++ b/forms/gridfield/GridFieldAddExistingAutocompleter.php @@ -4,7 +4,7 @@ * as defined by the {@link RelationList} passed to the GridField constructor. * Objects can be searched through an input field (partially matching one or more fields). * Selecting from the results will add the object to the relation. - * Often used alongside {@link GridFieldRemoveButton} for detaching existing records from a relatinship. + * Often used alongside {@link GridFieldDeleteAction} for detaching existing records from a relatinship. * For easier setup, have a look at a sample configuration in {@link GridFieldConfig_RelationEditor}. */ class GridFieldAddExistingAutocompleter diff --git a/javascript/TableField.js b/javascript/TableField.js index 1a5ccc30a..d78bf440f 100644 --- a/javascript/TableField.js +++ b/javascript/TableField.js @@ -61,10 +61,10 @@ TableField.prototype = { return false; } - // TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire + // TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?')); if(confirmed){ - img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work + img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work jQuery.ajax({ 'url': link.getAttribute("href"), 'method': 'post', diff --git a/javascript/TableListField.js b/javascript/TableListField.js index 1ab1dc3f7..e2fcbe88d 100644 --- a/javascript/TableListField.js +++ b/javascript/TableListField.js @@ -92,11 +92,11 @@ TableListField.prototype = { var row = Event.findElement(e,"tr"); var self = this; - // TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in sapphire + // TODO ajaxErrorHandler and loading-image are dependent on cms, but formfield is in framework var confirmed = confirm(ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE', 'Are you sure you want to delete this record?')); if(confirmed) { - img.setAttribute("src",'sapphire/images/network-save.gif'); // TODO doesn't work + img.setAttribute("src",'framework/images/network-save.gif'); // TODO doesn't work jQuery.ajax({ 'url': link.getAttribute("href"), 'method': 'post', diff --git a/javascript/i18n.js b/javascript/i18n.js index e039e9657..cb99aa58b 100644 --- a/javascript/i18n.js +++ b/javascript/i18n.js @@ -4,7 +4,7 @@ if(typeof(ss) == 'undefined') ss = {}; * Lightweight clientside i18n implementation. * Caution: Only available after DOM loaded because we need to detect the language * - * For non-i18n stub implementation, see sapphire/javascript/i18nx.js + * For non-i18n stub implementation, see framework/javascript/i18nx.js * * Based on jQuery i18n plugin: 1.0.0 Feb-10-2008 * diff --git a/javascript/i18nx.js b/javascript/i18nx.js index c66886a11..13e97037a 100644 --- a/javascript/i18nx.js +++ b/javascript/i18nx.js @@ -2,7 +2,7 @@ if(typeof(ss) == 'undefined') ss = {}; /** * Stub implementation for ss.i18n code. - * Use instead of sapphire/javascript/i18n.js + * Use instead of framework/javascript/i18n.js * if you want to use any SilverStripe javascript * without internationalization support. */ diff --git a/security/Member.php b/security/Member.php index ae69dc037..66a932968 100644 --- a/security/Member.php +++ b/security/Member.php @@ -1556,7 +1556,7 @@ class Member_Validator extends RequiredFields { } if($id && is_object($member) && $member->ID != $id) { - $uniqueField = $this->form->dataFieldByName($identifierField); + $uniqueField = $this->form->Fields()->dataFieldByName($identifierField); $this->validationError( $uniqueField->id(), _t( diff --git a/tests/core/manifest/ClassLoaderTest.php b/tests/core/manifest/ClassLoaderTest.php index bcf4c6c3b..edcfa2c98 100644 --- a/tests/core/manifest/ClassLoaderTest.php +++ b/tests/core/manifest/ClassLoaderTest.php @@ -2,7 +2,7 @@ /** * Tests for the {@link SS_ClassManifest} class. * - * @package sapphire + * @package framework * @subpackage tests */ class ClassLoaderTest extends SapphireTest { diff --git a/tests/travis/_config.php b/tests/travis/_config.php index 3508957db..87a69ab9a 100644 --- a/tests/travis/_config.php +++ b/tests/travis/_config.php @@ -16,7 +16,4 @@ MySQLDatabase::set_connection_charset('utf8'); // Set the current theme. More themes can be downloaded from // http://www.silverstripe.org/themes/ -SSViewer::set_theme('simple'); - -// Enable nested URLs for this site (e.g. page/sub-page/) -if(class_exists('SiteTree')) SiteTree::enable_nested_urls(); \ No newline at end of file +SSViewer::set_theme('simple'); \ No newline at end of file diff --git a/thirdparty/greybox/greybox.js b/thirdparty/greybox/greybox.js index 80342d984..af33ecca7 100644 --- a/thirdparty/greybox/greybox.js +++ b/thirdparty/greybox/greybox.js @@ -20,9 +20,9 @@ var GB_ONLY_ONE = null; // modified 2006-01-06 by Silverstripe Ltd. try { var theBaseHref = document.getElementsByTagName("base")[0].href; - var GB_IMG_DIR = theBaseHref + "sapphire/thirdparty/greybox/"; + var GB_IMG_DIR = theBaseHref + "framework/thirdparty/greybox/"; } catch(err) { - var GB_IMG_DIR = "sapphire/thirdparty/greybox/"; + var GB_IMG_DIR = "framework/thirdparty/greybox/"; } function GreyBox() { diff --git a/thirdparty/zend_translate_railsyaml/tests/TestHelper.php b/thirdparty/zend_translate_railsyaml/tests/TestHelper.php index ec5e3f966..4706a7b3e 100644 --- a/thirdparty/zend_translate_railsyaml/tests/TestHelper.php +++ b/thirdparty/zend_translate_railsyaml/tests/TestHelper.php @@ -46,7 +46,7 @@ error_reporting(E_ALL | E_STRICT); * distribution. */ $ds = DIRECTORY_SEPARATOR; -$zfRoot = realpath(dirname(dirname(dirname(__FILE__)))) . $ds . 'sapphire' . $ds . 'thirdparty'; +$zfRoot = realpath(dirname(dirname(dirname(__FILE__)))) . $ds . 'framework' . $ds . 'thirdparty'; $zfCoreLibrary = "$zfRoot"; $zfCoreTests = "$zfRoot/tests"; $zfCustomLibrary = realpath(dirname(dirname(__FILE__))) . $ds . 'library';