Skip to content
This repository
Browse code

API-CHANGE sapphire folder can now be renamed.

  • Loading branch information...
commit c4e018928eb6b3cf925886d5b23ce693602971b3 1 parent b8e86ae
Simon Welsh authored April 12, 2012 halkyon committed April 15, 2012
4  README.md
Source Rendered
... ...
@@ -1,6 +1,6 @@
1 1
 ## Overview
2 2
 
3  
-PHP5 Content Management System (CMS), see [http://silverstripe.org](http://silverstripe.org). Requires the [`sapphire`](http://github.com/silverstripe/sapphire) module and a [`silverstripe-installer`](http://github.com/silverstripe/silverstripe-installer) base project.
  3
+PHP5 Content Management System (CMS), see [http://silverstripe.org](http://silverstripe.org). Requires the [`framework`](http://github.com/silverstripe/sapphire) module and a [`silverstripe-installer`](http://github.com/silverstripe/silverstripe-installer) base project.
4 4
 
5 5
 ## Installation ##
6 6
 
@@ -33,4 +33,4 @@ and [installation from source](http://doc.silverstripe.org/sapphire/en/installat
33 33
 	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
34 34
 	GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35 35
 	STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
36  
-	OF SUCH DAMAGE.
  36
+	OF SUCH DAMAGE.
8  code/controllers/AssetAdmin.php
@@ -62,13 +62,13 @@ public function init() {
62 62
 		Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js');
63 63
 		Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
64 64
 		Requirements::css(CMS_DIR . "/css/screen.css");
65  
-
  65
+		$frameworkDir = FRAMEWORK_DIR;
66 66
 		Requirements::customScript(<<<JS
67 67
 			_TREE_ICONS = {};
68 68
 			_TREE_ICONS['Folder'] = {
69  
-					fileIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif',
70  
-					openFolderIcon: 'sapphire/javascript/tree/images/page-openfolder.gif',
71  
-					closedFolderIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif'
  69
+					fileIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif',
  70
+					openFolderIcon: '$frameworkDir/javascript/tree/images/page-openfolder.gif',
  71
+					closedFolderIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif'
72 72
 			};
73 73
 JS
74 74
 		);
4  code/controllers/CMSFileAddController.php
@@ -52,8 +52,8 @@ public function currentPageID() {
52 52
 	 * @todo what template is used here? AssetAdmin_UploadContent.ss doesn't seem to be used anymore
53 53
 	 */
54 54
 	public function getEditForm($id = null, $fields = null) {
55  
-		Requirements::javascript(SAPPHIRE_DIR . '/javascript/AssetUploadField.js');
56  
-		Requirements::css(SAPPHIRE_DIR . '/css/AssetUploadField.css');
  55
+		Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
  56
+		Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
57 57
 
58 58
 		$folder = $this->currentPage();
59 59
 
6  code/controllers/CMSMain.php
@@ -1163,12 +1163,12 @@ function duplicatewithchildren($request) {
1163 1163
 	 * @return string
1164 1164
 	 */
1165 1165
 	public function CMSVersion() {
1166  
-		$cmsVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
  1166
+		$cmsVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
1167 1167
 		if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
1168  
-		$sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
  1168
+		$sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
1169 1169
 		if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
1170 1170
 		return sprintf(
1171  
-			"cms: %s, sapphire: %s",
  1171
+			"cms: %s, framework: %s",
1172 1172
 			$cmsVersion,
1173 1173
 			$sapphireVersion
1174 1174
 		);
2  code/controllers/ContentController.php
@@ -339,7 +339,7 @@ public function SilverStripeNavigator() {
339 339
 		if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {			
340 340
 			if($this->dataRecord) {
341 341
 				Requirements::css(CMS_DIR . '/css/SilverStripeNavigator.css');
342  
-				Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
  342
+				Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
343 343
 				Requirements::javascript(CMS_DIR . '/javascript/SilverStripeNavigator.js');
344 344
 				
345 345
 				$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
2  code/controllers/ReportAdmin.php
@@ -50,7 +50,7 @@ public function init() {
50 50
 		HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
51 51
 
52 52
 		// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
53  
-		Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
  53
+		Requirements::block(FRAMEWORK_DIR . '/javascript/HtmlEditorField.js');
54 54
 	}
55 55
 
56 56
 	/**
4  code/model/SiteTree.php
@@ -2687,8 +2687,8 @@ function i18n_singular_name() {
2687 2687
 	function provideI18nEntities() {
2688 2688
 		$entities = parent::provideI18nEntities();
2689 2689
 		
2690  
-		if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = 'sapphire';
2691  
-		if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = 'sapphire';		
  2690
+		if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
  2691
+		if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;		
2692 2692
 
2693 2693
 		$types = self::page_type_classes();
2694 2694
 		foreach($types as $type) {
4  code/staticpublisher/FilesystemPublisher.php
@@ -50,7 +50,7 @@ static function set_static_base_url($url) {
50 50
 	
51 51
 	/**
52 52
 	 * @param $destFolder The folder to save the cached site into.
53  
-	 *   This needs to be set in sapphire/static-main.php as well through the {@link $cacheBaseDir} variable.
  53
+	 *   This needs to be set in framework/static-main.php as well through the {@link $cacheBaseDir} variable.
54 54
 	 * @param $fileExtension  The file extension to use, e.g 'html'.  
55 55
 	 *   If omitted, then each page will be placed in its own directory, 
56 56
 	 *   with the filename 'index.html'.  If you set the extension to PHP, then a simple PHP script will
@@ -69,7 +69,7 @@ function __construct($destFolder, $fileExtension = null) {
69 69
 	/**
70 70
 	 * Transforms relative or absolute URLs to their static path equivalent.
71 71
 	 * This needs to be the same logic that's used to look up these paths through
72  
-	 * sapphire/static-main.php. Does not include the {@link $destFolder} prefix.
  72
+	 * framework/static-main.php. Does not include the {@link $destFolder} prefix.
73 73
 	 * Replaces various special characters in the resulting filename similar to {@link SiteTree::generateURLSegment()}.
74 74
 	 * 
75 75
 	 * Examples (without $domain_based_caching):
5  code/staticpublisher/RsyncMultiHostPublisher.php
@@ -39,6 +39,7 @@ static function set_excluded_folders($folders) {
39 39
 	function publishPages($urls) {
40 40
 		parent::publishPages($urls);
41 41
 		$base = Director::baseFolder();
  42
+		$framework = FRAMEWORK_DIR;
42 43
 
43 44
 		// Get variable that can turn off the rsync component of publication 
44 45
 		if(isset($_GET['norsync']) && $_GET['norsync']) return;
@@ -53,8 +54,8 @@ function publishPages($urls) {
53 54
 			$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
54 55
 			// Then transfer "safe" PHP from the cache/ directory
55 56
 			$rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`;
56  
-			// Transfer sapphire/static-main.php to the target
57  
-			$rsyncOutput .= `cd $base; rsync -av -e ssh --delete sapphire/static-main.php $target/sapphire`;
  57
+			// Transfer framework/static-main.php to the target
  58
+			$rsyncOutput .= `cd $base; rsync -av -e ssh --delete $framework/static-main.php $target/$framework`;
58 59
 			if(StaticPublisher::echo_progress()) echo $rsyncOutput;
59 60
 		}
60 61
 	}
4  code/staticpublisher/htaccess_example_rsyncsingleserver
@@ -44,5 +44,5 @@ RewriteRule .* /cache/index.html [L]
44 44
 RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
45 45
 RewriteCond %{REQUEST_URI} ^(.*)$
46 46
 RewriteCond %{REQUEST_FILENAME} !-f
47  
-RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
48  
-### SILVERSTRIPE END ###
  47
+RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]
  48
+### SILVERSTRIPE END ###
2  code/widgets/Widget.php
@@ -133,7 +133,7 @@ function populateFromPostData($data) {
133 133
  * within a {@link ContentController}.
134 134
  * 
135 135
  * ## Forms
136  
- * You can add forms like in any other sapphire controller.
  136
+ * You can add forms like in any other SilverStripe controller.
137 137
  * If you need access to the widget from within a form,
138 138
  * you can use `$this->controller->getWidget()` inside the form logic.
139 139
  * Note: Widget controllers currently only work on {@link Page} objects,
2  css/CMSMain.css
... ...
@@ -1,4 +1,4 @@
1  
-/** Style  custom to the CMSMain admin interface. CMSMain extends the built in  sapphire admin section styles. As much as possible we want to use those  built in styles. If anything in this file can be implemented in a generic  way then it should be include in the admin scss files.  @package cms */
  1
+/** Style  custom to the CMSMain admin interface. CMSMain extends the built in SilverStripe admin section styles. As much as possible we want to use those  built in styles. If anything in this file can be implemented in a generic  way then it should be include in the admin scss files.  @package cms */
2 2
 /** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
3 3
 #cms-page-history-versions tr.loading { color: #999; }
4 4
 #cms-page-history-versions tr.loading td:hover { cursor: none; }
6  css/screen.css
... ...
@@ -1,7 +1,7 @@
1 1
 /** This file is the central collection of included modules, links to custom SCSS files, and any global SCSS variable definitions.  DO NOT ADD stylesheet rules to this file directly!  Note: By prefixing files with an underscore, they won't create individual CSS files. */
2 2
 /** ----------------------------- Core Compass Libraries ------------------------------ */
3 3
 /** ----------------------------- CMS Components ------------------------------ */
4  
-/** Style  custom to the CMSMain admin interface. CMSMain extends the built in  sapphire admin section styles. As much as possible we want to use those  built in styles. If anything in this file can be implemented in a generic  way then it should be include in the admin scss files.  @package cms */
  4
+/** Style  custom to the CMSMain admin interface. CMSMain extends the built in SilverStripe admin section styles. As much as possible we want to use those  built in styles. If anything in this file can be implemented in a generic  way then it should be include in the admin scss files.  @package cms */
5 5
 /** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
6 6
 #cms-page-history-versions tr.loading { color: #999; }
7 7
 #cms-page-history-versions tr.loading td:hover { cursor: none; }
@@ -29,5 +29,5 @@
29 29
 .cms .AssetAdmin #Form_EditForm_File td.bottom-all { padding: 0.7em; }
30 30
 .cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail { padding: 0; width: 32px; height: 32px; display: block; }
31 31
 .cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail img { width: 32px; height: 32px; }
32  
-.cms .AssetAdmin #Form_EditForm_File tr[data-class=Folder] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left; }
33  
-.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left; }
  32
+.cms .AssetAdmin #Form_EditForm_File tr[data-class=Folder] td.col-StripThumbnail { background: transparent url(../images/treeicons/blue-folder-horizontal.png) no-repeat top left; }
  33
+.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../images/treeicons/blue-document.png) no-repeat top left; }
BIN  images/treeicons/blue-document.png
BIN  images/treeicons/blue-folder-horizontal.png
7  scss/_AssetAdmin.scss
@@ -87,17 +87,16 @@
87 87
 				height: 32px;
88 88
 			}
89 89
 		}
90  
-		// TODO Figure out how to share sprites and SCSS rules between sapphire/admin/scss and cms/scss
91 90
 		tr[data-class=Folder] {
92 91
 			td.col-StripThumbnail {
93  
-				background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left;
  92
+				background: transparent url(../images/treeicons/blue-folder-horizontal.png) no-repeat top left;
94 93
 			}
95 94
 		}
96 95
 		tr[data-class=File] {
97 96
 			td.col-StripThumbnail {
98  
-				background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left;
  97
+				background: transparent url(../images/treeicons/blue-document.png) no-repeat top left;
99 98
 			}
100 99
 		}
101 100
 	}
102 101
 } 
103  
-	
  102
+	
4  scss/_CMSMain.scss
... ...
@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Style  custom to the CMSMain admin interface. CMSMain extends the built in 
3  
- * sapphire admin section styles. As much as possible we want to use those 
  3
+ * SilverStripe admin section styles. As much as possible we want to use those 
4 4
  * built in styles. If anything in this file can be implemented in a generic 
5 5
  * way then it should be include in the admin scss files.
6 6
  *
@@ -42,4 +42,4 @@
42 42
 		padding: 2px;
43 43
 		color: darken(#FDD, 30%);
44 44
 	}
45  
-}
  45
+}
2  tasks/RemoveOrphanedPagesTask.php
@@ -61,7 +61,7 @@ function init() {
61 61
 	}
62 62
 	
63 63
 	function index() {
64  
-		Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
  64
+		Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
65 65
 		Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
66 66
 		Requirements::customCSS('#OrphanIDs label {display: inline;}');
67 67
 		

0 notes on commit c4e0189

Please sign in to comment.
Something went wrong with that request. Please try again.