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 c4e018928eb6b3cf925886d5b23ce693602971b3 1 parent b8e86ae
@simonwelsh simonwelsh authored halkyon committed
View
4 README.md
@@ -1,6 +1,6 @@
## Overview
-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.
+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.
## Installation ##
@@ -33,4 +33,4 @@ and [installation from source](http://doc.silverstripe.org/sapphire/en/installat
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
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
- OF SUCH DAMAGE.
+ OF SUCH DAMAGE.
View
8 code/controllers/AssetAdmin.php
@@ -62,13 +62,13 @@ public function init() {
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js');
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
Requirements::css(CMS_DIR . "/css/screen.css");
-
+ $frameworkDir = FRAMEWORK_DIR;
Requirements::customScript(<<<JS
_TREE_ICONS = {};
_TREE_ICONS['Folder'] = {
- fileIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif',
- openFolderIcon: 'sapphire/javascript/tree/images/page-openfolder.gif',
- closedFolderIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif'
+ fileIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif',
+ openFolderIcon: '$frameworkDir/javascript/tree/images/page-openfolder.gif',
+ closedFolderIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif'
};
JS
);
View
4 code/controllers/CMSFileAddController.php
@@ -52,8 +52,8 @@ public function currentPageID() {
* @todo what template is used here? AssetAdmin_UploadContent.ss doesn't seem to be used anymore
*/
public function getEditForm($id = null, $fields = null) {
- Requirements::javascript(SAPPHIRE_DIR . '/javascript/AssetUploadField.js');
- Requirements::css(SAPPHIRE_DIR . '/css/AssetUploadField.css');
+ Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
+ Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
$folder = $this->currentPage();
View
6 code/controllers/CMSMain.php
@@ -1163,12 +1163,12 @@ function duplicatewithchildren($request) {
* @return string
*/
public function CMSVersion() {
- $cmsVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
+ $cmsVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
- $sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
+ $sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
return sprintf(
- "cms: %s, sapphire: %s",
+ "cms: %s, framework: %s",
$cmsVersion,
$sapphireVersion
);
View
2  code/controllers/ContentController.php
@@ -339,7 +339,7 @@ public function SilverStripeNavigator() {
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
if($this->dataRecord) {
Requirements::css(CMS_DIR . '/css/SilverStripeNavigator.css');
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(CMS_DIR . '/javascript/SilverStripeNavigator.js');
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
View
2  code/controllers/ReportAdmin.php
@@ -50,7 +50,7 @@ public function init() {
HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
- Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
+ Requirements::block(FRAMEWORK_DIR . '/javascript/HtmlEditorField.js');
}
/**
View
4 code/model/SiteTree.php
@@ -2687,8 +2687,8 @@ function i18n_singular_name() {
function provideI18nEntities() {
$entities = parent::provideI18nEntities();
- if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = 'sapphire';
- if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = 'sapphire';
+ if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
+ if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
$types = self::page_type_classes();
foreach($types as $type) {
View
4 code/staticpublisher/FilesystemPublisher.php
@@ -50,7 +50,7 @@ static function set_static_base_url($url) {
/**
* @param $destFolder The folder to save the cached site into.
- * This needs to be set in sapphire/static-main.php as well through the {@link $cacheBaseDir} variable.
+ * This needs to be set in framework/static-main.php as well through the {@link $cacheBaseDir} variable.
* @param $fileExtension The file extension to use, e.g 'html'.
* If omitted, then each page will be placed in its own directory,
* 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) {
/**
* Transforms relative or absolute URLs to their static path equivalent.
* This needs to be the same logic that's used to look up these paths through
- * sapphire/static-main.php. Does not include the {@link $destFolder} prefix.
+ * framework/static-main.php. Does not include the {@link $destFolder} prefix.
* Replaces various special characters in the resulting filename similar to {@link SiteTree::generateURLSegment()}.
*
* Examples (without $domain_based_caching):
View
5 code/staticpublisher/RsyncMultiHostPublisher.php
@@ -39,6 +39,7 @@ static function set_excluded_folders($folders) {
function publishPages($urls) {
parent::publishPages($urls);
$base = Director::baseFolder();
+ $framework = FRAMEWORK_DIR;
// Get variable that can turn off the rsync component of publication
if(isset($_GET['norsync']) && $_GET['norsync']) return;
@@ -53,8 +54,8 @@ function publishPages($urls) {
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
// Then transfer "safe" PHP from the cache/ directory
$rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`;
- // Transfer sapphire/static-main.php to the target
- $rsyncOutput .= `cd $base; rsync -av -e ssh --delete sapphire/static-main.php $target/sapphire`;
+ // Transfer framework/static-main.php to the target
+ $rsyncOutput .= `cd $base; rsync -av -e ssh --delete $framework/static-main.php $target/$framework`;
if(StaticPublisher::echo_progress()) echo $rsyncOutput;
}
}
View
4 code/staticpublisher/htaccess_example_rsyncsingleserver
@@ -44,5 +44,5 @@ RewriteRule .* /cache/index.html [L]
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
-### SILVERSTRIPE END ###
+RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]
+### SILVERSTRIPE END ###
View
2  code/widgets/Widget.php
@@ -133,7 +133,7 @@ function populateFromPostData($data) {
* within a {@link ContentController}.
*
* ## Forms
- * You can add forms like in any other sapphire controller.
+ * You can add forms like in any other SilverStripe controller.
* If you need access to the widget from within a form,
* you can use `$this->controller->getWidget()` inside the form logic.
* Note: Widget controllers currently only work on {@link Page} objects,
View
2  css/CMSMain.css
@@ -1,4 +1,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 */
+/** 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 */
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
#cms-page-history-versions tr.loading { color: #999; }
#cms-page-history-versions tr.loading td:hover { cursor: none; }
View
6 css/screen.css
@@ -1,7 +1,7 @@
/** 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. */
/** ----------------------------- Core Compass Libraries ------------------------------ */
/** ----------------------------- CMS Components ------------------------------ */
-/** 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 */
+/** 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 */
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
#cms-page-history-versions tr.loading { color: #999; }
#cms-page-history-versions tr.loading td:hover { cursor: none; }
@@ -29,5 +29,5 @@
.cms .AssetAdmin #Form_EditForm_File td.bottom-all { padding: 0.7em; }
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail { padding: 0; width: 32px; height: 32px; display: block; }
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail img { width: 32px; height: 32px; }
-.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; }
-.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; }
+.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; }
+.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../images/treeicons/blue-document.png) no-repeat top left; }
View
BIN  images/treeicons/blue-document.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/treeicons/blue-folder-horizontal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 scss/_AssetAdmin.scss
@@ -87,17 +87,16 @@
height: 32px;
}
}
- // TODO Figure out how to share sprites and SCSS rules between sapphire/admin/scss and cms/scss
tr[data-class=Folder] {
td.col-StripThumbnail {
- background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left;
+ background: transparent url(../images/treeicons/blue-folder-horizontal.png) no-repeat top left;
}
}
tr[data-class=File] {
td.col-StripThumbnail {
- background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left;
+ background: transparent url(../images/treeicons/blue-document.png) no-repeat top left;
}
}
}
}
-
+
View
4 scss/_CMSMain.scss
@@ -1,6 +1,6 @@
/**
* 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
+ * 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.
*
@@ -42,4 +42,4 @@
padding: 2px;
color: darken(#FDD, 30%);
}
-}
+}
View
2  tasks/RemoveOrphanedPagesTask.php
@@ -61,7 +61,7 @@ function init() {
}
function index() {
- Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
+ Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
Requirements::customCSS('#OrphanIDs label {display: inline;}');
Please sign in to comment.
Something went wrong with that request. Please try again.