Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

API-CHANGE sapphire folder can now be renamed.

  • Loading branch information...
commit 3a6341a25113be0f65f96a1317543e583bf318d0 1 parent f8082e4
@simonwelsh simonwelsh authored halkyon committed
Showing with 618 additions and 585 deletions.
  1. +4 −4 README.md
  2. +3 −3 _config.php
  3. +1 −1  _register_database.php
  4. +3 −2 admin/_config.php
  5. +43 −43 admin/code/LeftAndMain.php
  6. +2 −2 admin/code/MemberImportForm.php
  7. +1 −1  admin/code/ModelAdmin.php
  8. +9 −9 admin/code/SecurityAdmin.php
  9. +3 −3 admin/javascript/LeftAndMain.Tree.js
  10. +2 −2 admin/scss/_forms.scss
  11. +2 −2 admin/templates/Includes/CMSLoadingScreen.ss
  12. +1 −1  admin/templates/LeftAndMain.ss
  13. +1 −1  admin/tests/LeftAndMainTest.php
  14. +1 −1  admin/tests/ModelAdminTest.php
  15. +1 −1  admin/tests/SecurityAdminTest.php
  16. +2 −2 api/DataFormatter.php
  17. +2 −2 api/RestfulServer.php
  18. +2 −2 cli-script.php
  19. +2 −2 conf/ConfigureFromEnv.php
  20. +1 −1  control/Controller.php
  21. +1 −1  control/Director.php
  22. +2 −2 control/NullHTTPRequest.php
  23. +2 −2 control/RequestHandler.php
  24. +1 −1  core/ClassInfo.php
  25. +31 −20 core/Core.php
  26. +1 −1  core/Object.php
  27. +2 −2 core/manifest/ClassManifest.php
  28. +2 −2 css/FileIFrameField.css
  29. +6 −6 css/HasManyFileField.css
  30. +0 −1  dev/BuildTask.php
  31. +1 −1  dev/BulkLoader.php
  32. +2 −2 dev/DevelopmentAdmin.php
  33. +1 −1  dev/FunctionalTest.php
  34. +1 −1  dev/JSTestRunner.php
  35. +3 −13 dev/SapphireInfo.php
  36. +2 −2 dev/SapphireREPL.php
  37. +2 −2 dev/TaskRunner.php
  38. +6 −9 dev/TestRunner.php
  39. +4 −4 dev/install/config-form.html
  40. +3 −2 dev/install/install.php
  41. +23 −34 dev/install/install.php5
  42. +18 −2 dev/phpunit/PhpUnitWrapper.php
  43. +12 −3 dev/phpunit/PhpUnitWrapper_3_4.php
  44. +10 −2 dev/phpunit/PhpUnitWrapper_3_5.php
  45. +1 −1  email/Email.php
  46. +1 −1  email/Mailer.php
  47. +6 −6 filesystem/File.php
  48. +1 −1  filesystem/Folder.php
  49. +2 −2 forms/AjaxUniqueTextField.php
  50. +3 −2 forms/CheckboxSetField.php
  51. +12 −12 forms/ComplexTableField.php
  52. +3 −3 forms/ConfirmedPasswordField.php
  53. +2 −2 forms/DateField.php
  54. +1 −1  forms/DatetimeField.php
  55. +8 −8 forms/FileIFrameField.php
  56. +1 −1  forms/Form.php
  57. +4 −4 forms/HasManyComplexTableField.php
  58. +0 −2  forms/HtmlEditorConfig.php
  59. +4 −4 forms/HtmlEditorField.php
  60. +2 −2 forms/ImageFormAction.php
  61. +3 −3 forms/InlineFormAction.php
  62. +2 −2 forms/NullableField.php
  63. +3 −3 forms/SelectionGroup.php
  64. +6 −6 forms/TabSet.php
  65. +6 −6 forms/TableField.php
  66. +10 −7 forms/TableListField.php
  67. +3 −3 forms/ToggleCompositeField.php
  68. +3 −3 forms/ToggleField.php
  69. +7 −7 forms/TreeDropdownField.php
  70. +8 −8 forms/TreeMultiselectField.php
  71. +7 −7 forms/UploadField.php
  72. +1 −1  forms/Validator.php
  73. +5 −5 forms/gridfield/GridField.php
  74. +1 −1  forms/gridfield/GridFieldPrintButton.php
  75. +3 −3 i18n/i18n.php
  76. +3 −3 i18n/i18nTextCollector.php
  77. +1 −1  lang/ar_SA.php
  78. +1 −1  lang/bg_BG.php
  79. +1 −1  lang/ca_AD.php
  80. +1 −1  lang/cs_CZ.php
  81. +1 −1  lang/da_DK.php
  82. +1 −1  lang/de_DE.php
  83. +1 −1  lang/en_GB.php
  84. +1 −1  lang/eo_XX.php
  85. +1 −1  lang/es_419.php
  86. +1 −1  lang/es_ES.php
  87. +1 −1  lang/es_MX.php
  88. +1 −1  lang/et_EE.php
  89. +1 −1  lang/fi_FI.php
  90. +1 −1  lang/fr_FR.php
  91. +1 −1  lang/he_IL.php
  92. +1 −1  lang/hr_HR.php
  93. +1 −1  lang/hu_HU.php
  94. +1 −1  lang/id_ID.php
  95. +1 −1  lang/it_IT.php
  96. +1 −1  lang/ja_JP.php
  97. +1 −1  lang/lc_XX.php
  98. +1 −1  lang/lt_LT.php
  99. +1 −1  lang/lv_LV.php
  100. +1 −1  lang/ms_MY.php
  101. +1 −1  lang/nb_NO.php
  102. +1 −1  lang/ne_NP.php
  103. +1 −1  lang/nl_NL.php
  104. +1 −1  lang/pl_PL.php
  105. +1 −1  lang/pt_BR.php
  106. +1 −1  lang/pt_PT.php
  107. +1 −1  lang/ru_RU.php
  108. +1 −1  lang/si_LK.php
  109. +1 −1  lang/sk_SK.php
  110. +1 −1  lang/sr_RS.php
  111. +1 −1  lang/sv_SE.php
  112. +1 −1  lang/tr_TR.php
  113. +1 −1  lang/zh_CN.php
  114. +1 −1  lang/zh_TW.php
  115. +4 −4 main.php
  116. +1 −1  model/MySQLDatabase.php
  117. +2 −2 model/fieldtypes/HTMLText.php
  118. +5 −2 parsers/BBCodeParser.php
  119. +11 −8 sake
  120. +3 −3 scss/FileIFrameField.scss
  121. +6 −6 scss/HasManyFileField.scss
  122. +2 −2 security/Group.php
  123. +1 −1  security/Member.php
  124. +2 −2 security/PermissionCheckboxSetField.php
  125. +5 −5 security/Security.php
  126. +1 −1  static-main.php
  127. +6 −6 tasks/ScheduledTask.php
  128. +2 −2 templates/CodeViewer.ss
  129. +3 −3 templates/ComplexTableField.ss
  130. +2 −2 templates/ComplexTableField_popup.ss
  131. +9 −9 templates/Includes/TableListField_PageControls.ss
  132. +1 −1  templates/RelationComplexTableField.ss
  133. +4 −4 templates/SapphireInfo.ss
  134. +3 −3 templates/TableField.ss
  135. +2 −2 templates/TableListField.ss
  136. +2 −2 templates/TestViewer.ss
  137. +3 −3 templates/forms/ToggleCompositeField.ss
  138. +6 −6 tests/FullTestSuite.php
  139. +2 −2 tests/PhpSyntaxTest.php
  140. +9 −6 tests/bootstrap.php
  141. +2 −2 tests/control/DirectorTest.php
  142. +2 −2 tests/core/ClassInfoTest.php
  143. +2 −2 tests/core/CoreTest.php
  144. +29 −29 tests/core/manifest/NamespacedClassManifestTest.php
  145. +3 −3 tests/core/manifest/TokenisedRegularExpressionTest.php
  146. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassA.php
  147. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassB.php
  148. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassC.php
  149. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassD.php
  150. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassE.php
  151. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassF.php
  152. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassG.php
  153. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/classes/ClassH.php
  154. +2 −2 tests/core/manifest/fixtures/namespaced_classmanifest/module/interfaces/InterfaceA.php
  155. +1 −1  tests/dev/CsvBulkLoaderTest.php
  156. +5 −5 tests/dev/DeprecationTest.php
  157. +2 −2 tests/forms/LookupFieldTest.php
  158. +1 −1  tests/forms/gridfield/GridFieldAddExistingAutocompleterTest.php
  159. +2 −2 tests/forms/gridfield/GridFieldDeleteActionTest.php
  160. +2 −2 tests/forms/gridfield/GridFieldEditButtonTest.php
  161. +1 −1  tests/i18n/i18nTest.php
  162. +1 −1  tests/i18n/i18nTextCollectorTest.php
  163. +1 −1  tests/model/DataDifferencerTest.php
  164. +3 −3 tests/model/DataDifferencerTest.yml
  165. +0 −32 tests/salad/step_definitions/db-fixture.rb
  166. +7 −7 tests/templates/RequirementsTest_Conditionals.ss
  167. +3 −3 tests/testing/YamlFixtureTest.php
  168. +6 −6 tests/view/SSViewerTest.php
  169. +3 −3 thirdparty/behaviour/README.md
  170. +2 −2 thirdparty/prototype/prototype.js
  171. +33 −0 view/GenericTemplateGlobalProvider.php
  172. +8 −8 view/Requirements.php
  173. +1 −1  view/SSTemplateParser.php.inc
  174. +1 −1  view/TemplateGlobalProvider.php
View
8 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)
View
6 _config.php
@@ -1,9 +1,9 @@
<?php
/**
- * Sapphire configuration file
+ * Framework configuration file
*
- * Here you can make different settings for the Sapphire module (the core
+ * Here you can make different settings for the Framework module (the core
* module).
*
* For example you can register the authentication methods you wish to use
@@ -45,7 +45,7 @@
/**
* The root directory of TinyMCE
*/
-define('MCE_ROOT', 'sapphire/thirdparty/tinymce/');
+define('MCE_ROOT', FRAMEWORK_DIR . '/thirdparty/tinymce/');
ShortcodeParser::get('default')->register('file_link', array('File', 'link_shortcode_handler'));
View
2  _register_database.php
@@ -5,7 +5,7 @@
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'),
)
);
View
5 admin/_config.php
@@ -22,7 +22,8 @@
'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')->removeButtons('tablecontrols');
HtmlEditorConfig::get('cms')->addButtonsToLine(3, 'tablecontrols');
-CMSMenu::remove_menu_item('CMSProfileController');
+CMSMenu::remove_menu_item('CMSProfileController');
View
86 admin/code/LeftAndMain.php
@@ -209,7 +209,7 @@ function init() {
$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 @@ function init() {
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 @@ function init() {
'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 @@ public function printable() {
$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 @@ public function CMSVersion() {
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 @@ function providePermissions() {
/**
* 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);
View
4 admin/code/MemberImportForm.php
@@ -57,8 +57,8 @@ function __construct($controller, $name, $fields = null, $actions = null, $valid
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');
View
2  admin/code/ModelAdmin.php
@@ -110,7 +110,7 @@ public function init() {
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) {
View
18 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 @@ public function getEditForm($id = null, $fields = null) {
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 @@ public function MemberImportForm() {
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' => ' ',
View
6 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));
+}(jQuery));
View
4 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;
-}
+}
View
4 admin/templates/Includes/CMSLoadingScreen.ss
@@ -1,6 +1,6 @@
<div class="ss-loading-screen">
<div class="loading-logo">
- <img class="loading-animation" src="sapphire/admin/images/spinner.gif" alt="<% _t('LOADING','Loading...',PR_HIGH) %>" />
+ <img class="loading-animation" src="$FrameworkAdminDir/images/spinner.gif" alt="<% _t('LOADING','Loading...',PR_HIGH) %>" />
<noscript><p class="nojs-warning"><span class="message notice"><% _t('REQUIREJS','The CMS requires that you have JavaScript enabled.',PR_HIGH) %></span></p></noscript>
</div>
-</div>
+</div>
View
2  admin/templates/LeftAndMain.ss
@@ -7,7 +7,7 @@
<title>$Title</title>
</head>
-<body class="loading cms" lang="$Locale.RFC1766">
+<body class="loading cms" lang="$Locale.RFC1766" data-frameworkpath="$FrameworkDir">
<% include CMSLoadingScreen %>
View
2  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');
View
2  admin/tests/ModelAdminTest.php
@@ -1,7 +1,7 @@
<?php
class ModelAdminTest extends FunctionalTest {
- static $fixture_file = 'sapphire/admin/tests/ModelAdminTest.yml';
+ static $fixture_file = 'ModelAdminTest.yml';
protected $extraDataObjects = array(
'ModelAdminTest_Admin',
View
2  admin/tests/SecurityAdminTest.php
@@ -5,7 +5,7 @@
*/
class SecurityAdminTest extends FunctionalTest {
- static $fixture_file = 'sapphire/admin/tests/LeftAndMainTest.yml';
+ static $fixture_file = 'LeftAndMainTest.yml';
protected $extraDataObjects = array('LeftAndMainTest_Object');
View
4 api/DataFormatter.php
@@ -1,6 +1,6 @@
<?php
/**
- * A DataFormatter object handles transformation of data from Sapphire model objects to a particular output format, and vice versa.
+ * A DataFormatter object handles transformation of data from SilverStripe model objects to a particular output format, and vice versa.
* This is most commonly used in developing RESTful APIs.
*
* @package sapphire
@@ -297,4 +297,4 @@ public function convertStringToArray($strData) {
user_error('DataFormatter::convertStringToArray not implemented on subclass', E_USER_ERROR);
}
-}
+}
View
4 api/RestfulServer.php
@@ -1,10 +1,10 @@
<?php
/**
- * Sapphire's generic RESTful server.
+ * SilverStripe's generic RESTful server.
*
* This class gives your application a RESTful API for free. All you have to do is define static $api_access = true on
* the appropriate DataObjects. You will need to ensure that all of your data manipulation and security is defined in
- * your model layer (ie, the DataObject classes) and not in your Controllers. This is the recommended design for Sapphire
+ * your model layer (ie, the DataObject classes) and not in your Controllers. This is the recommended design for SilverStripe
* applications.
*
* Enabling restful access on a model will also enable a SOAP API, see {@link SOAPModelAccess}.
View
4 cli-script.php
@@ -3,7 +3,7 @@
/**
* File similar to main.php designed for command-line scripts
*
- * This file lets you execute Sapphire requests from the command-line. The URL is passed as the first argument to the scripts.
+ * This file lets you execute SilverStripe requests from the command-line. The URL is passed as the first argument to the scripts.
*
* @package sapphire
* @subpackage core
@@ -57,7 +57,7 @@
}
/**
- * Include Sapphire's core code
+ * Include SilverStripe's core code
*/
require_once("core/Core.php");
View
4 conf/ConfigureFromEnv.php
@@ -1,8 +1,8 @@
<?php
/**
- * Configure Sapphire from the _ss_environment.php file.
- * Usage: Put "require_once('../sapphire/conf/ConfigureFromEnv.php');" into your _config.php file.
+ * Configure SilverStripe from the _ss_environment.php file.
+ * Usage: Put "require_once('conf/ConfigureFromEnv.php');" into your _config.php file.
*
* If you include this file, you will be able to use the following defines in _ss_environment.php to control
* your site.
View
2  control/Controller.php
@@ -1,7 +1,7 @@
<?php
/**
* Base controller class.
- * Controllers are the cornerstone of all site functionality in Sapphire. The {@link Director}
+ * Controllers are the cornerstone of all site functionality in SilverStripe. The {@link Director}
* selects a controller to pass control to, and then calls {@link run()}. This method will execute
* the appropriate action - either by calling the action method, or displaying the action's template.
*
View
2  control/Director.php
@@ -715,7 +715,7 @@ public static function is_cli() {
* The behaviour of these environments often varies slightly. For example, development sites may have errors dumped to the screen,
* and order confirmation emails might be sent to the developer instead of the client.
*
- * To help with this, Sapphire support the notion of an environment type. The environment type can be dev, test, or live.
+ * To help with this, SilverStripe supports the notion of an environment type. The environment type can be dev, test, or live.
*
* You can set it explicitly with Director::set_environment_tpye(). Or you can use {@link Director::set_dev_servers()} and {@link Director::set_test_servers()}
* to set it implicitly, based on the value of $_SERVER['HTTP_HOST']. If the HTTP_HOST value is one of the servers listed, then
View
4 control/NullHTTPRequest.php
@@ -4,7 +4,7 @@
* Set on controllers on construction time, typically overwritten
* by {@link Controller->handleRequest()} and {@link Controller->handleAction()} later on.
*
- * @param sapphire
+ * @package sapphire
* @subpackage control
*/
class NullHTTPRequest extends SS_HTTPRequest {
@@ -13,4 +13,4 @@ function __construct() {
parent::__construct(null, null);
}
-}
+}
View
4 control/RequestHandler.php
@@ -1,7 +1,7 @@
<?php
/**
- * This class is the base class of any Sapphire object that can be used to handle HTTP requests.
+ * This class is the base class of any SilverStripe object that can be used to handle HTTP requests.
*
* Any RequestHandler object can be made responsible for handling its own segment of the URL namespace.
* The {@link Director} begins the URL parsing process; it will parse the beginning of the URL to identify which
@@ -10,7 +10,7 @@
*
* You can use ?debug_request=1 to view information about the different components and rule matches for a specific URL.
*
- * In Sapphire, URL parsing is distributed throughout the object graph. For example, suppose that we have a search form
+ * In SilverStripe, URL parsing is distributed throughout the object graph. For example, suppose that we have a search form
* that contains a {@link TreeMultiSelectField} named "Groups". We want to use ajax to load segments of this tree as they are needed
* rather than downloading the tree right at the beginning. We could use this URL to get the tree segment that appears underneath
* Group #36: "admin/crm/SearchForm/field/Groups/treesegment/36"
View
2  core/ClassInfo.php
@@ -1,7 +1,7 @@
<?php
/**
* Provides introspection information about the class tree.
- * It's a cached wrapper around the built-in class functions. Sapphire uses class introspection heavily
+ * It's a cached wrapper around the built-in class functions. SilverStripe uses class introspection heavily
* and without the caching it creates an unfortunate performance hit.
*
* @package sapphire
View
51 core/Core.php
@@ -1,6 +1,6 @@
<?php
/**
- * This file is the Sapphire bootstrap. It will get your environment ready to call Director::direct().
+ * This file is the Framework bootstrap. It will get your environment ready to call Director::direct().
*
* It takes care of:
* - Including _ss_environment.php
@@ -20,12 +20,12 @@
* - MODULES_PATH: Not used at the moment
* - THEMES_DIR: Path relative to webroot, e.g. "themes"
* - THEMES_PATH: Absolute filepath, e.g. "/var/www/my-webroot/themes"
- * - SAPPHIRE_DIR: Path relative to webroot, e.g. "sapphire"
- * - SAPPHIRE_PATH:Absolute filepath, e.g. "/var/www/my-webroot/sapphire"
- * - SAPPHIRE_ADMIN_DIR:
- * - SAPPHIRE_ADMIN_PATH:
- * - THIRDPARTY_DIR: Path relative to webroot, e.g. "sapphire/thirdparty"
- * - THIRDPARTY_PATH: Absolute filepath, e.g. "/var/www/my-webroot/sapphire/thirdparty"
+ * - FRAMEWORK_DIR: Path relative to webroot, e.g. "framework"
+ * - FRAMEWORK_PATH:Absolute filepath, e.g. "/var/www/my-webroot/framework"
+ * - FRAMEWORK_ADMIN_DIR: Path relative to webroot, e.g. "framework/admin"
+ * - FRAMEWORK_ADMIN_PATH: Absolute filepath, e.g. "/var/www/my-webroot/framework/admin"
+ * - THIRDPARTY_DIR: Path relative to webroot, e.g. "framework/thirdparty"
+ * - THIRDPARTY_PATH: Absolute filepath, e.g. "/var/www/my-webroot/framework/thirdparty"
*
* @todo This file currently contains a lot of bits and pieces, and its various responsibilities should probably be
* moved into different subsystems.
@@ -124,7 +124,7 @@
* Define system paths
*/
if(!defined('BASE_PATH')) {
- // Assuming that this file is sapphire/core/Core.php we can then determine the base path
+ // Assuming that this file is framework/core/Core.php we can then determine the base path
$candidateBasePath = rtrim(dirname(dirname(dirname(__FILE__))), DIRECTORY_SEPARATOR);
// We can't have an empty BASE_PATH. Making it / means that double-slashes occur in places but that's benign.
// This likely only happens on chrooted environemnts
@@ -155,11 +155,22 @@
define('MODULES_PATH', BASE_PATH . '/' . MODULES_DIR);
define('THEMES_DIR', 'themes');
define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR);
-define('SAPPHIRE_DIR', 'sapphire');
-define('SAPPHIRE_PATH', BASE_PATH . '/' . SAPPHIRE_DIR);
-define('SAPPHIRE_ADMIN_DIR', 'sapphire/admin');
-define('SAPPHIRE_ADMIN_PATH', BASE_PATH . '/' . SAPPHIRE_ADMIN_DIR);
-define('THIRDPARTY_DIR', SAPPHIRE_DIR . '/thirdparty');
+// Relies on this being in a subdir of the framework.
+// If it isn't, or is symlinked to a folder with a different name, you must define FRAMEWORK_DIR
+if(!defined('FRAMEWORK_DIR')) {
+ define('FRAMEWORK_DIR', basename(dirname(dirname(__FILE__))));
+}
+define('FRAMEWORK_PATH', BASE_PATH . '/' . FRAMEWORK_DIR);
+define('FRAMEWORK_ADMIN_DIR', FRAMEWORK_DIR . '/admin');
+define('FRAMEWORK_ADMIN_PATH', BASE_PATH . '/' . FRAMEWORK_ADMIN_DIR);
+
+// These are all deprecated. Use the FRAMEWORK_ versions instead.
+define('SAPPHIRE_DIR', FRAMEWORK_DIR);
+define('SAPPHIRE_PATH', FRAMEWORK_PATH);
+define('SAPPHIRE_ADMIN_DIR', FRAMEWORK_ADMIN_DIR);
+define('SAPPHIRE_ADMIN_PATH', FRAMEWORK_ADMIN_PATH);
+
+define('THIRDPARTY_DIR', FRAMEWORK_DIR . '/thirdparty');
define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR);
define('ASSETS_DIR', 'assets');
define('ASSETS_PATH', BASE_PATH . '/' . ASSETS_DIR);
@@ -202,14 +213,14 @@
if(defined('CUSTOM_INCLUDE_PATH')) {
$includePath = CUSTOM_INCLUDE_PATH . PATH_SEPARATOR
- . BASE_PATH . '/sapphire' . PATH_SEPARATOR
- . BASE_PATH . '/sapphire/parsers' . PATH_SEPARATOR
- . BASE_PATH . '/sapphire/thirdparty' . PATH_SEPARATOR
+ . FRAMEWORK_PATH . PATH_SEPARATOR
+ . FRAMEWORK_PATH . '/parsers' . PATH_SEPARATOR
+ . THIRDPARTY_PATH . PATH_SEPARATOR
. get_include_path();
} else {
- $includePath = BASE_PATH . '/sapphire' . PATH_SEPARATOR
- . BASE_PATH . '/sapphire/parsers' . PATH_SEPARATOR
- . BASE_PATH . '/sapphire/thirdparty' . PATH_SEPARATOR
+ $includePath = FRAMEWORK_PATH . PATH_SEPARATOR
+ . FRAMEWORK_PATH . '/parsers' . PATH_SEPARATOR
+ . THIRDPARTY_PATH . PATH_SEPARATOR
. get_include_path();
}
@@ -288,7 +299,7 @@ function getSysTempDir() {
}
/**
- * Returns the temporary folder that sapphire/silverstripe should use for its cache files
+ * Returns the temporary folder that silverstripe should use for its cache files
* This is loaded into the TEMP_FOLDER define on start up
*
* @param $base The base path to use as the basis for the temp folder name. Defaults to BASE_PATH,
View
2  core/Object.php
@@ -1,6 +1,6 @@
<?php
/**
- * A base class for all sapphire objects to inherit from.
+ * A base class for all SilverStripe objects to inherit from.
*
* This class provides a number of pattern implementations, as well as methods and fixes to add extra psuedo-static
* and method functionality to PHP.
View
4 core/manifest/ClassManifest.php
@@ -246,7 +246,7 @@ public function getConfigs() {
/**
* Returns an array of module names mapped to their paths.
- * "Modules" in sapphire are simply directories with a _config.php file.
+ * "Modules" in SilverStripe are simply directories with a _config.php file.
*
* @return array
*/
@@ -439,4 +439,4 @@ protected function coalesceDescendants($class) {
}
}
-}
+}
View
4 css/FileIFrameField.css
@@ -1,5 +1,5 @@
/*
-typography.css has been removed from sapphire, why shall we still has this? a dynamic typographp.css should be used by
+typography.css has been removed from framework, why shall we still has this? a dynamic typographp.css should be used by
server side call, like Requirements::css();
@import url("typography.css");
*/
@@ -40,7 +40,7 @@ html > 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%; }
View
12 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; }
View
1  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
*/
View
2  dev/BulkLoader.php
@@ -1,7 +1,7 @@
<?php
/**
* A base for bulk loaders of content into the SilverStripe database.
- * Bulk loaders give SilverStripe authors the ability to do large-scale uploads into their Sapphire databases.
+ * Bulk loaders give SilverStripe authors the ability to do large-scale uploads into their SilverStripe databases.
*
* You can configure column-handling,
*
View
4 dev/DevelopmentAdmin.php
@@ -94,7 +94,7 @@ function index() {
$renderer = DebugView::create();
$renderer->writeHeader();
- $renderer->writeInfo("Sapphire Development Tools", Director::absoluteBaseURL());
+ $renderer->writeInfo("SilverStripe Development Tools", Director::absoluteBaseURL());
$base = Director::baseURL();
echo '<div class="options"><ul>';
@@ -106,7 +106,7 @@ function index() {
// CLI mode
} else {
- echo "SAPPHIRE DEVELOPMENT TOOLS\n--------------------------\n\n";
+ echo "SILVERSTRIPE DEVELOPMENT TOOLS\n--------------------------\n\n";
echo "You can execute any of the following commands:\n\n";
foreach($actions as $action => $description) {
echo " sake dev/$action: $description\n";
View
2  dev/FunctionalTest.php
@@ -1,7 +1,7 @@
<?php
/**
- * Sapphire-specific testing object designed to support functional testing of your web app. It simulates get/post
+ * SilverStripe-specific testing object designed to support functional testing of your web app. It simulates get/post
* requests, form submission, and can validate resulting HTML, looking up content by CSS selector.
*
* The example below shows how it works.
View
2  dev/JSTestRunner.php
@@ -121,7 +121,7 @@ function only($request) {
function runTests($tests) {
$this->setUp();
- self::$default_reporter->writeHeader("Sapphire JavaScript Test Runner");
+ self::$default_reporter->writeHeader("SilverStripe JavaScript Test Runner");
self::$default_reporter->writeInfo("All Tests", "Running test cases: " . implode(", ", $tests));
foreach($tests as $test) {
View
16 dev/SapphireInfo.php
@@ -17,18 +17,8 @@ function init() {
}
function Version() {
- $sapphireVersionFile = file_get_contents(BASE_PATH . '/sapphire/silverstripe_version');
-
- if(strstr($sapphireVersionFile, "/sapphire/trunk")) {
- $sapphireVersion = "trunk";
- } else {
- if(preg_match("/sapphire\/(?:(?:branches)|(?:tags))(?:\/rc)?\/([A-Za-z0-9._-]+)\/silverstripe_version/", $sapphireVersionFile, $matches)) {
- $sapphireVersion = $matches[1];
- } else {
- $sapphireVersion = "unknown";
- }
- }
-
+ $sapphireVersion = file_get_contents(FRAMEWORK_PATH . '/silverstripe_version');
+ if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown', 'unknown');
return $sapphireVersion;
}
@@ -41,4 +31,4 @@ function EnvironmentType() {
function BaseURL() {
return Director::absoluteBaseURL();
}
-}
+}
View
4 dev/SapphireREPL.php
@@ -36,7 +36,7 @@ public function error_handler( $errno, $errstr, $errfile, $errline, $errctx ) {
}
function index() {
- if(!Director::is_cli()) return "The Sapphire Interactive Command-line doesn't work in a web browser. Use 'sake interactive' from the command-line to run.";
+ if(!Director::is_cli()) return "The SilverStripe Interactive Command-line doesn't work in a web browser. Use 'sake interactive' from the command-line to run.";
/* Try using PHP_Shell if it exists */
@@ -46,7 +46,7 @@ function index() {
if( empty( $__shell ) ) {
set_error_handler(array($this, 'error_handler'));
- echo "Sapphire Interactive Command-line (REPL interface). Type help for hints.\n\n";
+ echo "SilverStripe Interactive Command-line (REPL interface). Type help for hints.\n\n";
while(true) {
echo SS_Cli::text("?> ", "cyan");
echo SS_Cli::start_colour("yellow");
View
4 dev/TaskRunner.php
@@ -36,7 +36,7 @@ function index() {
if(!Director::is_cli()) {
$renderer = new DebugView();
$renderer->writeHeader();
- $renderer->writeInfo("Sapphire Development Tools: Tasks", Director::absoluteBaseURL());
+ $renderer->writeInfo("SilverStripe Development Tools: Tasks", Director::absoluteBaseURL());
$base = Director::absoluteBaseURL();
echo "<ul>";
@@ -51,7 +51,7 @@ function index() {
$renderer->writeFooter();
// CLI mode
} else {
- echo "SAPPHIRE DEVELOPMENT TOOLS: Tasks\n--------------------------\n\n";
+ echo "SILVERSTRIPE DEVELOPMENT TOOLS: Tasks\n--------------------------\n\n";
foreach($tasks as $task) {
echo " * $task: sake dev/tasks/" . $task['class'] . "\n";
}
View
15 dev/TestRunner.php
@@ -63,12 +63,9 @@ class TestRunner extends Controller {
* @see http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.blacklist-whitelist
*/
static $coverage_filter_dirs = array(
- 'cms/thirdparty',
- 'cms/tests',
- 'cms/lang',
- 'sapphire/thirdparty',
- 'sapphire/tests',
- 'sapphire/lang',
+ '*/thirdparty',
+ '*/tests',
+ '*/lang',
);
/**
@@ -198,7 +195,7 @@ function coverageOnly($request) {
/**
* Run coverage 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".
*/
function coverageModule($request) {
$this->module($request, true);
@@ -229,7 +226,7 @@ function only($request, $coverage = false) {
/**
* 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".
*/
function module($request, $coverage = false) {
self::use_test_manifest();
@@ -285,7 +282,7 @@ class_exists($className);
restore_error_handler();
- self::$default_reporter->writeHeader("Sapphire Test Runner");
+ self::$default_reporter->writeHeader("SilverStripe Test Runner");
if (count($classList) > 1) {
self::$default_reporter->writeInfo("All Tests", "Running test cases: ",implode(", ", $classList));
} else
View
8 dev/install/config-form.html
@@ -6,9 +6,9 @@
<head>
<title>SilverStripe CMS / Framework Installation</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <script type="text/javascript" src="sapphire/thirdparty/jquery/jquery.js"></script>
- <script type="text/javascript" src="sapphire/dev/install/install.js"></script>
- <link rel="stylesheet" type="text/css" href="sapphire/dev/install/css/install.css">
+ <script type="text/javascript" src="<?php echo FRAMEWORK_NAME; ?>/thirdparty/jquery/jquery.js"></script>
+ <script type="text/javascript" src="<?php echo FRAMEWORK_NAME; ?>/dev/install/install.js"></script>
+ <link rel="stylesheet" type="text/css" href="<?php echo FRAMEWORK_NAME; ?>/dev/install/css/install.css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
@@ -276,7 +276,7 @@ <h3 class="sectionHeading" id="install">Confirm Install <small>Step 5 of 5</smal
<span id="saving_top" style="display: none">
&nbsp;
- <img src="sapphire/images/network-save.gif">
+ <img src="<?php echo FRAMEWORK_NAME; ?>/images/network-save.gif">
(this will take a minute or so)
</span>
</p>
View
5 dev/install/install.php
@@ -12,11 +12,12 @@
/**
* PHP version check. Make sure we've got at least PHP 5.3.2 in the most friendly way possible
*/
+define('FRAMEWORK_NAME', 'framework');
if (version_compare(phpversion(), '5.3.2', '<')) {
header("HTTP/1.1 500 Server Error");
- echo str_replace('$PHPVersion', phpversion(), file_get_contents("sapphire/dev/install/php5-required.html"));
+ echo str_replace(array('$PHPVersion', 'sapphire'), array(phpversion(), FRAMEWORK_NAME), file_get_contents(FRAMEWORK_NAME . "/dev/install/php5-required.html"));
die();
}
-include('sapphire/dev/install/install.php5');
+include(FRAMEWORK_NAME . '/dev/install/install.php5');
View
57 dev/install/install.php5
@@ -11,7 +11,7 @@
/**
* SilverStripe CMS Installer
- * This installer doesn't use any of the fancy Sapphire stuff in case it's unsupported.
+ * This installer doesn't use any of the fancy SilverStripe stuff in case it's unsupported.
*/
// speed up mysql_connect timeout if the server can't be found
@@ -41,11 +41,11 @@ if($envFileExists) {
}
}
-include_once('sapphire/core/Object.php');
-include_once('sapphire/view/TemplateGlobalProvider.php');
-include_once('sapphire/i18n/i18n.php');
-include_once('sapphire/dev/install/DatabaseConfigurationHelper.php');
-include_once('sapphire/dev/install/DatabaseAdapterRegistry.php');
+include_once(FRAMEWORK_NAME . '/core/Object.php');
+include_once(FRAMEWORK_NAME . '/view/TemplateGlobalProvider.php');
+include_once(FRAMEWORK_NAME . '/i18n/i18n.php');
+include_once(FRAMEWORK_NAME . '/dev/install/DatabaseConfigurationHelper.php');
+include_once(FRAMEWORK_NAME . '/dev/install/DatabaseAdapterRegistry.php');
// Set default locale, but try and sniff from the user agent
$locales = i18n::$common_locales;
@@ -135,14 +135,8 @@ if(file_exists('mysite/_config.php')) {
}
}
-if(file_exists('sapphire/silverstripe_version')) {
- $sapphireVersionFile = file_get_contents('sapphire/silverstripe_version');
- if(strstr($sapphireVersionFile, "/sapphire/trunk")) {
- $silverstripe_version = "trunk";
- } else {
- preg_match("/sapphire\/(?:(?:branches)|(?:tags))(?:\/rc)?\/([A-Za-z0-9._-]+)\/silverstripe_version/", $sapphireVersionFile, $matches);
- $silverstripe_version = $matches[1];
- }
+if(file_exists(FRAMEWORK_NAME . '/silverstripe_version')) {
+ $silverstripe_version = file_get_contents(FRAMEWORK_NAME . '/silverstripe_version');
} else {
$silverstripe_version = "unknown";
}
@@ -192,7 +186,7 @@ if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) {
if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) {
// Confirm before reinstalling
if(!$installFromCli && $alreadyInstalled) {
- include('sapphire/dev/install/config-form.html');
+ include(FRAMEWORK_NAME . '/dev/install/config-form.html');
} else {
$inst = new Installer();
@@ -205,7 +199,7 @@ if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq-
// Show the config form
} else {
- include('sapphire/dev/install/config-form.html');
+ include(FRAMEWORK_NAME . '/dev/install/config-form.html');
}
/**
@@ -328,14 +322,14 @@ class InstallRequirements {
$this->requirePHPVersion('5.3.10', '5.3.2', array("PHP Configuration", "PHP5 installed", null, "PHP version " . phpversion()));
// Check that we can identify the root folder successfully
- $this->requireFile('sapphire/dev/install/config-form.html', array("File permissions",
+ $this->requireFile(FRAMEWORK_NAME . '/dev/install/config-form.html', array("File permissions",
"Does the webserver know where files are stored?",
"The webserver isn't letting me identify where files are stored.",
$this->getBaseDir()
));
$this->requireModule('mysite', array("File permissions", "mysite/ directory exists?"));
- $this->requireModule('sapphire', array("File permissions", "sapphire/ directory exists?"));
+ $this->requireModule(FRAMEWORK_NAME, array("File permissions", FRAMEWORK_NAME . "/ directory exists?"));
if($isApache) {
$this->requireWriteable('.htaccess', array("File permissions", "Is the .htaccess file writeable?", null));
@@ -944,8 +938,8 @@ class Installer extends InstallRequirements {
<html>
<head>
<title>Installing SilverStripe...</title>
- <link rel="stylesheet" type="text/css" href="sapphire/dev/install/css/install.css" />
- <script src="sapphire/thirdparty/jquery/jquery.js"></script>
+ <link rel="stylesheet" type="text/css" href="<?php echo FRAMEWORK_NAME; ?>/dev/install/css/install.css" />
+ <script src="<?php echo FRAMEWORK_NAME; ?>/thirdparty/jquery/jquery.js"></script>
</head>
<body>
<div class="install-header">
@@ -978,14 +972,8 @@ class Installer extends InstallRequirements {
flush();
if(isset($config['stats'])) {
- if(file_exists('sapphire/silverstripe_version')) {
- $sapphireVersionFile = file_get_contents('sapphire/silverstripe_version');
- if(strstr($sapphireVersionFile, "/sapphire/trunk")) {
- $silverstripe_version = "trunk";
- } else {
- preg_match("/sapphire\/(?:(?:branches)|(?:tags))(?:\/rc)?\/([A-Za-z0-9._-]+)\/silverstripe_version/", $sapphireVersionFile, $matches);
- $silverstripe_version = $matches[1];
- }
+ if(file_exists(FRAMEWORK_NAME . '/silverstripe_version')) {
+ $silverstripe_version = file_get_contents(FRAMEWORK_NAME . '/silverstripe_version');
} else {
$silverstripe_version = "unknown";
}
@@ -1117,9 +1105,9 @@ PHP
}
}
- // Load the sapphire runtime
- $_SERVER['SCRIPT_FILENAME'] = dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/sapphire/main.php';
- chdir('sapphire');
+ // Load the SilverStripe runtime
+ $_SERVER['SCRIPT_FILENAME'] = dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/' . FRAMEWORK_NAME . '/main.php';
+ chdir(FRAMEWORK_NAME);
// Rebuild the manifest
$_GET['flush'] = true;
@@ -1207,7 +1195,7 @@ HTML;
if($base != '.') $baseClause = "RewriteBase '$base'\n";
else $baseClause = "";
-
+ $modulePath = FRAMEWORK_NAME;
$rewrite = <<<TEXT
<Files *.ss>
Order deny,allow
@@ -1233,7 +1221,7 @@ ErrorDocument 500 /assets/error-500.html
$baseClause
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
+ RewriteRule .* $modulePath/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
TEXT;
@@ -1258,6 +1246,7 @@ TEXT;
* so that rewriting capability can be use.
*/
function createWebConfig() {
+ $modulePath = FRAMEWORK_NAME;
$content = <<<TEXT
<?xml version="1.0" encoding="utf-8"?>
<configuration>
@@ -1276,7 +1265,7 @@ TEXT;
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
- <action type="Rewrite" url="sapphire/main.php?url={R:1}" appendQueryString="true" />
+ <action type="Rewrite" url="$modulePath/main.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
View
20 dev/phpunit/PhpUnitWrapper.php
@@ -189,7 +189,7 @@ protected function afterRunTests() {
}
/**
- * Perform all tests, added to the suite and initialises Sapphire to collect
+ * Perform all tests, added to the suite and initialises SilverStripe to collect
* the results of the unit tests.
*
* This method calls @see beforeRunTests and @see afterRunTests.
@@ -211,6 +211,22 @@ public function runTests() {
$this->getSuite()->run($this->getFrameworkTestResults());
$this->aferRunTests();
}
+
+ /**
+ * Returns an array containing all the module folders in the base dir.
+ *
+ * @return array
+ */
+ protected function moduleDirectories() {
+ $files = scandir(BASE_PATH);
+ $modules = array();
+ foreach($files as $file) {
+ if(is_dir(BASE_PATH . "/$file") && file_exists(BASE_PATH . "/$file/_config.php")) {
+ $modules[] = $file;
+ }
+ }
+ return $modules;
+ }
}
/**
@@ -237,7 +253,7 @@ class PhpUnitWrapper_Exception extends Exception {}
if(!PhpUnitWrapper::has_php_unit()) {
/**
* PHPUnit is a testing framework that can be installed using PEAR.
- * It's not bundled with Sapphire, you will need to install it yourself.
+ * It's not bundled with SilverStripe, you will need to install it yourself.
*
* @package sapphire
* @subpackage testing
View
15 dev/phpunit/PhpUnitWrapper_3_4.php
@@ -29,9 +29,18 @@ protected function beforeRunTests() {
if($this->getCoverageStatus()) {
// blacklist selected folders from coverage report
+ $modules = $this->moduleDirectories();
+
foreach(TestRunner::$coverage_filter_dirs as $dir) {
- PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/' . $dir);
- }
+ if($dir[0] == '*') {
+ $dir = substr($dir, 1);
+ foreach ($modules as $module) {
+ PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/' . $dir);
+ }
+ } else {
+ PHPUnit_Util_Filter::addDirectoryToFilter(BASE_PATH . '/' . $dir);
+ }
+ }
$this->getFrameworkTestResults()->collectCodeCoverageInformation(true);
}
}
@@ -60,4 +69,4 @@ protected function aferRunTests() {
}
}
-}
+}
View
12 dev/phpunit/PhpUnitWrapper_3_5.php
@@ -39,9 +39,17 @@ protected function beforeRunTests() {
$coverage = $this->coverage;
$filter = $coverage->filter();
+ $modules = $this->moduleDirectories();
foreach(TestRunner::$coverage_filter_dirs as $dir) {
- $filter->addDirectoryToBlacklist(BASE_PATH . '/' . $dir);
+ if($dir[0] == '*') {
+ $dir = substr($dir, 1);
+ foreach ($modules as $module) {
+ $filter->addDirectoryToBlacklist(BASE_PATH . "/$module/$dir");
+ }
+ } else {
+ $filter->addDirectoryToBlacklist(BASE_PATH . '/' . $dir);
+ }
}
$filter->addFileToBlacklist(__FILE__, 'PHPUNIT');
@@ -65,4 +73,4 @@ protected function aferRunTests() {
}
}
-}
+}
View
2  email/Email.php
@@ -647,7 +647,7 @@ function index() {
return;
}
- // Check against access key defined in sapphire/_config.php
+ // Check against access key defined in framework/_config.php
if( $_REQUEST['Key'] != EMAIL_BOUNCEHANDLER_KEY) {
echo 'Error: Access validation failed. Invalid "Key" specified.';
return;
View
2  email/Mailer.php
@@ -447,7 +447,7 @@ function getMimeType($filename) {
*/
function loadMimeTypes() {
$mimetypePathCustom = '/etc/mime.types';
- $mimetypePathGeneric = Director::baseFolder() . '/sapphire/email/mime.types';
+ $mimetypePathGeneric = FRAMEWORK_PATH . '/email/mime.types';
$mimeTypes = file_exists($mimetypePathGeneric) ? file($mimetypePathGeneric) : file($mimetypePathCustom);
foreach($mimeTypes as $typeSpec) {
if(($typeSpec = trim($typeSpec)) && substr($typeSpec,0,1) != "#") {
View
12 filesystem/File.php
@@ -3,7 +3,7 @@
* This class handles the representation of a file on the filesystem within the framework.
* Most of the methods also handle the {@link Folder} subclass.
*
- * Note: The files are stored in the assets/ directory, but sapphire
+ * Note: The files are stored in the assets/ directory, but SilverStripe
* looks at the db object to gather information about a file such as URL
* It then uses this for all processing functions (like image manipulation).
*
@@ -55,7 +55,7 @@
*
* Typically both files and folders should be created first on the filesystem,
* and then reflected in as database records. Folders can be created recursively
- * from sapphire both in the database and filesystem through {@link Folder::findOrMake()}.
+ * from SilverStripe both in the database and filesystem through {@link Folder::findOrMake()}.
* Ensure that you always set a "Filename" property when writing to the database,
* leaving it out can lead to unexpected results.
*
@@ -415,21 +415,21 @@ function CMSThumbnail() {
/**
* Return the relative URL of an icon for the file type,
* based on the {@link appCategory()} value.
- * Images are searched for in "sapphire/images/app_icons/".
+ * Images are searched for in "framework/images/app_icons/".
*
* @return String
*/
function Icon() {
$ext = $this->Extension;
- if(!Director::fileExists(SAPPHIRE_DIR . "/images/app_icons/{$ext}_32.gif")) {
+ if(!Director::fileExists(FRAMEWORK_DIR . "/images/app_icons/{$ext}_32.gif")) {
$ext = $this->appCategory();
}
- if(!Director::fileExists(SAPPHIRE_DIR . "/images/app_icons/{$ext}_32.gif")) {
+ if(!Director::fileExists(FRAMEWORK_DIR . "/images/app_icons/{$ext}_32.gif")) {
$ext = "generic";
}
- return SAPPHIRE_DIR . "/images/app_icons/{$ext}_32.gif";
+ return FRAMEWORK_DIR . "/images/app_icons/{$ext}_32.gif";
}
/**
View
2  filesystem/Folder.php
@@ -12,7 +12,7 @@
* to avoid touching the filesystem.
*
* See {@link File} documentation for more details about the
- * relationship between the database and filesystem in the sapphire file APIs.
+ * relationship between the database and filesystem in the SilverStripe file APIs.
*
* @package sapphire
* @subpackage filesystem
View
4 forms/AjaxUniqueTextField.php
@@ -31,8 +31,8 @@ function __construct($name, $title, $restrictedField, $restrictedTable, $value =
function Field($properties = array()) {
Requirements::javascript(THIRDPARTY_DIR . "/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour/behaviour.js");
- Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . "/javascript/UniqueFields.js");
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(FRAMEWORK_DIR . "/javascript/UniqueFields.js");
$url = Convert::raw2att( $this->validateURL );
View
5 forms/CheckboxSetField.php
@@ -44,7 +44,7 @@ class CheckboxSetField extends OptionsetField {
* e.g. SQLMap, ArrayList or an array.
*/
function Field($properties = array()) {
- Requirements::css(SAPPHIRE_DIR . '/css/CheckboxSetField.css');
+ Requirements::css(FRAMEWORK_DIR . '/css/CheckboxSetField.css');
$source = $this->source;
$values = $this->value;
@@ -286,4 +286,5 @@ function Type() {
function ExtraOptions() {
return FormField::ExtraOptions();
}
-}
+
+}
View
24 forms/ComplexTableField.php
@@ -211,12 +211,12 @@ function FieldHolder($properties = array()) {
Requirements::javascript(THIRDPARTY_DIR . "/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js");
Requirements::javascript(THIRDPARTY_DIR . "/greybox/greybox.js");
- Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js');
- Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/TableListField.js');
+ Requirements::javascript(FRAMEWORK_DIR . "/javascript/ComplexTableField.js");
Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css");
- Requirements::css(SAPPHIRE_DIR . "/css/TableListField.css");
- Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css");
+ Requirements::css(FRAMEWORK_DIR . "/css/TableListField.css");
+ Requirements::css(FRAMEWORK_DIR . "/css/ComplexTableField.css");
// set caption if required
if($this->popupCaption) {
@@ -834,13 +834,13 @@ function __construct($controller, $name, $fields, $validator, $readonly, $dataOb
function forTemplate() {
$ret = parent::forTemplate();
- Requirements::css(SAPPHIRE_DIR . '/css/ComplexTableField_popup.css');
- Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
- Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
- Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/scriptaculous.js");
- Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/scriptaculous/controls.js");
- Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");
+ Requirements::css(FRAMEWORK_DIR . '/css/ComplexTableField_popup.css');
+ Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/prototype/prototype.js");
+ Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/behaviour/behaviour.js");
+ Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/scriptaculous/scriptaculous.js");
+ Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/scriptaculous/scriptaculous/controls.js");
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(FRAMEWORK_DIR . "/javascript/ComplexTableField_popup.js");
// Append requirements from instance callbacks
$parent = $this->getParentController();
View
6 forms/ConfirmedPasswordField.php
@@ -94,9 +94,9 @@ function __construct($name, $title = null, $value = "", $form = null, $showOnCli
}
function Field($properties = array()) {
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/ConfirmedPasswordField.js');
- Requirements::css(SAPPHIRE_DIR . '/css/ConfirmedPasswordField.css');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/ConfirmedPasswordField.js');
+ Requirements::css(FRAMEWORK_DIR . '/css/ConfirmedPasswordField.css');
$content = '';
View
4 forms/DateField.php
@@ -504,7 +504,7 @@ function onAfterRender($html) {
if($this->getField()->getConfig('showcalendar')) {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
// Include language files (if required)
$lang = $this->getLang();
@@ -518,7 +518,7 @@ function onAfterRender($html) {
));
}
- Requirements::javascript(SAPPHIRE_DIR . "/javascript/DateField.js");
+ Requirements::javascript(FRAMEWORK_DIR . "/javascript/DateField.js");
}
return $html;
View
2  forms/DatetimeField.php
@@ -85,7 +85,7 @@ function FieldHolder($properties = array()) {
}
function Field($properties = array()) {
- Requirements::css(SAPPHIRE_DIR . '/css/DatetimeField.css');
+ Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css');
$tzField = ($this->getConfig('usertimezone')) ? $this->timezoneField->FieldHolder() : '';
return $this->dateField->FieldHolder() .
View
16 forms/FileIFrameField.php
@@ -61,10 +61,10 @@ public function dataClass() {
public function Field($properties = array()) {
Deprecation::notice('3.0', 'Use UploadField');
- Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
- Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
+ Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
if($this->form->getRecord() && $this->form->getRecord()->exists()) {
@@ -113,11 +113,11 @@ public function AttachedFile() {
public function iframe() {
// clear the requirements added by any parent controllers
Requirements::clear();
- Requirements::add_i18n_javascript('sapphire/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
- Requirements::javascript('sapphire/javascript/FileIFrameField.js');
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/FileIFrameField.js');
- Requirements::css('sapphire/css/FileIFrameField.css');
+ Requirements::css(FRAMEWORK_DIR . '/css/FileIFrameField.css');
return $this->renderWith('FileIframeField_iframe');
}
View
2  forms/Form.php
@@ -1,7 +1,7 @@
<?php
/**
* Base class for all forms.
- * The form class is an extensible base for all forms on a sapphire application. It can be used
+ * The form class is an extensible base for all forms on a SilverStripe application. It can be used
* either by extending it, and creating processor methods on the subclass, or by creating instances
* of form whose actions are handled by the parent controller.
*
View
8 forms/HasManyComplexTableField.php
@@ -67,10 +67,10 @@ function __construct($controller, $name, $sourceClass, $fieldList = null, $detai
function FieldHolder($properties = array()) {
$ret = parent::FieldHolder($properties);
- Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
- Requirements::javascript(SAPPHIRE_DIR . "/javascript/HasManyFileField.js");
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/RelationComplexTableField.js');
- Requirements::css(SAPPHIRE_DIR . '/css/HasManyFileField.css');
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
+ Requirements::javascript(FRAMEWORK_DIR . "/javascript/HasManyFileField.js");
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/RelationComplexTableField.js');
+ Requirements::css(FRAMEWORK_DIR . '/css/HasManyFileField.css');
return $ret;
}
View
2  forms/HtmlEditorConfig.php
@@ -81,8 +81,6 @@ static function get_available_configs_map() {
'safari_warning' => false,
'relative_urls' => true,
'verify_html' => true,
-
- 'spellchecker_rpc_url' => 'sapphire/thirdparty/tinymce-spellchecker/rpc.php'
);
/**
View
8 forms/HtmlEditorField.php
@@ -255,11 +255,11 @@ class HtmlEditorField_Toolbar extends RequestHandler {
function __construct($controller, $name) {
parent::__construct();
- Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/jquery/jquery.js");
+ Requirements::javascript(FRAMEWORK_DIR . "/thirdparty/jquery/jquery.js");
Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
- Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ssui.core.js');
- Requirements::javascript(SAPPHIRE_DIR ."/javascript/HtmlEditorField.js");
+ Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ssui.core.js');
+ Requirements::javascript(FRAMEWORK_DIR ."/javascript/HtmlEditorField.js");
Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
@@ -389,7 +389,7 @@ function MediaForm() {
$fromCMS->addExtraClass('content');
$selectComposite->addExtraClass('content-select');
- Requirements::css(SAPPHIRE_DIR . '/css/AssetUploadField.css');
+ Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
$computerUploadField = Object::create('UploadField', 'AssetUploadField', '');
$computerUploadField->setConfig('previewMaxWidth', 40);
$computerUploadField->setConfig('previewMaxHeight', 30);
View
4 forms/ImageFormAction.php
@@ -28,11 +28,11 @@ function __construct($action, $title = "", $image = "", $hoverImage = null, $cla
function Field($properties = array()) {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/ImageFormAction.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/ImageFormAction.js');
$classClause = '';
if($this->className) $classClause = $this->className . ' ';
if($this->hoverImage) $classClause .= 'rollover ';
return "<input class=\"{$classClause}action\" id=\"" . $this->id() . "\" type=\"image\" name=\"{$this->name}\" src=\"{$this->image}\" title=\"{$this->title}\" alt=\"{$this->title}\" />";
}
-}
+}
View
6 forms/InlineFormAction.php
@@ -3,7 +3,7 @@
* Render a button that will submit the form its contained in through ajax.
* If you want to add custom behaviour, please set {@link inlcudeDefaultJS()} to FALSE and work with behaviour.js.
*
- * @see sapphire/javascript/InlineFormAction.js
+ * @see framework/javascript/InlineFormAction.js
*
* @package forms
* @subpackage actions
@@ -29,7 +29,7 @@ function performReadonlyTransformation() {
function Field($properties = array()) {
if($this->includeDefaultJS) {
- Requirements::javascriptTemplate(SAPPHIRE_DIR . '/javascript/InlineFormAction.js',array('ID'=>$this->id()));
+ Requirements::javascriptTemplate(FRAMEWORK_DIR . '/javascript/InlineFormAction.js',array('ID'=>$this->id()));
}
return "<input type=\"submit\" name=\"action_{$this->name}\" value=\"{$this->title}\" id=\"{$this->id()}\" class=\"action{$this->extraClass}\" />";
@@ -40,7 +40,7 @@ function Title() {
}
/**
- * Optionally disable the default javascript include (sapphire/javascript/InlineFormAction.js),
+ * Optionally disable the default javascript include (framework/javascript/InlineFormAction.js),
* which routes to an "admin-custom"-URL.
*
* @param $bool boolean
View
4 forms/NullableField.php
@@ -74,7 +74,7 @@ function getIsNullId() {
/**
* (non-PHPdoc)
- * @see sapphire/forms/FormField#Field()
+ * @see framework/forms/FormField#Field()
*/
function Field($properties = array()) {
if ( $this->isReadonly()) {
@@ -114,7 +114,7 @@ function setName($name) {
/**
* (non-PHPdoc)
- * @see sapphire/forms/FormField#debug()
+ * @see framework/forms/FormField#debug()
*/
function debug() {
$result = "$this->class ($this->name: $this->title : <font style='color:red;'>$this->message</font>) = ";
View
6 forms/SelectionGroup.php
@@ -25,7 +25,7 @@ function __construct($name, $items) {
parent::__construct($items);
- Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css');
+ Requirements::css(FRAMEWORK_DIR . '/css/SelectionGroup.css');
}
function FieldSet() {
@@ -69,8 +69,8 @@ function hasData() {
function FieldHolder($properties = array()) {
Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js');
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/SelectionGroup.js');
- Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/SelectionGroup.js');
+ Requirements::css(FRAMEWORK_DIR . '/css/SelectionGroup.css');
$obj = $properties ? $this->customise($properties) : $this;
View
12 forms/TabSet.php
@@ -68,15 +68,15 @@ public function id() {
* The HTML is a standardised format, containing a &lt;ul;
*/
public function FieldHolder($properties = array()) {
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-cookie/jquery.cookie.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery-cookie/jquery.cookie.js');
- Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery.ui.css');
+ Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery.ui.css');