From 3a6341a25113be0f65f96a1317543e583bf318d0 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sat, 24 Mar 2012 16:38:57 +1300 Subject: [PATCH] API-CHANGE sapphire folder can now be renamed. --- README.md | 8 +- _config.php | 6 +- _register_database.php | 2 +- admin/_config.php | 5 +- admin/code/LeftAndMain.php | 86 +++++++++---------- admin/code/MemberImportForm.php | 4 +- admin/code/ModelAdmin.php | 2 +- admin/code/SecurityAdmin.php | 18 ++-- admin/javascript/LeftAndMain.Tree.js | 6 +- admin/scss/_forms.scss | 4 +- admin/templates/Includes/CMSLoadingScreen.ss | 4 +- admin/templates/LeftAndMain.ss | 2 +- admin/tests/LeftAndMainTest.php | 2 +- admin/tests/ModelAdminTest.php | 2 +- admin/tests/SecurityAdminTest.php | 2 +- api/DataFormatter.php | 4 +- api/RestfulServer.php | 4 +- cli-script.php | 4 +- conf/ConfigureFromEnv.php | 4 +- control/Controller.php | 2 +- control/Director.php | 2 +- control/NullHTTPRequest.php | 4 +- control/RequestHandler.php | 4 +- core/ClassInfo.php | 2 +- core/Core.php | 51 ++++++----- core/Object.php | 2 +- core/manifest/ClassManifest.php | 4 +- css/FileIFrameField.css | 4 +- css/HasManyFileField.css | 12 +-- dev/BuildTask.php | 1 - dev/BulkLoader.php | 2 +- dev/DevelopmentAdmin.php | 4 +- dev/FunctionalTest.php | 2 +- dev/JSTestRunner.php | 2 +- dev/SapphireInfo.php | 16 +--- dev/SapphireREPL.php | 4 +- dev/TaskRunner.php | 4 +- dev/TestRunner.php | 15 ++-- dev/install/config-form.html | 8 +- dev/install/install.php | 5 +- dev/install/install.php5 | 57 +++++------- dev/phpunit/PhpUnitWrapper.php | 20 ++++- dev/phpunit/PhpUnitWrapper_3_4.php | 15 +++- dev/phpunit/PhpUnitWrapper_3_5.php | 12 ++- email/Email.php | 2 +- email/Mailer.php | 2 +- filesystem/File.php | 12 +-- filesystem/Folder.php | 2 +- forms/AjaxUniqueTextField.php | 4 +- forms/CheckboxSetField.php | 5 +- forms/ComplexTableField.php | 24 +++--- forms/ConfirmedPasswordField.php | 6 +- forms/DateField.php | 4 +- forms/DatetimeField.php | 2 +- forms/FileIFrameField.php | 16 ++-- forms/Form.php | 2 +- forms/HasManyComplexTableField.php | 8 +- forms/HtmlEditorConfig.php | 2 - forms/HtmlEditorField.php | 8 +- forms/ImageFormAction.php | 4 +- forms/InlineFormAction.php | 6 +- forms/NullableField.php | 4 +- forms/SelectionGroup.php | 6 +- forms/TabSet.php | 12 +-- forms/TableField.php | 12 +-- forms/TableListField.php | 17 ++-- forms/ToggleCompositeField.php | 6 +- forms/ToggleField.php | 6 +- forms/TreeDropdownField.php | 14 +-- forms/TreeMultiselectField.php | 16 ++-- forms/UploadField.php | 14 +-- forms/Validator.php | 2 +- forms/gridfield/GridField.php | 10 +-- forms/gridfield/GridFieldPrintButton.php | 2 +- i18n/i18n.php | 6 +- i18n/i18nTextCollector.php | 6 +- lang/ar_SA.php | 2 +- lang/bg_BG.php | 2 +- lang/ca_AD.php | 2 +- lang/cs_CZ.php | 2 +- lang/da_DK.php | 2 +- lang/de_DE.php | 2 +- lang/en_GB.php | 2 +- lang/eo_XX.php | 2 +- lang/es_419.php | 2 +- lang/es_ES.php | 2 +- lang/es_MX.php | 2 +- lang/et_EE.php | 2 +- lang/fi_FI.php | 2 +- lang/fr_FR.php | 2 +- lang/he_IL.php | 2 +- lang/hr_HR.php | 2 +- lang/hu_HU.php | 2 +- lang/id_ID.php | 2 +- lang/it_IT.php | 2 +- lang/ja_JP.php | 2 +- lang/lc_XX.php | 2 +- lang/lt_LT.php | 2 +- lang/lv_LV.php | 2 +- lang/ms_MY.php | 2 +- lang/nb_NO.php | 2 +- lang/ne_NP.php | 2 +- lang/nl_NL.php | 2 +- lang/pl_PL.php | 2 +- lang/pt_BR.php | 2 +- lang/pt_PT.php | 2 +- lang/ru_RU.php | 2 +- lang/si_LK.php | 2 +- lang/sk_SK.php | 2 +- lang/sr_RS.php | 2 +- lang/sv_SE.php | 2 +- lang/tr_TR.php | 2 +- lang/zh_CN.php | 2 +- lang/zh_TW.php | 2 +- main.php | 8 +- model/MySQLDatabase.php | 2 +- model/fieldtypes/HTMLText.php | 4 +- parsers/BBCodeParser.php | 7 +- sake | 19 ++-- scss/FileIFrameField.scss | 6 +- scss/HasManyFileField.scss | 12 +-- security/Group.php | 4 +- security/Member.php | 2 +- security/PermissionCheckboxSetField.php | 4 +- security/Security.php | 10 +-- static-main.php | 2 +- tasks/ScheduledTask.php | 12 +-- templates/CodeViewer.ss | 4 +- templates/ComplexTableField.ss | 6 +- templates/ComplexTableField_popup.ss | 4 +- .../Includes/TableListField_PageControls.ss | 18 ++-- templates/RelationComplexTableField.ss | 2 +- templates/SapphireInfo.ss | 8 +- templates/TableField.ss | 6 +- templates/TableListField.ss | 4 +- templates/TestViewer.ss | 4 +- templates/forms/ToggleCompositeField.ss | 6 +- tests/FullTestSuite.php | 12 +-- tests/PhpSyntaxTest.php | 4 +- tests/bootstrap.php | 15 ++-- tests/control/DirectorTest.php | 4 +- tests/core/ClassInfoTest.php | 4 +- tests/core/CoreTest.php | 4 +- .../manifest/NamespacedClassManifestTest.php | 58 ++++++------- .../TokenisedRegularExpressionTest.php | 6 +- .../module/classes/ClassA.php | 4 +- .../module/classes/ClassB.php | 4 +- .../module/classes/ClassC.php | 4 +- .../module/classes/ClassD.php | 4 +- .../module/classes/ClassE.php | 4 +- .../module/classes/ClassF.php | 4 +- .../module/classes/ClassG.php | 4 +- .../module/classes/ClassH.php | 4 +- .../module/interfaces/InterfaceA.php | 4 +- tests/dev/CsvBulkLoaderTest.php | 2 +- tests/dev/DeprecationTest.php | 10 +-- tests/forms/LookupFieldTest.php | 4 +- .../GridFieldAddExistingAutocompleterTest.php | 2 +- .../gridfield/GridFieldDeleteActionTest.php | 4 +- .../gridfield/GridFieldEditButtonTest.php | 4 +- tests/i18n/i18nTest.php | 2 +- tests/i18n/i18nTextCollectorTest.php | 2 +- tests/model/DataDifferencerTest.php | 2 +- tests/model/DataDifferencerTest.yml | 6 +- tests/salad/step_definitions/db-fixture.rb | 32 ------- .../RequirementsTest_Conditionals.ss | 14 +-- tests/testing/YamlFixtureTest.php | 6 +- tests/view/SSViewerTest.php | 12 +-- thirdparty/behaviour/README.md | 6 +- thirdparty/prototype/prototype.js | 4 +- view/GenericTemplateGlobalProvider.php | 33 +++++++ view/Requirements.php | 16 ++-- view/SSTemplateParser.php.inc | 2 +- view/TemplateGlobalProvider.php | 2 +- 174 files changed, 618 insertions(+), 585 deletions(-) delete mode 100644 tests/salad/step_definitions/db-fixture.rb create mode 100644 view/GenericTemplateGlobalProvider.php diff --git a/README.md b/README.md index 8e97959e3..828b5de65 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ Requires a [`silverstripe-installer`](http://github.com/silverstripe/silverstrip ## Installation ## -See [installation on different platforms](http://doc.silverstripe.org/sapphire/en/installation/), -and [installation from source](http://doc.silverstripe.org/sapphire/en/installation/from-source). +See [installation on different platforms](http://doc.silverstripe.org/framework/en/installation/), +and [installation from source](http://doc.silverstripe.org/framework/en/installation/from-source). ## Links ## - * [Requirements](http://doc.silverstripe.org/sapphire/en/installation/server-requirements) - * [Changelogs](http://doc.silverstripe.org/sapphire/en/changelogs/) + * [Requirements](http://doc.silverstripe.org/framework/en/installation/server-requirements) + * [Changelogs](http://doc.silverstripe.org/framework/en/changelogs/) * [Bugtracker](http://open.silverstripe.org) * [Forums](http://silverstripe.org/forums) * [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev) diff --git a/_config.php b/_config.php index ccd191568..992cbc707 100644 --- a/_config.php +++ b/_config.php @@ -1,9 +1,9 @@ register('file_link', array('File', 'link_shortcode_handler')); diff --git a/_register_database.php b/_register_database.php index 84828103c..eecb487bc 100644 --- a/_register_database.php +++ b/_register_database.php @@ -5,7 +5,7 @@ DatabaseAdapterRegistry::register( array( 'class' => 'MySQLDatabase', 'title' => 'MySQL 5.0+', - 'helperPath' => 'sapphire/dev/install/MySQLDatabaseConfigurationHelper.php', + 'helperPath' => FRAMEWORK_PATH . '/dev/install/MySQLDatabaseConfigurationHelper.php', 'supported' => function_exists('mysql_connect'), ) ); diff --git a/admin/_config.php b/admin/_config.php index bc696cc86..7372c24e1 100644 --- a/admin/_config.php +++ b/admin/_config.php @@ -22,7 +22,8 @@ HtmlEditorConfig::get('cms')->setOptions(array( 'use_native_selects' => true, // fancy selects are bug as of SS 2.3.0 'valid_elements' => "@[id|class|style|title],#a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align|style],-ol[class],-ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],#td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align],address[class|align],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|dir|class|align|style],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],@[id,style,class]", - 'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]" + 'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]", + 'spellchecker_rpc_url' => THIRDPARTY_DIR . '/tinymce-spellchecker/rpc.php' )); HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen'); @@ -34,4 +35,4 @@ HtmlEditorConfig::get('cms')->addButtonsToLine(2, 'ssimage', 'ssflash', 'sslink' HtmlEditorConfig::get('cms')->removeButtons('tablecontrols'); HtmlEditorConfig::get('cms')->addButtonsToLine(3, 'tablecontrols'); -CMSMenu::remove_menu_item('CMSProfileController'); \ No newline at end of file +CMSMenu::remove_menu_item('CMSProfileController'); diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index c3404ab4e..fe9ee364e 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -209,7 +209,7 @@ class LeftAndMain extends Controller implements PermissionProvider { $htmlEditorConfig->setOption('language', i18n::get_tinymce_lang()); if(!$htmlEditorConfig->getOption('content_css')) { $cssFiles = array(); - $cssFiles[] = 'sapphire/admin/css/editor.css'; + $cssFiles[] = FRAMEWORK_ADMIN_DIR . '/css/editor.css'; // Use theme from the site config if(class_exists('SiteConfig') && ($config = SiteConfig::current_site_config()) && $config->Theme) { @@ -241,32 +241,32 @@ class LeftAndMain extends Controller implements PermissionProvider { array( THIRDPARTY_DIR . '/jquery/jquery.js', THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js', - SAPPHIRE_DIR . '/javascript/jquery-ondemand/jquery.ondemand.js', - SAPPHIRE_DIR . '/admin/javascript/lib.js', + FRAMEWORK_DIR . '/javascript/jquery-ondemand/jquery.ondemand.js', + FRAMEWORK_ADMIN_DIR . '/javascript/lib.js', THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js', THIRDPARTY_DIR . '/json-js/json2.js', THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js', THIRDPARTY_DIR . '/jquery-cookie/jquery.cookie.js', THIRDPARTY_DIR . '/jquery-query/jquery.query.js', THIRDPARTY_DIR . '/jquery-form/jquery.form.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jlayout.border.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.html4.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/jlayout/lib/jlayout.border.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/jlayout/lib/jquery.jlayout.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.html4.js', THIRDPARTY_DIR . '/jstree/jquery.jstree.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/chosen/chosen/chosen.jquery.js', - SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js', - SAPPHIRE_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js', - SAPPHIRE_DIR . '/javascript/TreeDropdownField.js', - SAPPHIRE_DIR . '/javascript/DateField.js', - SAPPHIRE_DIR . '/javascript/HtmlEditorField.js', - SAPPHIRE_DIR . '/javascript/TabSet.js', - SAPPHIRE_DIR . '/javascript/i18n.js', - SAPPHIRE_ADMIN_DIR . '/javascript/ssui.core.js', - SAPPHIRE_DIR . '/javascript/GridField.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/chosen/chosen/chosen.jquery.js', + FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js', + FRAMEWORK_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js', + FRAMEWORK_DIR . '/javascript/TreeDropdownField.js', + FRAMEWORK_DIR . '/javascript/DateField.js', + FRAMEWORK_DIR . '/javascript/HtmlEditorField.js', + FRAMEWORK_DIR . '/javascript/TabSet.js', + FRAMEWORK_DIR . '/javascript/i18n.js', + FRAMEWORK_ADMIN_DIR . '/javascript/ssui.core.js', + FRAMEWORK_DIR . '/javascript/GridField.js', ) ); @@ -276,36 +276,36 @@ class LeftAndMain extends Controller implements PermissionProvider { 'leftandmain.js', array_unique(array_merge( array( - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Panel.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Tree.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Ping.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Content.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.EditForm.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Menu.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.AddForm.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Preview.js', - SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.BatchActions.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Panel.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Tree.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Ping.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Content.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.EditForm.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Menu.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.AddForm.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.Preview.js', + FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.BatchActions.js', ), - Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang', true, true), - Requirements::add_i18n_javascript(SAPPHIRE_ADMIN_DIR . '/javascript/lang', true, true) + Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang', true, true), + Requirements::add_i18n_javascript(FRAMEWORK_ADMIN_DIR . '/javascript/lang', true, true) )) ); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.css'); Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); - Requirements::css(SAPPHIRE_ADMIN_DIR .'/thirdparty/chosen/chosen/chosen.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR .'/thirdparty/chosen/chosen/chosen.css'); Requirements::css(THIRDPARTY_DIR . '/jstree/themes/apple/style.css'); - Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); - Requirements::css(SAPPHIRE_DIR . '/css/GridField.css'); + Requirements::css(FRAMEWORK_DIR . '/css/TreeDropdownField.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/screen.css'); + Requirements::css(FRAMEWORK_DIR . '/css/GridField.css'); // Browser-specific requirements $ie = isset($_SERVER['HTTP_USER_AGENT']) ? strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') : false; if($ie) { $version = substr($_SERVER['HTTP_USER_AGENT'], $ie + 5, 3); - if($version == 7) Requirements::css('sapphire/admin/css/ie7.css'); - else if($version == 8) Requirements::css('sapphire/admin/css/ie8.css'); + if($version == 7) Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/ie7.css'); + else if($version == 8) Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/ie8.css'); } // Custom requirements @@ -1078,7 +1078,7 @@ class LeftAndMain extends Controller implements PermissionProvider { $form->setActions(null); Requirements::clear(); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/LeftAndMain_printable.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/LeftAndMain_printable.css'); return array( "PrintForm" => $form ); @@ -1175,11 +1175,11 @@ class LeftAndMain extends Controller implements PermissionProvider { if(defined('CMS_PATH') && file_exists(CMS_PATH . '/silverstripe_version')) { $sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version'); } else { - $sapphireVersion = file_get_contents(SAPPHIRE_PATH . '/silverstripe_version'); + $sapphireVersion = file_get_contents(FRAMEWORK_PATH . '/silverstripe_version'); } if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown', 'unknown'); return sprintf( - "sapphire: %s", + "SilverStripe: %s", $sapphireVersion ); } @@ -1313,7 +1313,7 @@ class LeftAndMain extends Controller implements PermissionProvider { /** * Register the given javascript file as required in the CMS. - * Filenames should be relative to the base, eg, SAPPHIRE_DIR . '/javascript/loader.js' + * Filenames should be relative to the base, eg, FRAMEWORK_DIR . '/javascript/loader.js' */ public static function require_javascript($file) { self::$extra_requirements['javascript'][] = array($file); diff --git a/admin/code/MemberImportForm.php b/admin/code/MemberImportForm.php index e763a40b9..1b15692ea 100644 --- a/admin/code/MemberImportForm.php +++ b/admin/code/MemberImportForm.php @@ -57,8 +57,8 @@ class MemberImportForm extends Form { parent::__construct($controller, $name, $fields, $actions, $validator); - Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); + Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); + Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/MemberImportForm.js'); $this->addExtraClass('cms'); $this->addExtraClass('import-form'); diff --git a/admin/code/ModelAdmin.php b/admin/code/ModelAdmin.php index 2a1d787a0..aec67a482 100644 --- a/admin/code/ModelAdmin.php +++ b/admin/code/ModelAdmin.php @@ -110,7 +110,7 @@ abstract class ModelAdmin extends LeftAndMain { user_error('ModelAdmin::init(): Invalid Model class', E_USER_ERROR); } - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ModelAdmin.js'); + Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js'); } function getEditForm($id = null, $fields = null) { diff --git a/admin/code/SecurityAdmin.php b/admin/code/SecurityAdmin.php index ec61e5461..07d6618ac 100755 --- a/admin/code/SecurityAdmin.php +++ b/admin/code/SecurityAdmin.php @@ -31,7 +31,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function init() { parent::init(); - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/SecurityAdmin.js'); + Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/SecurityAdmin.js'); } public function getEditForm($id = null, $fields = null) { @@ -133,12 +133,12 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function memberimport() { Requirements::clear(); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/screen.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/MemberImportForm.css'); - Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/MemberImportForm.css'); + Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); + Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/MemberImportForm.js'); return $this->renderWith('BlankPage', array( 'Form' => $this->MemberImportForm()->forTemplate(), @@ -164,12 +164,12 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function groupimport() { Requirements::clear(); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/screen.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); - Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/MemberImportForm.css'); - Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); + Requirements::css(FRAMEWORK_ADMIN_DIR . '/css/MemberImportForm.css'); + Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); + Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/MemberImportForm.js'); return $this->renderWith('BlankPage', array( 'Content' => ' ', diff --git a/admin/javascript/LeftAndMain.Tree.js b/admin/javascript/LeftAndMain.Tree.js index 5d14377ea..3169b5e2b 100644 --- a/admin/javascript/LeftAndMain.Tree.js +++ b/admin/javascript/LeftAndMain.Tree.js @@ -159,10 +159,10 @@ }, 'themes': { 'theme': 'apple', - 'url': 'sapphire/thirdparty/jstree/themes/apple/style.css' + 'url': $('body').data('frameworkpath') + '/thirdparty/jstree/themes/apple/style.css' }, // Caution: SilverStripe has disabled $.vakata.css.add_sheet() for performance reasons, - // which means you need to add any CSS manually to sapphire/admin/scss/_tree.css + // which means you need to add any CSS manually to framework/admin/scss/_tree.css 'plugins': [ 'html_data', 'ui', 'dnd', 'crrm', 'themes', 'checkbox' // checkboxes are hidden unless .multiple is set @@ -338,4 +338,4 @@ } }); }); -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/admin/scss/_forms.scss b/admin/scss/_forms.scss index d6ae25206..680c77133 100644 --- a/admin/scss/_forms.scss +++ b/admin/scss/_forms.scss @@ -1,6 +1,6 @@ /** * This file defines common styles for form elements used throughout the CMS interface. - * It is an addition to the base styles defined in sapphire/css/Form.css. + * It is an addition to the base styles defined in framework/css/Form.css. * * @package sapphire * @subpackage admin @@ -504,4 +504,4 @@ input.radio { .action-hidden { display: none; -} \ No newline at end of file +} diff --git a/admin/templates/Includes/CMSLoadingScreen.ss b/admin/templates/Includes/CMSLoadingScreen.ss index b43a348e1..f39323552 100644 --- a/admin/templates/Includes/CMSLoadingScreen.ss +++ b/admin/templates/Includes/CMSLoadingScreen.ss @@ -1,6 +1,6 @@
-
\ No newline at end of file + diff --git a/admin/templates/LeftAndMain.ss b/admin/templates/LeftAndMain.ss index a7c41722c..3db0feed5 100644 --- a/admin/templates/LeftAndMain.ss +++ b/admin/templates/LeftAndMain.ss @@ -7,7 +7,7 @@ $Title - + <% include CMSLoadingScreen %> diff --git a/admin/tests/LeftAndMainTest.php b/admin/tests/LeftAndMainTest.php index 5cc500431..99e0537ba 100644 --- a/admin/tests/LeftAndMainTest.php +++ b/admin/tests/LeftAndMainTest.php @@ -5,7 +5,7 @@ */ class LeftAndMainTest extends FunctionalTest { - static $fixture_file = 'sapphire/admin/tests/LeftAndMainTest.yml'; + static $fixture_file = 'LeftAndMainTest.yml'; protected $extraDataObjects = array('LeftAndMainTest_Object'); diff --git a/admin/tests/ModelAdminTest.php b/admin/tests/ModelAdminTest.php index 19ee1456f..12ecd8581 100644 --- a/admin/tests/ModelAdminTest.php +++ b/admin/tests/ModelAdminTest.php @@ -1,7 +1,7 @@ handleRequest()} and {@link Controller->handleAction()} later on. * - * @param sapphire + * @package sapphire * @subpackage control */ class NullHTTPRequest extends SS_HTTPRequest { @@ -13,4 +13,4 @@ class NullHTTPRequest extends SS_HTTPRequest { parent::__construct(null, null); } -} \ No newline at end of file +} diff --git a/control/RequestHandler.php b/control/RequestHandler.php index f73e53c85..93d5f5dc9 100644 --- a/control/RequestHandler.php +++ b/control/RequestHandler.php @@ -1,7 +1,7 @@ body div.TreeDropdownField div.tree_holder { top: 20px; left: 0px; z-inde /** HACK IE6, see http://www.hedgerwow.com/360/bugs/css-select-free.html */ .SelectionGroup div.TreeDropdownField div.tree_holder iframe { display: none; /* IE5*/ display/**/: block; /* IE5*/ position: absolute; top: 0; left: 0; z-index: -1; filter: mask(); width: 180px; /*must have for any big value*/ height: 200px; border: 0; } -div.TreeDropdownField a.editLink { border-width: 1px 1px 1px 0; background: url(../../sapphire/images/TreeDropdownField_button.gif) left top no-repeat; width: 19px; height: 21px; margin: 0; padding: 0; float: left; clear: right; z-index: 0; overflow: hidden; } +div.TreeDropdownField a.editLink { border-width: 1px 1px 1px 0; background: url(../images/TreeDropdownField_button.gif) left top no-repeat; width: 19px; height: 21px; margin: 0; padding: 0; float: left; clear: right; z-index: 0; overflow: hidden; } /* added block/width so tree values don't disappear in ie7 */ .SelectionGroup div.TreeDropdownField ul.tree li { display: block; width: 100%; } diff --git a/css/HasManyFileField.css b/css/HasManyFileField.css index 10a2aeccc..e87787835 100644 --- a/css/HasManyFileField.css +++ b/css/HasManyFileField.css @@ -17,14 +17,14 @@ #right form .hasmanyfile .clear { clear: both; } /* ICONS */ -#right form .hasmanyfile .currentFiles a[href$=".pdf"], #right form .hasmanyfile .currentFiles a[href$=".PDF"], #right form .hasmanyfile .currentFiles a.pdf { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/page_white_acrobat.png) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".pdf"], #right form .hasmanyfile .currentFiles a[href$=".PDF"], #right form .hasmanyfile .currentFiles a.pdf { padding: 2px; padding-left: 20px; background: url(../images/icons/page_white_acrobat.png) no-repeat left center; } -#right form .hasmanyfile .currentFiles a[href$=".doc"], #right form .hasmanyfile .currentFiles a[href$=".DOC"], #right form .hasmanyfile .currentFiles a.doc { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/page_word.png) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".doc"], #right form .hasmanyfile .currentFiles a[href$=".DOC"], #right form .hasmanyfile .currentFiles a.doc { padding: 2px; padding-left: 20px; background: url(../images/icons/page_word.png) no-repeat left center; } -#right form .hasmanyfile .currentFiles a[href$=".xls"], #right form .hasmanyfile .currentFiles a[href$=".XLS"], #right form .hasmanyfile .currentFiles a.xls { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/page_excel.png) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".xls"], #right form .hasmanyfile .currentFiles a[href$=".XLS"], #right form .hasmanyfile .currentFiles a.xls { padding: 2px; padding-left: 20px; background: url(../images/icons/page_excel.png) no-repeat left center; } -#right form .hasmanyfile .currentFiles a[href$=".gz"], #right form .hasmanyfile .currentFiles a[href$=".GZ"], #right form .hasmanyfile .currentFiles a[href$=".gzip"], #right form .hasmanyfile .currentFiles a[href$=".GZIP"], #right form .hasmanyfile .currentFiles a[href$=".zip"], #right form .hasmanyfile .currentFiles a[href$=".ZIP"], #right form .hasmanyfile .currentFiles a.archive { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/page_white_zip.png) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".gz"], #right form .hasmanyfile .currentFiles a[href$=".GZ"], #right form .hasmanyfile .currentFiles a[href$=".gzip"], #right form .hasmanyfile .currentFiles a[href$=".GZIP"], #right form .hasmanyfile .currentFiles a[href$=".zip"], #right form .hasmanyfile .currentFiles a[href$=".ZIP"], #right form .hasmanyfile .currentFiles a.archive { padding: 2px; padding-left: 20px; background: url(../images/icons/page_white_zip.png) no-repeat left center; } -#right form .hasmanyfile .currentFiles a[href$=".jpg"], #right form .hasmanyfile .currentFiles a[href$=".JPG"], #right form .hasmanyfile .currentFiles a[href$=".gif"], #right form .hasmanyfile .currentFiles a[href$=".GIF"], #right form .hasmanyfile .currentFiles a[href$=".png"], #right form .hasmanyfile .currentFiles a[href$=".PNG"], #right form .hasmanyfile .currentFiles a.image { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/icon-jpg.gif) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".jpg"], #right form .hasmanyfile .currentFiles a[href$=".JPG"], #right form .hasmanyfile .currentFiles a[href$=".gif"], #right form .hasmanyfile .currentFiles a[href$=".GIF"], #right form .hasmanyfile .currentFiles a[href$=".png"], #right form .hasmanyfile .currentFiles a[href$=".PNG"], #right form .hasmanyfile .currentFiles a.image { padding: 2px; padding-left: 20px; background: url(../images/icons/icon-jpg.gif) no-repeat left center; } -#right form .hasmanyfile .currentFiles a[href$=".exe"], #right form .hasmanyfile .currentFiles a[href$=".EXE"], #right form .hasmanyfile .currentFiles a.application { padding: 2px; padding-left: 20px; background: url(../../sapphire/images/icons/application.png) no-repeat left center; } +#right form .hasmanyfile .currentFiles a[href$=".exe"], #right form .hasmanyfile .currentFiles a[href$=".EXE"], #right form .hasmanyfile .currentFiles a.application { padding: 2px; padding-left: 20px; background: url(../images/icons/application.png) no-repeat left center; } diff --git a/dev/BuildTask.php b/dev/BuildTask.php index 2d8d57b39..7ab6f3d81 100644 --- a/dev/BuildTask.php +++ b/dev/BuildTask.php @@ -7,7 +7,6 @@ * To disable the task (in the case of potentially destructive updates or deletes), declare * the $Disabled property on the subclass. * - * @todo move from sapphire/testing to sapphire/dev or sapphire/development? * @package sapphire * @subpackage dev */ diff --git a/dev/BulkLoader.php b/dev/BulkLoader.php index 2b53188ba..f7fbf2192 100644 --- a/dev/BulkLoader.php +++ b/dev/BulkLoader.php @@ -1,7 +1,7 @@ writeHeader(); - $renderer->writeInfo("Sapphire Development Tools", Director::absoluteBaseURL()); + $renderer->writeInfo("SilverStripe Development Tools", Director::absoluteBaseURL()); $base = Director::baseURL(); echo '
diff --git a/tests/FullTestSuite.php b/tests/FullTestSuite.php index 709bfcc92..e7525b463 100644 --- a/tests/FullTestSuite.php +++ b/tests/FullTestSuite.php @@ -6,9 +6,9 @@ * to group or testsuite definitions in a custom phpunit.xml file. * * Usage: - * - "phpunit sapphire/tests/FullTestSuite.php" + * - "phpunit framework/tests/FullTestSuite.php" * (all tests) - * - "phpunit sapphire/tests/FullTestSuite.php '' module=sapphire,cms" + * - "phpunit framework/tests/FullTestSuite.php '' module=framework,cms" * (comma-separated modules. empty quotes are necessary to avoid PHPUnit argument confusion) * * See http://www.phpunit.de/manual/current/en/organizing-tests.html#organizing-tests.testsuite @@ -27,7 +27,7 @@ class FullTestSuite { * @return PHPUnit_Framework_TestSuite */ public static function suite() { - require_once('sapphire/tests/bootstrap.php'); + require_once(dirname(__FILE__) . '/bootstrap.php'); $suite = new PHPUnit_Framework_TestSuite(); if(isset($_GET['module'])) { @@ -47,7 +47,7 @@ class FullTestSuite { * @return Array */ public static function get_all_tests() { - require_once('sapphire/tests/bootstrap.php'); + require_once(dirname(__FILE__) . '/bootstrap.php'); TestRunner::use_test_manifest(); $tests = ClassInfo::subclassesFor('SapphireTest'); @@ -58,13 +58,13 @@ class FullTestSuite { /** * Run tests for one or more "modules". - * A module is generally a toplevel folder, e.g. "mysite" or "sapphire". + * A module is generally a toplevel folder, e.g. "mysite" or "framework". * * @param String $nameStr * @return Array */ protected static function get_module_tests($namesStr) { - require_once('sapphire/tests/bootstrap.php'); + require_once(dirname(__FILE__) . '/bootstrap.php'); $tests = array(); $names = explode(',', $namesStr); diff --git a/tests/PhpSyntaxTest.php b/tests/PhpSyntaxTest.php index 5e7b13a6c..b6c02af73 100644 --- a/tests/PhpSyntaxTest.php +++ b/tests/PhpSyntaxTest.php @@ -24,7 +24,7 @@ class PhpSyntaxTest extends SapphireTest { $settingTests = array('short_open_tag=Off','short_open_tag=On -d asp_tags=On'); $files = $this->getAllFiles('php'); - $files[] = BASE_PATH.'/sapphire/dev/install/config-form.html'; + $files[] = FRAMEWORK_PATH.'/dev/install/config-form.html'; foreach($files as $i => $file) { $CLI_file = escapeshellarg($file); @@ -47,4 +47,4 @@ class PhpSyntaxTest extends SapphireTest { ); return explode("\n", trim(`$cmd`)); } -} \ No newline at end of file +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 50b2b2fb3..3f75d4d49 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,5 @@ 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'REQUEST_URI' => '/', - 'SCRIPT_NAME' => '/sapphire/main.php', + 'SCRIPT_NAME' => FRAMEWORK_DIR . '/main.php', 'CONTENT_TYPE' => 'text/xml', 'CONTENT_LENGTH' => 10 ); @@ -281,4 +281,4 @@ class DirectorTestRequest_Controller extends Controller implements TestOnly { public function returnCookieValue($request) { return $_COOKIE['somekey']; } -} \ No newline at end of file +} diff --git a/tests/core/ClassInfoTest.php b/tests/core/ClassInfoTest.php index 9d97bfd4f..e81fac983 100644 --- a/tests/core/ClassInfoTest.php +++ b/tests/core/ClassInfoTest.php @@ -24,10 +24,10 @@ class ClassInfoTest extends SapphireTest { } function testClassesForFolder() { - //$baseFolder = Director::baseFolder() . '/' . SAPPHIRE_DIR . '/tests/_ClassInfoTest'; + //$baseFolder = Director::baseFolder() . '/' . FRAMEWORK_DIR . '/tests/_ClassInfoTest'; //$manifestInfo = ManifestBuilder::get_manifest_info($baseFolder); - $classes = ClassInfo::classes_for_folder('sapphire/tests'); + $classes = ClassInfo::classes_for_folder(FRAMEWORK_DIR . '/tests'); $this->assertContains( 'classinfotest', $classes, diff --git a/tests/core/CoreTest.php b/tests/core/CoreTest.php index 46ae937cb..ee5cff55d 100644 --- a/tests/core/CoreTest.php +++ b/tests/core/CoreTest.php @@ -1,6 +1,6 @@ 'module/classes/ClassA.php', - 'Sapphire\Test\ClassA' => 'module/classes/ClassA.php', - 'sapphire\test\classa' => 'module/classes/ClassA.php', - 'SAPPHIRE\TEST\INTERFACEA' => 'module/interfaces/InterfaceA.php', - 'Sapphire\Test\InterfaceA' => 'module/interfaces/InterfaceA.php', - 'sapphire\test\interfacea' => 'module/interfaces/InterfaceA.php' + 'SILVERSTRIPE\TEST\CLASSA' => 'module/classes/ClassA.php', + 'Silverstripe\Test\ClassA' => 'module/classes/ClassA.php', + 'silverstripe\test\classa' => 'module/classes/ClassA.php', + 'SILVERSTRIPE\TEST\INTERFACEA' => 'module/interfaces/InterfaceA.php', + 'Silverstripe\Test\InterfaceA' => 'module/interfaces/InterfaceA.php', + 'silverstripe\test\interfacea' => 'module/interfaces/InterfaceA.php' ); foreach ($expect as $name => $path) { @@ -38,14 +38,14 @@ class NamespacedClassManifestTest extends SapphireTest { public function testGetClasses() { $expect = array( - 'sapphire\test\classa' => "{$this->base}/module/classes/ClassA.php", - 'sapphire\test\classb' => "{$this->base}/module/classes/ClassB.php", - 'sapphire\test\classc' => "{$this->base}/module/classes/ClassC.php", - 'sapphire\test\classd' => "{$this->base}/module/classes/ClassD.php", - 'sapphire\test\classe' => "{$this->base}/module/classes/ClassE.php", - 'sapphire\test\classf' => "{$this->base}/module/classes/ClassF.php", - 'sapphire\test\classg' => "{$this->base}/module/classes/ClassG.php", - 'sapphire\test\classh' => "{$this->base}/module/classes/ClassH.php" + 'silverstripe\test\classa' => "{$this->base}/module/classes/ClassA.php", + 'silverstripe\test\classb' => "{$this->base}/module/classes/ClassB.php", + 'silverstripe\test\classc' => "{$this->base}/module/classes/ClassC.php", + 'silverstripe\test\classd' => "{$this->base}/module/classes/ClassD.php", + 'silverstripe\test\classe' => "{$this->base}/module/classes/ClassE.php", + 'silverstripe\test\classf' => "{$this->base}/module/classes/ClassF.php", + 'silverstripe\test\classg' => "{$this->base}/module/classes/ClassG.php", + 'silverstripe\test\classh' => "{$this->base}/module/classes/ClassH.php" ); $this->assertEquals($expect, $this->manifest->getClasses()); @@ -53,13 +53,13 @@ class NamespacedClassManifestTest extends SapphireTest { public function testGetClassNames() { $this->assertEquals( - array('sapphire\test\classa', 'sapphire\test\classb', 'sapphire\test\classc', 'sapphire\test\classd', 'sapphire\test\classe', 'sapphire\test\classf', 'sapphire\test\classg', 'sapphire\test\classh'), + array('silverstripe\test\classa', 'silverstripe\test\classb', 'silverstripe\test\classc', 'silverstripe\test\classd', 'silverstripe\test\classe', 'silverstripe\test\classf', 'silverstripe\test\classg', 'silverstripe\test\classh'), $this->manifest->getClassNames()); } public function testGetDescendants() { $expect = array( - 'sapphire\test\classa' => array('sapphire\test\ClassB', 'sapphire\test\ClassH'), + 'silverstripe\test\classa' => array('silverstripe\test\ClassB', 'silverstripe\test\ClassH'), ); $this->assertEquals($expect, $this->manifest->getDescendants()); @@ -67,8 +67,8 @@ class NamespacedClassManifestTest extends SapphireTest { public function testGetDescendantsOf() { $expect = array( - 'SAPPHIRE\TEST\CLASSA' => array('sapphire\test\ClassB', 'sapphire\test\ClassH'), - 'sapphire\test\classa' => array('sapphire\test\ClassB', 'sapphire\test\ClassH'), + 'SILVERSTRIPE\TEST\CLASSA' => array('silverstripe\test\ClassB', 'silverstripe\test\ClassH'), + 'silverstripe\test\classa' => array('silverstripe\test\ClassB', 'silverstripe\test\ClassH'), ); foreach ($expect as $class => $desc) { @@ -78,28 +78,28 @@ class NamespacedClassManifestTest extends SapphireTest { public function testGetInterfaces() { $expect = array( - 'sapphire\test\interfacea' => "{$this->base}/module/interfaces/InterfaceA.php", + 'silverstripe\test\interfacea' => "{$this->base}/module/interfaces/InterfaceA.php", ); $this->assertEquals($expect, $this->manifest->getInterfaces()); } public function testGetImplementors() { $expect = array( - 'sapphire\test\interfacea' => array('sapphire\test\ClassE'), - 'interfacea' => array('sapphire\test\ClassF'), - 'sapphire\test\subtest\interfacea' => array('sapphire\test\ClassG') + 'silverstripe\test\interfacea' => array('silverstripe\test\ClassE'), + 'interfacea' => array('silverstripe\test\ClassF'), + 'silverstripe\test\subtest\interfacea' => array('silverstripe\test\ClassG') ); $this->assertEquals($expect, $this->manifest->getImplementors()); } public function testGetImplementorsOf() { $expect = array( - 'SAPPHIRE\TEST\INTERFACEA' => array('sapphire\test\ClassE'), - 'sapphire\test\interfacea' => array('sapphire\test\ClassE'), - 'INTERFACEA' => array('sapphire\test\ClassF'), - 'interfacea' => array('sapphire\test\ClassF'), - 'SAPPHIRE\TEST\SUBTEST\INTERFACEA' => array('sapphire\test\ClassG'), - 'sapphire\test\subtest\interfacea' => array('sapphire\test\ClassG'), + 'SILVERSTRIPE\TEST\INTERFACEA' => array('silverstripe\test\ClassE'), + 'silverstripe\test\interfacea' => array('silverstripe\test\ClassE'), + 'INTERFACEA' => array('silverstripe\test\ClassF'), + 'interfacea' => array('silverstripe\test\ClassF'), + 'SILVERSTRIPE\TEST\SUBTEST\INTERFACEA' => array('silverstripe\test\ClassG'), + 'silverstripe\test\subtest\interfacea' => array('silverstripe\test\ClassG'), ); foreach ($expect as $interface => $impl) { @@ -116,4 +116,4 @@ class NamespacedClassManifestTest extends SapphireTest { $expect = array("module" => "{$this->base}/module"); $this->assertEquals($expect, $this->manifest->getModules()); } -} \ No newline at end of file +} diff --git a/tests/core/manifest/TokenisedRegularExpressionTest.php b/tests/core/manifest/TokenisedRegularExpressionTest.php index eecf61c8e..ed6915889 100644 --- a/tests/core/manifest/TokenisedRegularExpressionTest.php +++ b/tests/core/manifest/TokenisedRegularExpressionTest.php @@ -56,7 +56,7 @@ PHP return token_get_all(<<findAll($tokens); $this->assertEquals(array(), $matches); - $this->assertEquals(array('sapphire', '\\', 'test'), $namespacedMatches[0]['namespaceName']); + $this->assertEquals(array('silverstripe', '\\', 'test'), $namespacedMatches[0]['namespaceName']); } -} \ No newline at end of file +} diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassA.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassA.php index 47ecc7cf6..5269d913e 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassA.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassA.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassA { } \ No newline at end of file +class ClassA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassB.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassB.php index e3db093fb..1cd5a0dc4 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassB.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassB.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassB extends ClassA { } \ No newline at end of file +class ClassB extends ClassA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassC.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassC.php index 32fef9d97..c02b17449 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassC.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassC.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassC extends \ClassA { } \ No newline at end of file +class ClassC extends \ClassA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassD.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassD.php index 5acd35195..e8a3448a3 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassD.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassD.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassD extends subtest\ClassC { } \ No newline at end of file +class ClassD extends subtest\ClassC { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassE.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassE.php index b9948a64d..8c6afcb30 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassE.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassE.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassE implements InterfaceA { } \ No newline at end of file +class ClassE implements InterfaceA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassF.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassF.php index 6c88f6258..c8ee33ce1 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassF.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassF.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassF implements \InterfaceA { } \ No newline at end of file +class ClassF implements \InterfaceA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassG.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassG.php index d878c25bb..b8b391d43 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassG.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassG.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassG implements subtest\InterfaceA { } \ No newline at end of file +class ClassG implements subtest\InterfaceA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassH.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassH.php index 17597aafb..6d8e2cdd2 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassH.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassH.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -class ClassH extends \sapphire\test\ClassA { } +class ClassH extends \silverstripe\test\ClassA { } diff --git a/tests/core/manifest/fixtures/namespaced_classmanifest/module/interfaces/InterfaceA.php b/tests/core/manifest/fixtures/namespaced_classmanifest/module/interfaces/InterfaceA.php index 7361ecaa9..137599726 100644 --- a/tests/core/manifest/fixtures/namespaced_classmanifest/module/interfaces/InterfaceA.php +++ b/tests/core/manifest/fixtures/namespaced_classmanifest/module/interfaces/InterfaceA.php @@ -3,6 +3,6 @@ * @ignore */ -namespace sapphire\test; +namespace silverstripe\test; -interface InterfaceA { } \ No newline at end of file +interface InterfaceA { } diff --git a/tests/dev/CsvBulkLoaderTest.php b/tests/dev/CsvBulkLoaderTest.php index 23a30bb39..d9b83e605 100644 --- a/tests/dev/CsvBulkLoaderTest.php +++ b/tests/dev/CsvBulkLoaderTest.php @@ -157,7 +157,7 @@ class CsvBulkLoaderTest extends SapphireTest { $this->assertEquals($player->Biography, 'He\'s a good guy', 'test updating of duplicate imports within the same import works'); // load with updated data - $filepath = Director::baseFolder() . '/sapphire/tests/dev/CsvBulkLoaderTest_PlayersWithIdUpdated.csv'; + $filepath = FRAMEWORK_PATH . '/tests/dev/CsvBulkLoaderTest_PlayersWithIdUpdated.csv'; $results = $loader->load($filepath); // HACK need to update the loaded record from the database diff --git a/tests/dev/DeprecationTest.php b/tests/dev/DeprecationTest.php index 7591cb21f..a9290fb35 100644 --- a/tests/dev/DeprecationTest.php +++ b/tests/dev/DeprecationTest.php @@ -53,7 +53,7 @@ class DeprecationTest extends SapphireTest { function testNonMatchingModuleNotifcationVersionDoesntAffectNotice() { Deprecation::notification_version('1.0.0'); Deprecation::notification_version('3.0.0', 'mysite'); - $this->callThatOriginatesFromSapphire(); + $this->callThatOriginatesFromFramework(); } /** @@ -61,12 +61,12 @@ class DeprecationTest extends SapphireTest { */ function testMatchingModuleNotifcationVersionAffectsNotice() { Deprecation::notification_version('1.0.0'); - Deprecation::notification_version('3.0.0', 'sapphire'); - $this->callThatOriginatesFromSapphire(); + Deprecation::notification_version('3.0.0', 'framework'); + $this->callThatOriginatesFromFramework(); } - protected function callThatOriginatesFromSapphire() { - $this->assertEquals(DeprecationTest_Deprecation::get_module(), 'sapphire'); + protected function callThatOriginatesFromFramework() { + $this->assertEquals(DeprecationTest_Deprecation::get_module(), 'framework'); Deprecation::notice('2.0', 'Deprecation test passed'); } diff --git a/tests/forms/LookupFieldTest.php b/tests/forms/LookupFieldTest.php index a28a5bb2c..ded12ab30 100644 --- a/tests/forms/LookupFieldTest.php +++ b/tests/forms/LookupFieldTest.php @@ -6,7 +6,7 @@ class LookupFieldTest extends SapphireTest { - static $fixture_file = 'sapphire/tests/forms/LookupFieldTest.yml'; + static $fixture_file = 'LookupFieldTest.yml'; function testNullValueWithNumericArraySource() { $source = array(1 => 'one', 2 => 'two', 3 => 'three'); @@ -79,4 +79,4 @@ class LookupFieldTest extends SapphireTest { ); } -} \ No newline at end of file +} diff --git a/tests/forms/gridfield/GridFieldAddExistingAutocompleterTest.php b/tests/forms/gridfield/GridFieldAddExistingAutocompleterTest.php index 0d0eecd30..567150190 100644 --- a/tests/forms/gridfield/GridFieldAddExistingAutocompleterTest.php +++ b/tests/forms/gridfield/GridFieldAddExistingAutocompleterTest.php @@ -1,7 +1,7 @@ DataDifferencerTest_MockImage.image1 - HasOneRelation: =>DataDifferencerTest_HasOneRelationObject.relobj1 \ No newline at end of file + HasOneRelation: =>DataDifferencerTest_HasOneRelationObject.relobj1 diff --git a/tests/salad/step_definitions/db-fixture.rb b/tests/salad/step_definitions/db-fixture.rb deleted file mode 100644 index 5ee0f9220..000000000 --- a/tests/salad/step_definitions/db-fixture.rb +++ /dev/null @@ -1,32 +0,0 @@ -def loadFixture(fileName) - if $baseURL and $browser then - $browser.goto $baseURL + "dev/tests/sessionloadyml?fixture=" + fileName + "&flush=1" - else - fail("No \$baseUrl or \$browser found") - end -end - -def startSession - # Reset database - if $baseURL and $browser then - $browser.goto $baseURL + 'dev/tests/endsession' - else - fail("No \$baseUrl or \$browser found") - end - fileName = 'sapphire/tests/Bare.yml' - if $baseURL and $browser then - $browser.goto $baseURL + "dev/tests/startsession?fixture=" + fileName + "&flush=1" - else - fail("No \$baseUrl or \$browser found") - end -end - -Given /load the fixture file "([^"]+)"/ do |fileName| - loadFixture(fileName) -end - -startSession() - -Before do - Given "I visit /dev/tests/emptydb?fixture=sapphire/tests/Bare.yml" -end \ No newline at end of file diff --git a/tests/templates/RequirementsTest_Conditionals.ss b/tests/templates/RequirementsTest_Conditionals.ss index 06c6bc2aa..488382151 100644 --- a/tests/templates/RequirementsTest_Conditionals.ss +++ b/tests/templates/RequirementsTest_Conditionals.ss @@ -1,9 +1,9 @@ -<% if FailTest %> - <% require css(sapphire/tests/forms/RequirementsTest_a.css) %> - <% require javascript(sapphire/tests/forms/RequirementsTest_b.js) %> - <% require javascript(sapphire/tests/forms/RequirementsTest_c.js) %> +<% if $FailTest %> + <% require css(framework/tests/forms/RequirementsTest_a.css) %> + <% require javascript(framework/tests/forms/RequirementsTest_b.js) %> + <% require javascript(framework/tests/forms/RequirementsTest_c.js) %> <% else %> - <% require javascript(sapphire/tests/forms/RequirementsTest_a.js) %> - <% require css(sapphire/tests/forms/RequirementsTest_b.css) %> - <% require css(sapphire/tests/forms/RequirementsTest_c.css) %> + <% require javascript(framework/tests/forms/RequirementsTest_a.js) %> + <% require css(framework/tests/forms/RequirementsTest_b.css) %> + <% require css(framework/tests/forms/RequirementsTest_c.css) %> <% end_if %> diff --git a/tests/testing/YamlFixtureTest.php b/tests/testing/YamlFixtureTest.php index d2da8ba77..7943ad79b 100644 --- a/tests/testing/YamlFixtureTest.php +++ b/tests/testing/YamlFixtureTest.php @@ -10,13 +10,13 @@ class YamlFixtureTest extends SapphireTest { ); function testAbsoluteFixturePath() { - $absPath = Director::baseFolder() . '/sapphire/tests/testing/YamlFixtureTest.yml'; + $absPath = FRAMEWORK_PATH . '/tests/testing/YamlFixtureTest.yml'; $obj = new YamlFixture($absPath); $this->assertEquals($absPath, $obj->getFixtureFile()); } function testRelativeFixturePath() { - $relPath = 'sapphire/tests/testing/YamlFixtureTest.yml'; + $relPath = FRAMEWORK_DIR . '/tests/testing/YamlFixtureTest.yml'; $obj = new YamlFixture($relPath); $this->assertEquals(Director::baseFolder() . '/' . $relPath, $obj->getFixtureFile()); } @@ -25,7 +25,7 @@ class YamlFixtureTest extends SapphireTest { * @expectedException InvalidArgumentException */ function testFailsWithInvalidFixturePath() { - $invalidPath = 'sapphire/tests/testing/invalid.yml'; + $invalidPath = FRAMEWORK_DIR . '/tests/testing/invalid.yml'; $obj = new YamlFixture($invalidPath); } diff --git a/tests/view/SSViewerTest.php b/tests/view/SSViewerTest.php index c54702ed5..d0ec3f89a 100644 --- a/tests/view/SSViewerTest.php +++ b/tests/view/SSViewerTest.php @@ -41,8 +41,8 @@ class SSViewerTest extends SapphireTest { function testRequirements() { $requirements = $this->getMock("Requirements_Backend", array("javascript", "css")); - $jsFile = 'sapphire/tests/forms/a.js'; - $cssFile = 'sapphire/tests/forms/a.js'; + $jsFile = FRAMEWORK_DIR . '/tests/forms/a.js'; + $cssFile = FRAMEWORK_DIR . '/tests/forms/a.js'; $requirements->expects($this->once())->method('javascript')->with($jsFile); $requirements->expects($this->once())->method('css')->with($cssFile); @@ -943,10 +943,10 @@ after') $result = $view->process($data); $expected = ' - + - + '; $this->assertEquals($result, $expected); @@ -954,14 +954,14 @@ after') $data = new ArrayData(array()); $result = $view->process($data); - $expected = '
'; + $expected = '
'; $this->assertEquals($result, $expected); $view = new SSViewer(array('SSViewerTestCommentsWithInclude')); $data = new ArrayData(array()); $result = $view->process($data); - $expected = '
Included
'; + $expected = '
Included
'; $this->assertEquals($result, $expected); SSViewer::set_source_file_comments(false); diff --git a/thirdparty/behaviour/README.md b/thirdparty/behaviour/README.md index e990137a5..aec2fc414 100644 --- a/thirdparty/behaviour/README.md +++ b/thirdparty/behaviour/README.md @@ -10,11 +10,11 @@ Caution: Seriously outdated, consider using [http://github.com/hafriedlander/jqu # Requirements - * Custom Prototype 1.4 RC3 (see `sapphire/thirdparty/prototype/prototype.js`) + * Custom Prototype 1.4 RC3 (see `framework/thirdparty/prototype/prototype.js`) # Tutorial -In Sapphire, I've tried to make Javascript development a lot more well-structured. It's very easy to write spaghetti, but this ultimately prevents maintainability. This page is a guide to better Javascript. (hopefully). +In SilverStripe, I've tried to make Javascript development a lot more well-structured. It's very easy to write spaghetti, but this ultimately prevents maintainability. This page is a guide to better Javascript. (hopefully). ## Required includes @@ -91,4 +91,4 @@ CAUTION: If you want to to have true instance-variables, specify them in initial this.instanceVar = "current dom-id: " + this.id; } } - Resizable.applyTo("div.multipleElements"); \ No newline at end of file + Resizable.applyTo("div.multipleElements"); diff --git a/thirdparty/prototype/prototype.js b/thirdparty/prototype/prototype.js index a499541e0..b2f7a9041 100644 --- a/thirdparty/prototype/prototype.js +++ b/thirdparty/prototype/prototype.js @@ -830,7 +830,7 @@ Ajax.Request.prototype = Object.extend(new Ajax.Base(), { // jquery ondemand integration patch prototypeAjax = this; completeHandler = function() { - // Sapphire indication that the session has been lost + // SilverStripe indication that the session has been lost if(prototypeAjax.transport.responseText && prototypeAjax.transport.responseText.substr(0,12) == 'NOTLOGGEDIN:') { if(typeof onSessionLost == 'function') onSessionLost(); @@ -2108,4 +2108,4 @@ document.getParentOfElement = function( element, tagName, className ) { } return parent; -} \ No newline at end of file +} diff --git a/view/GenericTemplateGlobalProvider.php b/view/GenericTemplateGlobalProvider.php new file mode 100644 index 000000000..b61d070f7 --- /dev/null +++ b/view/GenericTemplateGlobalProvider.php @@ -0,0 +1,33 @@ +combine_files); } -} \ No newline at end of file +} diff --git a/view/SSTemplateParser.php.inc b/view/SSTemplateParser.php.inc index b57c0b94a..bd5f18515 100644 --- a/view/SSTemplateParser.php.inc +++ b/view/SSTemplateParser.php.inc @@ -7,7 +7,7 @@ This is the uncompiled parser for the SilverStripe template language, PHP with s It gets run through the php-peg parser compiler to have those comments turned into code that match parts of the template language, producing the executable version SSTemplateParser.php -To recompile after changing this file, run this from the 'sapphire/core' directory via command line: +To recompile after changing this file, run this from the 'framework/core' directory via command line: php ../thirdparty/php-peg/cli.php SSTemplateParser.php.inc > SSTemplateParser.php diff --git a/view/TemplateGlobalProvider.php b/view/TemplateGlobalProvider.php index f70856223..8a522c66b 100644 --- a/view/TemplateGlobalProvider.php +++ b/view/TemplateGlobalProvider.php @@ -32,4 +32,4 @@ interface TemplateGlobalProvider { public static function get_template_global_variables(); } -?> \ No newline at end of file +?>