Compare commits
No commits in common. "4" and "2.2.0-rc2" have entirely different histories.
15
.cow.json
@ -1,15 +0,0 @@
|
||||
{
|
||||
"github-slug": "silverstripe/silverstripe-installer",
|
||||
"child-stability-inherit": true,
|
||||
"dependency-constraint": "loose",
|
||||
"vendors": [
|
||||
"silverstripe"
|
||||
],
|
||||
"tests": [
|
||||
"vendor/bin/phpunit vendor/silverstripe/framework/tests/php",
|
||||
"vendor/bin/phpunit vendor/silverstripe/cms/tests/php"
|
||||
],
|
||||
"exclude": [
|
||||
"silverstripe/recipe-plugin"
|
||||
]
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
# {{ version }}
|
||||
|
||||
## Overview
|
||||
|
||||
A full list of module versions included in CMS Recipe {{ version }} is provided below. We recommend referencing recipes in your dependencies, rather than individual modules, to simplify version tracking. See [Recipes](/getting_started/).
|
||||
|
||||
<details>
|
||||
<summary>Included module versions</summary>
|
||||
|
||||
| Module | Version |
|
||||
| ------ | ------- |
|
||||
| silverstripe/admin | x.x.x |
|
||||
| silverstripe/asset-admin | x.x.x |
|
||||
| silverstripe/assets | x.x.x |
|
||||
| silverstripe/campaign-admin | x.x.x |
|
||||
| silverstripe/cms | x.x.x |
|
||||
| silverstripe/config | x.x.x |
|
||||
| silverstripe/errorpage | x.x.x |
|
||||
| silverstripe/framework | x.x.x |
|
||||
| silverstripe/graphql | x.x.x |
|
||||
| silverstripe/login-forms | x.x.x |
|
||||
| silverstripe/mimevalidator | x.x.x |
|
||||
| silverstripe/reports | x.x.x |
|
||||
| silverstripe/siteconfig | x.x.x |
|
||||
| silverstripe/versioned | x.x.x |
|
||||
| silverstripe/versioned-admin | x.x.x |
|
||||
|
||||
</details>
|
||||
|
||||
{% if version.stability == 'rc' %}
|
||||
|
||||
## Release Candidate
|
||||
|
||||
This version of Silverstripe CMS is a **release candidate** for an upcoming stable version, and should not be applied to production websites. We encourage developers to test this version in development / testing environments and [report any issues they encounter via GitHub](/contributing/issues_and_bugs/).
|
||||
|
||||
{% elseif version.stable %}
|
||||
|
||||
Upgrading to Recipe {{ version }} is recommended for all sites. This upgrade can be carried out by any development team familiar with Silverstripe.
|
||||
|
||||
## Security considerations
|
||||
|
||||
This release includes security fixes. Please see the release announcements for more detailed
|
||||
descriptions of each. We highly encourage upgrading your project to include the latest security patches nonetheless.
|
||||
|
||||
We have provided a high-level severity rating of the vulnerabilities below based on the CVSS score, however please note this could vary based on the specifics of each project. You can [read the severity rating definitions in the Silverstripe CMS release process](/contributing/release_process/#severity-rating).
|
||||
|
||||
* [CVE-0000-0000 The Issue Title](https://www.silverstripe.org/download/security-releases/CVE-0000-0000) Severity: {# Critical/ High/ Medium/ Low #}
|
||||
* [CVE-0000-0001 The Issue Title](https://www.silverstripe.org/download/security-releases/CVE-0000-0001) Severity: {# Critical/ High/ Medium/ Low #}
|
||||
|
||||
## New features
|
||||
|
||||
The [release announcement](#) includes the note worthy features, but be sure to review the change log for full detail.
|
||||
|
||||
{# other upgrade notes here #}
|
||||
|
||||
## Known issues
|
||||
|
||||
{#
|
||||
* [Known issue](GitHub link)
|
||||
#}
|
||||
|
||||
### Expected test failures
|
||||
|
||||
The following PHPUnit test failures are expected and do not represent functional issues:
|
||||
|
||||
{#
|
||||
* List test failures here
|
||||
#}
|
||||
|
||||
```
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
...
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ logs }}
|
@ -1,25 +0,0 @@
|
||||
# For more information about the properties used in
|
||||
# this file, please see the EditorConfig documentation:
|
||||
# http://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,json}]
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[composer.json]
|
||||
indent_size = 4
|
12
.env.example
@ -1,12 +0,0 @@
|
||||
# For a complete list of core environment variables see
|
||||
# https://docs.silverstripe.org/en/4/getting_started/environment_management/#core-environment-variables
|
||||
|
||||
# DB credentials
|
||||
SS_DATABASE_CLASS="MySQLDatabase"
|
||||
SS_DATABASE_SERVER="localhost"
|
||||
SS_DATABASE_USERNAME="<user>"
|
||||
SS_DATABASE_PASSWORD="<password>"
|
||||
SS_DATABASE_NAME="<database>"
|
||||
|
||||
# WARNING: in a live environment, change this to "live" instead of dev
|
||||
SS_ENVIRONMENT_TYPE="dev"
|
11
.gitattributes
vendored
@ -1,11 +0,0 @@
|
||||
.github export-ignore
|
||||
.cow.json export-ignore
|
||||
.cow export-ignore
|
||||
.gitattributes export-ignore
|
||||
.travis.yml export-ignore
|
||||
behat.yml export-ignore
|
||||
build.xml export-ignore
|
||||
CONTRIBUTING.md export-ignore
|
||||
LICENSE export-ignore
|
||||
phpunit.xml.dist export-ignore
|
||||
README.md
|
27
.github/workflows/ci.yml
vendored
@ -1,27 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
||||
with:
|
||||
# installer contains a sample behat.yml file, though there are no behat tests to run
|
||||
endtoend: false
|
||||
# require the following in ci.yml rather than composer.json require-dev specifically for installer because unlike
|
||||
# regular modules, require-dev will get installed to projects during `composer create-project silverstripe/installer`
|
||||
composer_require_extra: silverstripe/recipe-testing:^2 silverstripe/frameworktest:^0.4.2 mikey179/vfsstream:^1.6.10
|
||||
extra_jobs: |
|
||||
- endtoend: true
|
||||
endtoend_suite: admin
|
||||
endtoend_config: vendor/silverstripe/admin/behat.yml
|
||||
- endtoend: true
|
||||
endtoend_suite: asset-admin
|
||||
endtoend_config: vendor/silverstripe/asset-admin/behat.yml
|
||||
- endtoend: true
|
||||
endtoend_suite: cms
|
||||
endtoend_config: vendor/silverstripe/cms/behat.yml
|
16
.github/workflows/dispatch-ci.yml
vendored
@ -1,16 +0,0 @@
|
||||
name: Dispatch CI
|
||||
|
||||
on:
|
||||
# At 4:00 PM and 5:00 PM
|
||||
schedule:
|
||||
- cron: '0 16,17 * * *'
|
||||
|
||||
jobs:
|
||||
dispatch-ci:
|
||||
name: Dispatch CI
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch CI
|
||||
uses: silverstripe/gha-dispatch-ci@v1
|
17
.github/workflows/keepalive.yml
vendored
@ -1,17 +0,0 @@
|
||||
name: Keepalive
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# The 8th of every month at 4:50pm UTC
|
||||
schedule:
|
||||
- cron: '50 16 8 * *'
|
||||
|
||||
jobs:
|
||||
keepalive:
|
||||
name: Keepalive
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Keepalive
|
||||
uses: silverstripe/gha-keepalive@v1
|
8
.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
/silverstripe-cache/
|
||||
/.env
|
||||
/vendor/
|
||||
/themes/simple/
|
||||
/_resources/
|
||||
/public/_resources/
|
||||
/.graphql-generated/
|
||||
/public/_graphql/
|
@ -1,28 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
Any open source product is only as good as the community behind it. You can participate by sharing code, ideas, or simply helping others. No matter what your skill level is, every contribution counts. See our [high level contribution overview](http://silverstripe.org/contributing-to-silverstripe) on silverstripe.org on how you can help out.
|
||||
|
||||
## Bugtracker ##
|
||||
|
||||
Bugs are tracked on [github.com](https://github.com/silverstripe/framework/issues).
|
||||
Please read our [issue reporting guidelines](http://doc.silverstripe.org/framework/en/misc/contributing/issues).
|
||||
|
||||
## Development and Contribution ##
|
||||
|
||||
For submitting patches, please read our [guide to contributing code](http://doc.silverstripe.org/framework/en/misc/contributing/code). We only accept pull requests on github.com.
|
||||
|
||||
## Links ##
|
||||
|
||||
* [Server Requirements](http://doc.silverstripe.org/framework/en/installation/server-requirements)
|
||||
* [Changelogs](http://doc.silverstripe.org/framework/en/changelogs/)
|
||||
* [Bugtracker: Framework](https://github.com/silverstripe/silverstripe-framework/issues)
|
||||
* [Bugtracker: CMS](https://github.com/silverstripe/silverstripe-cms/issues)
|
||||
* [Bugtracker: Installer](https://github.com/silverstripe/silverstripe-installer/issues)
|
||||
* [Forums](http://silverstripe.org/forums)
|
||||
* [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev)
|
||||
|
||||
## Copyright
|
||||
|
||||
**IMPORTANT: By supplying code to the SilverStripe core team in patches, tickets and pull requests, you agree to assign copyright of that code to SilverStripe Limited, on the condition that SilverStripe Limited releases that code under the BSD license.**
|
||||
|
||||
We ask for this so that the ownership in the license is clear and unambiguous, and so that community involvement doesn't stop us from being able to continue supporting these projects. By releasing this code under a permissive license, this copyright assignment won't prevent you from using the code in any way you see fit.
|
@ -1,17 +1,17 @@
|
||||
Copyright (c) 2007-2017, SilverStripe Limited - www.silverstripe.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
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.
|
||||
Copyright (c) 2007, SilverStripe Limited - www.silverstripe.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
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.
|
650
ChangeLog
Normal file
@ -0,0 +1,650 @@
|
||||
SilverStripe ChangeLog
|
||||
|
||||
2.2.0 (in development)
|
||||
|
||||
New Features
|
||||
- New look for CMS
|
||||
- Support for authentification by OpenID (auth_openid module included with installer)
|
||||
- Google Sitemaps support
|
||||
- Internationalisation support
|
||||
- German translation
|
||||
- Dutch translation
|
||||
- Chinese translation
|
||||
- Catalan translation
|
||||
- Spanish translation
|
||||
- Support for multilingual content
|
||||
- Added a Statistics area showing the following reports
|
||||
- Page views
|
||||
- User activity
|
||||
- Trends
|
||||
- Operating Systems
|
||||
- Browsers
|
||||
- Added an image editor, allowing a user to rotate, crop and resize an image from within the CMS
|
||||
- Added profile popup in CMS
|
||||
- Added a 'Sent Status Report' tab to Newsletters with the following reports
|
||||
- Sending to the following recipients failed
|
||||
- Sending to the following recipients bounced
|
||||
- The newsletter has never been sent to following subscribers
|
||||
- Sending to the following recipients was successful
|
||||
- Sending to the following recipients did not occur because they are blackListed
|
||||
- Add 'Send to only people not previously sent to' option for sending newsletters
|
||||
- Added SWFUpload library as default method of uploading files
|
||||
- Added photo upload in from the Site Content section
|
||||
- Added the ability to search the Site Content tree
|
||||
- Added the ability to publish selected pages
|
||||
- Added a list of unused assets in the Files & Images section, and the ability to delete unused thumbnails
|
||||
- Usability improvements
|
||||
- Move action buttons to bottom right of screen
|
||||
- Moved insert image/flash/link to pane on right
|
||||
- Removed right frame headers as the buttons have been moved and they only contain redundant information
|
||||
- Use a javascript dialog box for confirming unsaved changes instead of the slow loading model one
|
||||
- Reworked the tabs in the Newsletter section to be less confusing
|
||||
- Cancel button added to Send Newsletter window
|
||||
- External logo link opens in a new window
|
||||
- Left sections in Site Content 'Site Tree', 'History' and 'Reports' now use expandable sections rather than tabs
|
||||
- Relabeled 'Site Tree' to 'Site Content & Structure', 'History' to 'Page Version History' and 'Reports' to 'Site Reports' in left sections of Site Content
|
||||
- Relabeled 'Files & Images' left frame to 'Folders'
|
||||
- Added tooltips to site content tree, showing the page type
|
||||
- In the 'Page Version History', use a checkbox lable 'Compare mode (click 2 below)' instead of a dropdown
|
||||
- Renamed 'Save draft' button to 'Save'
|
||||
- The 'Save' button text changes to 'Saving...', and the 'Publish' button text changes to 'Publishing...' when they are clicked
|
||||
- Added save indicator to all 'Save' buttons, the 'Save & Publish' button and the 'Unpublish' button while they are being submitted
|
||||
- Added a go button to the 'Site Reports' dropdown
|
||||
- Relabeled 'Name' field to 'Folder Name' in Files & Images section
|
||||
- Renamed the 'Save' button to 'Save folder name' in Files & Images section
|
||||
- Relabeled 'Send newsletters from' field to 'From email address' in Newsletter section
|
||||
- Removed the 'Move Files' button from Files & Images section, implemented multi-file drag & drop moving
|
||||
- Add 'Newsletter Settings' tab to Newsletter type edit form for consistency with other forms
|
||||
- Make the status message shown after sending a newsletter always include the # of emails sent
|
||||
- Added delete confirmation for items in Newsletter left tree
|
||||
- Added delete confirmation for items in Security left tree
|
||||
- Make 'Add new draft' the default action for 'Create...' in the Newsletter section
|
||||
- Replace the 'reorganise' button with 'Allowing drag & drog reordering' checkbox
|
||||
- Delete and Unpublish buttons turn red on hover
|
||||
|
||||
Developer Tools
|
||||
- New classes
|
||||
- Authenticator, allowing multiple authentification methods
|
||||
- ConfirmPasswordField
|
||||
- DropdownTimeField
|
||||
- i18n, for internationalisation
|
||||
- LanguageDropdownField
|
||||
- LoginForm, base class for login forms for each authentification method
|
||||
- MemberAuthenticator, providing username/password authentification
|
||||
- MemberLoginForm, refactored from old LoginForm form
|
||||
- PopupDateTimeField
|
||||
- ToggleField
|
||||
- OpenIDAuthenticatedRole, which is an extension to Member that adds OpenID authentification columns
|
||||
- OpenIDAuthenticator, providing OpenID authentification
|
||||
- OpenIDLoginForm, providing OpenID sign in
|
||||
- PageView, which saves the details of each page view for statistics
|
||||
- Statistics, which provides static methods for statistics
|
||||
- Translatable, for multilingual content
|
||||
- New third party libraries
|
||||
- PHP OpenID (http://openidenabled.com/php-openid/)
|
||||
- Browscap (http://garetjax.info/projects/browscap/)
|
||||
- Plotr (http://www.solutoire.com/plotr/)
|
||||
- SWFUpload (http://profandesign.se/swfupload/)
|
||||
- Improved classes
|
||||
- CalendarDateField
|
||||
- Refactored part of Field() into HTMLField() so it can be used in PopupDateTimeField
|
||||
- ComplexTableField
|
||||
- Improved pagination in popup
|
||||
- Better transformation of save-button (replaced indicator with "saving..." label)
|
||||
- CompositeField
|
||||
- Added SmallFieldHolder() to properly render fields in a FieldGroup
|
||||
- Added insertBeforeRecursive()
|
||||
- Allow empty children
|
||||
- Added Field()
|
||||
- Added linebreaks for HTML
|
||||
- ConfirmedFormAction
|
||||
- Respect $extraClass
|
||||
- ContentController
|
||||
- Save statistics on page views
|
||||
- Added LangAttributes(), for use in XML header
|
||||
- Draft/Archived content can only be viewed by users with permission to access the CMS
|
||||
- Core
|
||||
- Added _t() for internationalisation
|
||||
- Check if TEMP_FOLDER is already defined before defining it, allowing the user to set the temporary folder themself
|
||||
- DataObject
|
||||
- Added merge()
|
||||
- Director
|
||||
- Added extend_site(), which allows modules to register a function that will be run on every page load
|
||||
- redirectBack() now redirects to the base URL if neither the referrer nor the _REDIRECT_BACK_URL is set
|
||||
- Added support for translatable URLs
|
||||
- Added is_cli()
|
||||
- Email
|
||||
- Define 'EMAIL_BOUNCEHANDLER_KEY' in sapphire/_config.php and require its value to be sent as 'Key' $_GET var in pings to /Email_BounceHandler to prevent fake email bounce pings
|
||||
- Display an error on duplicate bounce logs instead of a blank screen
|
||||
- If the contents of the X-SilverStripeMessageID header is sent to /Email_BounceHandler in the 'SilverStripeMessageID' _GET variable, then it will be logged in the Newsletter_SentRecipient table so that the bounce report will show up on the 'Sent Status Report' tab of the Newsletter
|
||||
- Bounced newsletter recipient emails and blacklisted by default
|
||||
- FieldSet
|
||||
- Added insertBeforeRecursive()
|
||||
- FileSystem
|
||||
- Added $file_create_mask and $folder_create_mask, which are used whenever creating new files/folders in sapphire
|
||||
- Form
|
||||
- All Forms now have a hidden SecurityID field to prevent CSRF attacks
|
||||
- Added disableSecurityToken() to disable the SecurityID field
|
||||
- Added securityTokenEnabled()
|
||||
- Changed <p class="Actions"> to <div class="Actions">
|
||||
- Renamed PureName() to Name()
|
||||
- GD
|
||||
- Added rotate()
|
||||
- Added rotatePixelByPixel(), allowing rotation where the imagerotate function is unavailable
|
||||
- Added crop()
|
||||
- Added getWidth()
|
||||
- Added getHeight()
|
||||
- Hierachy
|
||||
- Versioned now automatically add suffixes, so Hierachy no longer needs to
|
||||
- HTTP
|
||||
- Added register_modification_timestamp()
|
||||
- Added register_etag()
|
||||
- ImageField
|
||||
- Improved layout
|
||||
- Int
|
||||
- Added support for default value
|
||||
- ManifestBuilder
|
||||
- Refactored getClassManifest() for clearer ignore rules
|
||||
- Ignore i18n language files
|
||||
- Ignore folders that have a '_manifest_exclude' file
|
||||
- Member
|
||||
- Automatically login user if the 'remember login' cookie is set
|
||||
- Added createNewPassword(), which generates a random password, optionally using a word list
|
||||
- Added support for password encryption
|
||||
- Added Locale field to store user preferred language
|
||||
- MemberLoginForm (refactored from old LoginForm)
|
||||
- Save the email address in the session to reuse when the login fails
|
||||
- ModelAsController
|
||||
- Added support for translatable URLs
|
||||
- Object
|
||||
- Added require_developer_login(), which allows you to check if the user has permission to use URL debugging tools
|
||||
- ?debugmethods=1 now requires developer login
|
||||
- PageComment
|
||||
- Added the ability to have BBCode in comments (disabled by default)
|
||||
- PasswordField
|
||||
- Always show five stars in performReadonlyTransformation(), so it is impossible to use the information of the password length for brute-force attacks
|
||||
- Permission
|
||||
- Added declare_permissions()
|
||||
- Added get_declared_permissions_list()
|
||||
- Added traverse_declared_permissions()
|
||||
- Added Permission_Group class, used to group permissions together for showing on an interface
|
||||
- Added $admin_implies_all, if this is false then the 'ADMIN' permission doesn't imply all permissions
|
||||
- Refactored Permission::checkMember(), should be faster now because the non-strict checking is now only executed if the user doesn't has the permission
|
||||
- Added deny(), giving the ability to define 'deny permissions'
|
||||
- RecipientImportField
|
||||
- Added default 'GenericEmail.ss' template
|
||||
- RSSFeed
|
||||
- Added support for conditional GETs
|
||||
- Security
|
||||
- Added support for password encryption
|
||||
- Added set_word_list() and get_word_list(), to set the location of the word list used in Member::generateNewPassword()
|
||||
- Session
|
||||
- Added save(), which copies the current controllers session to $_SESSION
|
||||
- SiteTree
|
||||
- Changed references to 'stage site' to 'draft site' in TreeTitle()
|
||||
- Use Translatable interface by default
|
||||
- Add content language in MetaTags()
|
||||
- Add delete class to unpublish and rollback buttons
|
||||
- SSViewer
|
||||
- Added support for internationalisation in templates, using <% _t() %>
|
||||
- Added $Iteration in templates, which keeps track of the number of iterations in a control block
|
||||
- TableListField
|
||||
- Prevent onclick event in td.markingcheckbox from showing the popup
|
||||
- TabSet
|
||||
- Remove tabset div to reduce wasted space on tabs
|
||||
- Added insertBeforeRecursive()
|
||||
- ToggleCompositeField
|
||||
- Refactored from TogglePanel
|
||||
- Added icons and used 'cursor: pointer' to make it obvious that it is clickable
|
||||
- Versioned
|
||||
- Added the ability to versionise suffixed tables that have names that are not DataObject descendants
|
||||
- Added canBeVersioned()
|
||||
- Added extendWithSuffix()
|
||||
- Added hasVersionField()
|
||||
|
||||
Bug Fixes
|
||||
- Sapphire
|
||||
- E_NOTICE fixes
|
||||
- Fixed incorrect deprecated message in Convert::raw2xml()
|
||||
- Don't show and error message and quit the script when @ is used to suppress the error
|
||||
- Changed width of HTMLEditorFields to prevent horizontal scrollbars in IE7
|
||||
- Added checks in DataObjectSet::First() and DataObjectSet::Last() to prevent errors on an empty $items array
|
||||
- Fixed incorrect treatment of Member::logout() as a static method in Security::logout()
|
||||
- Ensure Priority is set in SiteTree::onBeforeWrite(), otherwise an invalid SQL statement will be generated when the page is published
|
||||
- Only highlight broken links in HTMLEditorFields once, to prevent execution timeouts when there are lots of identical broken links
|
||||
- Fixed bug "Fatal error: Access to undeclared static property: Controller::$db in ../sapphire/core/Object.php(282) : eval()'d code on line 1"
|
||||
- Fixed DataObjectDecorators not supporting indexes and defaults
|
||||
- Fixed ReportField generating invalid HTML
|
||||
- In Member::setBlacklistedEmail() call this->write() so that the BlacklistedEmail field state will be saved to the Member database table
|
||||
- Fix Email_BlackList::isBlocked() to check the BlockedEmail field instead of non-existant Email field so that it will actaully return true when an email is blocked
|
||||
- Fix layout problems with search box in IE by only generating a label tag if TItle is set in FormField::FieldHolder()
|
||||
- Fixed Permission::check() not p[assing $strict to Permission::checkMember()
|
||||
- Fixed HTTP::gmt_date()
|
||||
- Fix validation of Member extensions
|
||||
- Removed DriversLicense references from LoginForm (project specific clutter)
|
||||
- Added check for existence of #sitetree in RelationComplexTableField.js
|
||||
- Fixed VirtualPage creation
|
||||
- Fixed lighttpd flushing bug
|
||||
- Fixed CustomRequiredFields
|
||||
- Fix bugs with ComplexTableField when it is used outside of the CMS
|
||||
- Fixed error saving when value is undefined in HasOneComplexTableField and HasManyComplexTableField
|
||||
- Fixed saving error in FileIFrameField
|
||||
- Added a security fix for Security::check_default_admin()
|
||||
- Fixed caching in DataObject::getManyManyComponents() to take into account different SQL parameters
|
||||
- Geop::ip2country() now throws an E_USER_NOTICE instead of an error when it cannot run geoiplookup
|
||||
- Added if() check around a foreach loop that was causing errors when there were no entries in an RSS feed
|
||||
- Fix inheritance in ManyManyComplexTableField
|
||||
- Fixed FormField::setRightTitle() not showing because of a typo
|
||||
- Create assets folder if doesn't eixts on ErrorPage publish
|
||||
- Fixed submission of ImageField when no file was selected
|
||||
- Catch errors in ContentController::deleteinstallfiles()
|
||||
- Fix generation of group codes on creation of a Group
|
||||
- Fix title on LabelledLiteralField
|
||||
- Fix ImageField deleting the Image instead of unlinking it from the page
|
||||
- Set TimeField value to null when a bad value is passed
|
||||
- Don't return a span when the Title doesn't exist in DropdownField
|
||||
- Fix bug where NumericField couldn't have 0 as a default value
|
||||
- Call Page_Controller->init() when rendering Security/changepassword etc to respect any Requirements called in there
|
||||
- Fixed an error when a CheckboxSetField is submitted with no checkboxes ticked
|
||||
- Fixed exporting of TableListField to use commas for CSV files
|
||||
- CMS
|
||||
- E_NOTICE fixes
|
||||
- New pages are created in the database straight away, which solves a number of issues
|
||||
- Fixed Email link not working in page history
|
||||
- Unsaved changes detection now works in Security section member tables
|
||||
- Fix typo in LeftAndMain::addTreeNodeJS() by renaming 'select' parameter to 'selected' because 'selected' is what is used in the method body
|
||||
- Delete image thumbnails after deleting an image
|
||||
- Use 'html>body' instead of just 'html>' so that #sitetree correctly gets assigned width:auto on Mozilla browsers (prevents Folders being selected from 500px away on file drag and drop)
|
||||
- Display a useful error message if getCMSFields() returns null
|
||||
- When 'Duplicate this page' is clicked, first silently (without confirmation) save the page, then duplicate it so the new page is identical to the other page
|
||||
- Fix errors when importing recipients to newsletter mailing list
|
||||
- Fixed blocking during resize in IE6
|
||||
- Don't show a 'No template selected' error when sending a test Newsletter if no template has been selected since templates for Emails are optional
|
||||
- Fixed bug 'for newly created newsletter drafts, content of newsletter sent is not what is shown on screen'
|
||||
- Don't save new Newsletter drafts as soon as they are created to prevent TinyMCE Javascript errors in IE
|
||||
- Add if((typeof tinyMCE != 'undefined')) statement around call to tinyMCE.init() to prevent "Error: 'tinyMCE' is undefined" error in IE7 on Newsletter Recipient import
|
||||
- Don't allow a deleted draft to be edited in the Newsletter section
|
||||
- Fix a bug where newsletter drafts will be added, but not show up in the left tree (because of a Javascript error), if no selection has been made
|
||||
- If there are no newsletter types, and 'Add new draft' is chosen, create a newsletter type to prevent errors
|
||||
- Fix changed icon only showing after Save button is clicked twice
|
||||
- Fixed VirtualPage creation
|
||||
- Fix 'Sort subpages' not working correctly
|
||||
|
||||
|
||||
2.1.1 (2 Nov 2007)
|
||||
|
||||
Bug Fixes
|
||||
- CMS
|
||||
- BBCode help link now works inside CMS
|
||||
- Fixed invalid 'cursor: normal' CSS in cms_left.css
|
||||
- Ensure ComplexTableField CSS is loaded in CMS
|
||||
- Fixed blank comments showing in Comment Admin
|
||||
- Ensure behaviour is applied correctly to new fields in a UserDefinedForm
|
||||
- Fixed fatal error in Newsletter Admin on some servers
|
||||
- Sapphire
|
||||
- Fix infinite redirects when upgrading from 2.0.2
|
||||
- Use the hostname, not the ip address, in dev/test mode tests
|
||||
- Changed the include of the BBCodeParser so it works on more systems
|
||||
- Fixed saving of HasOneComplexTableField and HasManyComplexTableField when value is undefined
|
||||
- Removed extra comma in TableListField.js
|
||||
- Fixed redirection of login when login fails
|
||||
- Fixed bug where removing a comment via ajax removed all comments from display
|
||||
- Fix $_SESSION not saving correctly on some servers
|
||||
|
||||
|
||||
2.1.0 (2 Oct 2007)
|
||||
|
||||
New Features
|
||||
- Comment administration section, and comment moderation
|
||||
- Allow CMS users to limit view/edit access to a page
|
||||
- Show an rss link for page comments on each page
|
||||
|
||||
Developer Tools
|
||||
- Theme support
|
||||
- Widget support
|
||||
- Better extension API
|
||||
- Unit testing framework
|
||||
- More API documentation
|
||||
- Added support for __ss_environment.php files
|
||||
- New classes
|
||||
- BankAccountField
|
||||
- BBCodeParser
|
||||
- HasManyComplexTableField
|
||||
- HasOneComplexTableField
|
||||
- ManyManyComplexTableField
|
||||
- NewsletterType
|
||||
- RestfulService (from mashups module)
|
||||
- Improved classes
|
||||
- ComplexTableField
|
||||
- Validation in popup
|
||||
- ContentController
|
||||
- Added project()
|
||||
- Controller
|
||||
- Added redirectedTo()
|
||||
- Convert
|
||||
- Added raw2htmlatt()
|
||||
- Added raw2mailto()
|
||||
- DatabaseAdmin
|
||||
- Drastically improved database build performance
|
||||
- DataObject
|
||||
- Added ID,ID,ID syntax for populating many-many joins
|
||||
- DataObjectDecorator
|
||||
- Allow member CMS fields to be added
|
||||
- DataObjectSet
|
||||
- Added getRange()
|
||||
- Date
|
||||
- Added past_date()
|
||||
- Director
|
||||
- Added set_dev_servers()
|
||||
- Added set_test_servers()
|
||||
- Added redirected_to()
|
||||
- Refactored CMS page-URL accessing to use ->AbsoluteLink(), which can be overridden by defining alternateAbsoluteLink()
|
||||
- Debug
|
||||
- Optionally hide backtrace-headers in message() and show() (applied in 'showqueries')
|
||||
- Email
|
||||
- MimeType-fallback (from /etc/mime.types)
|
||||
- Improved validation in is_valid_address()
|
||||
- FieldSet
|
||||
- Added insertAfter()
|
||||
- Form
|
||||
- Automatic filesystem backup of POST-data
|
||||
- FormField
|
||||
- Support for right-aligned titles
|
||||
- Custom CSS-classes by addExtraClass() and removeExtraClass()
|
||||
- Group
|
||||
- Added Description field
|
||||
- HtmlEditorField
|
||||
- Allow classes other than 'typography' to be set
|
||||
- Image
|
||||
- Added PaddedImage()
|
||||
- ImageField
|
||||
- Added readonly transformation
|
||||
- PageCommentInterface
|
||||
- Added anchors to page comments, and made rss feed link to them
|
||||
- Permission
|
||||
- Added $strict flag to check()
|
||||
- Allow passing of an array of permission codes to get_members_by_permission()
|
||||
- Added get_groups_by_permission()
|
||||
- PhoneNumberField
|
||||
- Improved validation
|
||||
- Security
|
||||
- Added basicauthlogin()
|
||||
- SecurityAdmin
|
||||
- Added EDIT_PERMISSIONS permission code
|
||||
- TableField
|
||||
- Validation and RequiredFields
|
||||
- TableListField
|
||||
- Added sorting, highlighting, formatting
|
||||
- Improved styling
|
||||
- TreeDropdownField
|
||||
- Improved styling
|
||||
- Varchar
|
||||
- Added RTF()
|
||||
- ViewableData
|
||||
- Added '<% if HasPerm(PERM_CODE() %>' for templates
|
||||
- Javascript
|
||||
- Implemented showIndicator() and hideIndicator()
|
||||
- Improved statusMessage() to clear manually instead of fixed interval
|
||||
- Added hideStatusMessage()
|
||||
|
||||
Bug Fixes
|
||||
- CMS
|
||||
- Fix specific newsletter bug
|
||||
- Don't show classes user doesn't have permissions to change to in class dropdown
|
||||
- Fix reading of Live pages in CMSMain
|
||||
- Fix double page reading after changing the class
|
||||
- Fix insert flash
|
||||
- Fix version regex for release candidates
|
||||
- Fix delete in Files and Images section
|
||||
- Fixed saving root folder causes error
|
||||
- Fixed "non-numeric ID" error that occurs when visiting newsletter section for a newsletter that doesn't exist (caused by session sometimes)
|
||||
- Fixed CMS sort subpages bug
|
||||
- Sapphire
|
||||
- Improved spam detection
|
||||
- Support for running SilverStripe in safe mode and under open_basedir restrictions
|
||||
- PHP notice fixes
|
||||
- Use normal authentification rather than basicauth for db/build
|
||||
- Fix CSS of profiler pop-up
|
||||
- Changed DropdownField $emptyString syntax from '0' to ''
|
||||
- Fixed IE6 DOM-parsing bug caused by FormResponse::load_form()
|
||||
- Triggering previewwrite for 'delete' and 'replace' SQL-actions
|
||||
- Changed record-insertion in DataObject
|
||||
- Boolean accepts database-default
|
||||
- Fixed Permission::get_members_by_permission()
|
||||
- Added memory_limit to publishall()
|
||||
- Fix many-many component set relation setting
|
||||
- The Link for a RedirectorPage points to its target
|
||||
- Add SQL_ prefix in place it was missing in Email
|
||||
- Added a check to make sure record exists before calling hasMethod on it in CheckboxSetField
|
||||
- Fixed bug in DataObject::addStaticVars()
|
||||
- Check for string 'true' as well as boolean in SiteTree::MetaTags()
|
||||
- Fix AllNewsletters value not being passed to OptionSetField in SubscribeForm
|
||||
- Improved the encapsulation of ErrorPage publication
|
||||
- Fix redirect back after failing login
|
||||
- Fixed renaming of .tar.gz and .tar.bz2 files
|
||||
- Fixed validation of DateField, EmailField and NumericField
|
||||
- Fix livesite bug for visibility handling difference between PHP5.2.0 and PHP5.1.6
|
||||
- Changed colouring of db/build to be more appropriate for the actual meaning of the messages
|
||||
- Fixed redirection from /home/ to /./ in IE6
|
||||
- Use the homepage as a model for the security base-page, so that things like the current subsite are factored in
|
||||
- Sorted permission codes in Permission::get_codes
|
||||
- Changes to support gallery module
|
||||
- Added missing has_many in DataObjectDecorator
|
||||
- Replace empty strings in SQL queries with NULL
|
||||
- JSParty
|
||||
- TinyMCE has been updated to 2.1.1.1
|
||||
|
||||
Installer
|
||||
- New installer look based on BlackCandy
|
||||
- Use the new theme system
|
||||
- Add first and last name fields
|
||||
- Added ability to set servers that will be in dev mode
|
||||
- When the posix module isn't present, throw a warning instead of dying
|
||||
- Warn if PHP version is less that 5.2.0 in support of GoPHP5 (http://www.gophp5.org)
|
||||
- Added favicon to installer and default template
|
||||
- Optional reporting of version information to SilverStripe
|
||||
- Installer now runs with short tags disabled
|
||||
- open_basedir and safe mode fixes
|
||||
|
||||
|
||||
2.0.2 (14 Jul 2007)
|
||||
|
||||
New Features
|
||||
- BlackCandy is the new default theme
|
||||
- Added pagination for page comments
|
||||
- Updated date field in CMS-edited forms to use CalendarDateField
|
||||
- Added 'open in new window' checkbox to link inserter
|
||||
- Added dimension fields when inserting images
|
||||
|
||||
Developer Tools
|
||||
- Much more API Documentation
|
||||
- Modules must now have _config.php files in order to be loaded
|
||||
- New Classes
|
||||
- PermissionProvider
|
||||
- Improved Classes
|
||||
- CalendarDateField
|
||||
- Added a calendar icon
|
||||
- CheckboxSetField
|
||||
- Prepared for use editing a many-many join in the CMS, popualted with a SQLMap object
|
||||
- ClassInfo
|
||||
- Added implementorsOf()
|
||||
- ContentNegotiator
|
||||
- Added set_encoding() to choose a character set other than utf-8
|
||||
- DatabaseAdmin
|
||||
- Removed populate() as it was a security risk, the initial content is now loaded via requireDefaultRecords()
|
||||
- DataObject
|
||||
- Added add_extension() for adding decorators in _config.php
|
||||
- DataObjectDecorator
|
||||
- Added extraDBFields() for modifying the decorated data objects, adding extra database fields
|
||||
- Email
|
||||
- Added send_all_emails_to()
|
||||
- Added cc_all_emails_to()
|
||||
- Added bcc_all_emails_to()
|
||||
- Replaced sentLiveErrorsTo() with send_errors_to(), for more flexibility
|
||||
- Form
|
||||
- Added current_action()
|
||||
- Added single_field_required()
|
||||
- FormField
|
||||
- Added Required(), so that you can put asterisks into a form template if you wish
|
||||
- GenericDataAdmin
|
||||
- Updated to use new permission model
|
||||
- LeftAndMain
|
||||
- Added second argument to setApplicationName() so that the name in the top corner and the name shown elsewhere can be 2 different strings
|
||||
- Permission
|
||||
- Added get_codes()
|
||||
- Profiler
|
||||
- Added trace argument to show()
|
||||
- Added profiling scaffolds
|
||||
- Added ?profile_trace=1 url variable tool to show a trace on the profiler
|
||||
- Sorted the output of profiler
|
||||
- Improvements to profiling information
|
||||
- TableField
|
||||
- Added option to aid putting TableFields inside the ComplexTableField popup
|
||||
- TreeDropdownField
|
||||
- Added setTreeBaseID(), for showing a sub-tree in your field
|
||||
- Javascript
|
||||
- Added event.setStyle to prototype_improvements.js
|
||||
- Add class text field to image properties dialog in TinyMCE
|
||||
- Added ?debug_behaviour=1 URL option for debugging behaviour calls with Firebug
|
||||
|
||||
Bug Fixes
|
||||
- CMS
|
||||
- Forms in newsletter & security section were incorrectly submitting when enter was pressed
|
||||
- Fixed search in MemberTableField
|
||||
- Don't show popup when validation fails in Security section
|
||||
- Fixed bug where scrollbars aren't shown in the CMS
|
||||
- Let CMSMain be used to manage objects without Sort
|
||||
- The help button now redirects to http://userhelp.silverstripe.com
|
||||
- Version displayed in CMS now works correctly
|
||||
- Fixed CMS action button support when text size increases
|
||||
- Added message when report is empty
|
||||
- fixed (overrides) to CSS to avoid larger font-size due to em values
|
||||
- Fixed tree scrolling and resizing issues
|
||||
- Fixed sizing issues with CMS right content area
|
||||
- Fixed bug with image insertion
|
||||
- Fixed bug where new pages weren't being highlighted in the CMS
|
||||
- Fixed bug where the last page in the site tree wasn't being highlighted in the CMS
|
||||
- Fixed reordering of groups in security section
|
||||
- Improvements to image inserter
|
||||
- Sapphire
|
||||
- Reduced warnings when E_NOTICE is enabled
|
||||
- Fixed validation of date fields in a user defined form
|
||||
- Fixed multiple security groups being created when logging in with default admin
|
||||
- Fixed permissions for administrating page comments
|
||||
- Fixed ContentController::PageComments() method to die if spammers are POSTing form data when comments are disabled
|
||||
- Fixed permission checking on PHP 5.0.5
|
||||
- Fixed 'cannot access protected property' error in Security section on PHP 5.0.5
|
||||
- Fixed javascript validation of forms
|
||||
- Fixed error when asp_tags = On
|
||||
- Fixed bug where you have a non-required field with numeric validation
|
||||
- Added a limit of 20 steps in Breadcrumbs generation
|
||||
- Changed SiteTree.Title length from 100 to 255
|
||||
- Fixed random password generator in Member::createNewPassword()
|
||||
- Fixed BatchProcess to not display an error if no objects could be processed
|
||||
- Fixed a bug where a user is redirected incorrectly after logging in
|
||||
- Changed temp-folder selection to not leave temp files lying around, and put silverstripe temp files into a silverstripe-cache folder
|
||||
- Made guid of PageComments in rss feed unique
|
||||
- Removed duplicate XML class
|
||||
- Fixed bugs caused by missing html elements
|
||||
- Fixed code to remove need for short_open_tag
|
||||
- Fixed FileSize generation for sizes of just over 1 meg
|
||||
- only show $messageBlock in FormField::FieldHolder() if $Message is existing
|
||||
- fixed rightTitle and id in FormField::FieldHolder()
|
||||
- Fixed ?isDev=1 mode
|
||||
- Set default of sendWarnings on Debug::send_errors_to
|
||||
- Fixed formatting of error emails sent from ajax requests
|
||||
- Removed debug plumbing from the results of Debug::backtrace()
|
||||
- Simplified return data of htmlEmail, an inconsequential internal optimisation
|
||||
- Create assets folder if it doesn't exist when uploading a file
|
||||
- Fixed bug in SiteTree::NestedTitle()
|
||||
- Don't append /home to the home page URL
|
||||
- Small fix for windows installations
|
||||
- Fixed efficiency problems in Versioned::get_latest_version
|
||||
- Fixed File::sync(), to let it recurse into new directories in a single execution
|
||||
- Fixed bug with getting form action that was breaking form submission and complextablefield pop-up
|
||||
- Fixed SQLMap iteration
|
||||
- Simplified EmailField validation error message
|
||||
- Fixed some bugs in the debug emailer
|
||||
- Reduced amount of ajax-refetching that the TreeSelectorFields do
|
||||
- Fix macron support in reports
|
||||
- Improved debug message (remove big blocks of redundant data)
|
||||
- Allow for the disabling of default buttons. Apply this to CMSMain and GenericDataAdmin in the administration, so that we don't default to clicking the *DELETE* button.
|
||||
- Added default value to first arg of permissionFailure(); it's not actually used!
|
||||
- Improved handling of EditableFormFields on new UserDefinedForms
|
||||
- Improved search results message shown on first load
|
||||
- Made calendar control register a date change when the calendar is used
|
||||
- Set some good defaults in DataObjectSet::TotalPages() if they have not been set
|
||||
- Changes to support forum
|
||||
- Require authenficiation to do a db/build on live sites
|
||||
- Close directories before trying to remove them
|
||||
- Fixed a bug where CheckboxSetField wouldn't save if there was a method the same as the field name
|
||||
- Fix multiple "broken" in class attribute of HTML Content
|
||||
- Fixed bug with TreeDropdownField when you clicked the expand link 3 or more times, it wouldn't close
|
||||
- Fixed bug when editing properties of new text fields
|
||||
- Fixed duplicate of UserDefinedForm objects
|
||||
- JSParty
|
||||
- Fixed a bug where you couldn't always edit the bottom of an WYSIWYG editor field
|
||||
- Ensure that WYSIWYG context menu always appears on the screen
|
||||
- Javascript performance improvements
|
||||
- Fix weird bug in behaviour to do with class.applyToChildren
|
||||
- Improved console.log alternative
|
||||
|
||||
Installer
|
||||
- Added option of installing either the default template, or the tutorial template
|
||||
- mod_rewrite check now works with http authentification
|
||||
- Workaround for 'URL file-access is disabled in the server configuration' using curl for mod_rewrite test
|
||||
- Better error message if the installer can't detect the web server
|
||||
- Added an alternative .htaccess configuration
|
||||
- Less file permissions required by the installer
|
||||
- Made deleting the installer files more prominent, it now deletes all the installations files, not just php.
|
||||
- MySQL password is now a hidden field.
|
||||
|
||||
|
||||
2.0.1 (17 Apr 2007)
|
||||
|
||||
New Features
|
||||
- Improved layout of UserDefinedForm submissions in CMS
|
||||
- Don't show name field on root folder in Assets section
|
||||
|
||||
Developer Tools
|
||||
- Mime types fallback for servers don't have /etc/mime.types
|
||||
- mb_string module is now an optional dependency
|
||||
- Added strong_create method to Object, as useCustomClass was not working correctly
|
||||
|
||||
Bug Fixes
|
||||
- Sapphire
|
||||
- Text->FirstParagraph() now only shows the first paragraph
|
||||
- Fixed HTMLText->Summary()
|
||||
- Fixed layout issues on IE7 for TreeDropdownField
|
||||
- Don't show Akismet errors to user
|
||||
- Removed overloaded MemberTableField->sourceItems() that was causing problems
|
||||
- Fixed UserDefinedForm submission emails
|
||||
- Fixed UserDefinedForm permissions
|
||||
- If a file extension doesn't have a maximum upload size associated with it, then allow uploads of any size
|
||||
- Fixed a bug with the TreeMultiselectField that prevented it from displaying the checkboxes
|
||||
- Made Scheduled tasks concrete so they can be instantiated
|
||||
- TableField fixes
|
||||
- Fixed security vunerability in search
|
||||
- GD::color_web2gd() was using incorrect substr
|
||||
- Fixed last link css
|
||||
- Fixed duplicate checkbox fields in UserDefinedForm
|
||||
- Fixed css in UserDefinedForm
|
||||
- CMS
|
||||
- Fixed sizing of tabs in CMS
|
||||
- Fixed popup for single asset in Files & Images section
|
||||
- Fixed link to CMS on default homepage
|
||||
- Fixed permissions table in Security section
|
||||
- Fixed el no properties error in IE
|
||||
- Pressing the flash button a second time now hides the dropdown
|
||||
|
||||
Installer
|
||||
- Fixed MySQL version check
|
||||
- Merge with existing .htaccess file
|
||||
- Test that mod_rewrite is working
|
||||
- Added option to delete installer files after successful install
|
||||
- Fixed PHP4 parse error so installer loads and shows correct error message
|
||||
- Apache test passes if apache is used but apache php functions are not available
|
||||
- SilverStripe needs at least PHP version 5.0.4
|
||||
|
||||
2.0.0 (3 Feb 2007)
|
||||
- Initial release
|
22
INSTALL
Normal file
@ -0,0 +1,22 @@
|
||||
Thanks for downloading SilverStripe CMS.
|
||||
|
||||
Simply extract the archive to a folder in a web-accessible location and visit the folder
|
||||
in your web browser (which in turn runs index.php).
|
||||
|
||||
This will lead you through a web-based installation process.
|
||||
|
||||
|
||||
Server Requirements
|
||||
* PHP 5+
|
||||
* MySQL 4.1+
|
||||
* Apache or Lighttpd webserver (feel free to try with others)
|
||||
* Details at http://doc.silverstripe.com/doku.php?id=server-requirements
|
||||
|
||||
|
||||
General documentation, tutorials:
|
||||
* Wiki: http://doc.silverstripe.com/
|
||||
* Tutorials: http://doc.silverstripe.com/doku.php?id=silverstripe-tutorial
|
||||
|
||||
|
||||
Forum
|
||||
* http://www.silverstripe.com/silverstripe-forum/
|
32
README.md
@ -1,32 +0,0 @@
|
||||
## Overview
|
||||
|
||||
[![CI](https://github.com/silverstripe/silverstripe-installer/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-installer/actions/workflows/ci.yml)
|
||||
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||
|
||||
Base project folder for a Silverstripe ([http://silverstripe.org](http://silverstripe.org)) installation. Required modules are installed via [http://github.com/silverstripe/recipe-cms](http://github.com/silverstripe/recipe-cms). For information on how to change the dependencies in a recipe, please have a look at [https://github.com/silverstripe/recipe-plugin](https://github.com/silverstripe/recipe-plugin). In addition, installer includes [theme/simple](https://github.com/silverstripe-themes/silverstripe-simple) as a default theme.
|
||||
|
||||
## Installation ##
|
||||
|
||||
`composer create-project silverstripe/installer my-app`
|
||||
|
||||
See [Getting Started](https://docs.silverstripe.org/en/4/getting_started/) for more information.
|
||||
|
||||
## Bugtracker ##
|
||||
|
||||
Bugs are tracked on github.com ([framework issues](https://github.com/silverstripe/silverstripe-framework/issues),
|
||||
[cms issues](https://github.com/silverstripe/silverstripe-cms/issues)).
|
||||
Please read our [issue reporting guidelines](https://docs.silverstripe.org/en/4/contributing/issues_and_bugs/).
|
||||
|
||||
## Development and Contribution ##
|
||||
|
||||
If you would like to make changes to the Silverstripe core codebase, we have an extensive [guide to contributing code](https://docs.silverstripe.org/en/4/contributing/code/).
|
||||
|
||||
## Links ##
|
||||
|
||||
* [Changelogs](https://docs.silverstripe.org/en/4/changelogs/)
|
||||
* [Bugtracker: Framework](https://github.com/silverstripe/silverstripe-framework/issues)
|
||||
* [Bugtracker: CMS](https://github.com/silverstripe/silverstripe-cms/issues)
|
||||
* [Bugtracker: Installer](https://github.com/silverstripe/silverstripe-installer/issues)
|
||||
* [Forums](http://silverstripe.org/forums)
|
||||
* [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev)
|
||||
* [License](./LICENSE)
|
20
UPGRADING
Normal file
@ -0,0 +1,20 @@
|
||||
Usually upgrading your SilverStripe installation just means overwriting files
|
||||
and updating your database-schema.
|
||||
|
||||
- Backup your database
|
||||
- Backup your webroot
|
||||
- Download the new release and uncompress it to a temporary folder
|
||||
- With these folders: cms, sapphire, jsparty and auth_openid
|
||||
- Delete your existing folders
|
||||
- Extract and replace folders from your download (leave modules
|
||||
and your custom directories alone)
|
||||
- Moving your current folders (rather than installing on top) means
|
||||
you can undo the installation, and ensures if the new release has no
|
||||
longer contains some files, these files won’t be left behind, which otherwise
|
||||
could cause bugs.
|
||||
- Visit http://your.silverstripe.site/db/build?flush=1 (This adds new
|
||||
fields/tables to the database, and empties your template cache)
|
||||
- Check if any modules (e.g. blog or forum) in your installation are compatible
|
||||
and need to be upgraded as well
|
||||
- Check if you need to adapt your code to changed APIs, see
|
||||
http://doc.silverstripe.com/doku.php?id=upgrading
|
@ -1,26 +0,0 @@
|
||||
# SilverStripe 4.4 changes the way files are resolved. `silverstripe-assets` resolves files using a variety of formats
|
||||
# by default. When starting a brand new project on SilverStripe 4.4 or greater, those extra formats are not needed and
|
||||
# will slowdown file resolution requests a bit. This config removes those redundant formats.
|
||||
|
||||
---
|
||||
Name: project-assetsflysystem
|
||||
After: '#assetsflysystem'
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
# Define public resolution strategy
|
||||
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.public:
|
||||
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
|
||||
properties:
|
||||
ResolutionFileIDHelpers:
|
||||
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||
- '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
|
||||
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\NaturalFileIDHelper'
|
||||
VersionedStage: Live
|
||||
# Define protected resolution strategy
|
||||
SilverStripe\Assets\FilenameParsing\FileResolutionStrategy.protected:
|
||||
class: SilverStripe\Assets\FilenameParsing\FileIDHelperResolutionStrategy
|
||||
properties:
|
||||
DefaultFileIDHelper: '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||
ResolutionFileIDHelpers:
|
||||
- '%$SilverStripe\Assets\FilenameParsing\HashFileIDHelper'
|
||||
VersionedStage: Stage
|
@ -1,9 +0,0 @@
|
||||
# See https://docs.silverstripe.org/en/4/developer_guides/email/ for additional information about setting up email
|
||||
---
|
||||
Name: project-emailconfig
|
||||
After:
|
||||
- '#emailconfig'
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
Swift_Transport:
|
||||
class: Swift_SendmailTransport
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
Name: mytheme
|
||||
---
|
||||
SilverStripe\View\SSViewer:
|
||||
themes:
|
||||
- '$public'
|
||||
- 'simple'
|
||||
- '$default'
|
BIN
assets/Uploads/SilverStripeLogo.png
Normal file
After Width: | Height: | Size: 12 KiB |
21
behat.yml
@ -1,21 +0,0 @@
|
||||
# Note: Currently chrome latest is recommended
|
||||
# Behat test setup requires an `.env` with `SS_BASE_URL` defined, as well
|
||||
# as each of the following commands to initiate a test run:
|
||||
# ========================================================================= #
|
||||
# composer require silverstripe/recipe-testing ^1
|
||||
# vendor/bin/behat-ss @<module>
|
||||
# ========================================================================= #
|
||||
default:
|
||||
suites: []
|
||||
extensions:
|
||||
SilverStripe\BehatExtension\MinkExtension:
|
||||
default_session: facebook_web_driver
|
||||
javascript_session: facebook_web_driver
|
||||
facebook_web_driver:
|
||||
browser: chrome
|
||||
wd_host: "http://127.0.0.1:9515" #chromedriver port
|
||||
browser_name: chrome
|
||||
SilverStripe\BehatExtension\Extension:
|
||||
bootstrap_file: vendor/silverstripe/cms/tests/behat/serve-bootstrap.php
|
||||
screenshot_path: '%paths.base%/artifacts/screenshots'
|
||||
retry_seconds: 4 # default is 2
|
55
build.xml
@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Phing build tooling for SilverStripe releases (see phing.info).
|
||||
Install through "pear channel-discover pear.phing.info && pear install phing/phing".
|
||||
Most tooling is placed in a separate module, install with "composer require silverstripe/buildtools".
|
||||
It is safe to remove this file for normal website operation.
|
||||
-->
|
||||
|
||||
<project name="silverstripe-installer" default="help" phingVersion="2.4.5">
|
||||
|
||||
<import file="buildtools/build.xml" optional="true" />
|
||||
|
||||
<property name="basedir" value="." override="true" />
|
||||
|
||||
<target name="help">
|
||||
<phingcall target="buildtools.help" />
|
||||
</target>
|
||||
|
||||
<target name="phpunit"
|
||||
description="Runs unit tests as defined through phpunix.xml. Requires the 'phpunit' binary.">
|
||||
<if>
|
||||
<available file="${basedir}/vendor/bin/phpunit" />
|
||||
<then>
|
||||
<property name="phpunit_bin" value="vendor/bin/phpunit" />
|
||||
</then>
|
||||
<else>
|
||||
<property name="phpunit_bin" value="phpunit" />
|
||||
</else>
|
||||
</if>
|
||||
<exec command="${phpunit_bin}" checkreturn="true" passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="behat" if="basedir"
|
||||
description="Runs behaviour tests through Behat, on the 'framework' and 'cms' modules (if available). Requires phpunit, composer and behat.">
|
||||
|
||||
<if>
|
||||
<available file="${basedir}/framework/" type="dir" />
|
||||
<then>
|
||||
<echo msg="Testing 'framework' module" />
|
||||
<exec command="vendor/bin/behat --ansi @framework" checkreturn="true" passthru="true" />
|
||||
</then>
|
||||
</if>
|
||||
|
||||
<if>
|
||||
<available file="${basedir}/cms/" type="dir" />
|
||||
<then>
|
||||
<echo msg="Testing 'cms' module" />
|
||||
<exec command="vendor/bin/behat --ansi @cms" checkreturn="true" passthru="true" />
|
||||
</then>
|
||||
</if>
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
18
check-php.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
header("Location: install.php");
|
||||
?>
|
||||
<!--<?php /*-->
|
||||
<html>
|
||||
<head>
|
||||
<title>No PHP Support</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>No PHP Support</h1>
|
||||
<p>
|
||||
<p>Before I can install SilverStripe 2, you must add PHP support to your webserver.</p>
|
||||
<p><a href="check-php.php">Try again</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!--*/?>-->
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"name": "silverstripe/installer",
|
||||
"type": "silverstripe-recipe",
|
||||
"description": "The SilverStripe Framework Installer",
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"silverstripe/recipe-plugin": "^1.2",
|
||||
"silverstripe/recipe-cms": "4.x-dev",
|
||||
"silverstripe-themes/simple": "~3.2.0",
|
||||
"silverstripe/login-forms": "4.x-dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"extra": {
|
||||
"project-files": [
|
||||
"app/_config/*",
|
||||
".env.example",
|
||||
".graphql-generated/*"
|
||||
],
|
||||
"public-files": [
|
||||
"assets/*",
|
||||
"favicon.ico"
|
||||
],
|
||||
"resources-dir": "_resources"
|
||||
},
|
||||
"config": {
|
||||
"process-timeout": 600,
|
||||
"allow-plugins": {
|
||||
"composer/installers": true,
|
||||
"silverstripe/recipe-plugin": true,
|
||||
"silverstripe/vendor-plugin": true
|
||||
}
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"minimum-stability": "dev"
|
||||
}
|
117
config-form.css
Normal file
@ -0,0 +1,117 @@
|
||||
body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#Container * {
|
||||
text-align: left;
|
||||
}
|
||||
ul#Themes{
|
||||
list-style: none;
|
||||
margin: 5px;
|
||||
}
|
||||
ul#Themes li {
|
||||
clear: both;
|
||||
padding: 3px 0;
|
||||
}
|
||||
ul#Themes input {
|
||||
float: left;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
ul#Themes label {
|
||||
margin: -2px 5px 0 15px;
|
||||
}
|
||||
.good td {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.warning td {
|
||||
color: #ef7f24;
|
||||
}
|
||||
.testResults .error td {
|
||||
border: 1px #CCC solid;
|
||||
color: red;
|
||||
}
|
||||
|
||||
p.error {
|
||||
padding: 0.5em;
|
||||
background-color: #ffe9e9;
|
||||
border: 1px #ff8e8e solid;
|
||||
color: #f03838;
|
||||
}
|
||||
p.warning {
|
||||
padding: 0.5em;
|
||||
background-color: #fef1e1;
|
||||
border: 1px #ffc28b solid;
|
||||
color: #cb6a1c;
|
||||
}
|
||||
p.warning label {
|
||||
display: inline;
|
||||
margin-left: 5px;
|
||||
color: #cb6a1c
|
||||
}
|
||||
p.good {
|
||||
padding: 0.5em;
|
||||
background-color: #e2fee1;
|
||||
border: 1px #43cb3e solid;
|
||||
color: #359318;
|
||||
}
|
||||
p.error a,
|
||||
p.warning a,
|
||||
p.good a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
p.error a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
span.middleColumn {
|
||||
width: 312px;
|
||||
margin-right: 0;
|
||||
padding: 4px;
|
||||
}
|
||||
input.text, textarea, select {
|
||||
padding: 2px;
|
||||
border: 1px solid #A7A7A7;
|
||||
color: #000;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
width: 305px;
|
||||
}
|
||||
#stats {
|
||||
float: left;
|
||||
margin: 5px;
|
||||
}
|
||||
table.testResults {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
#Layout h4 {
|
||||
font-size: 2em;
|
||||
}
|
||||
.testResults td {
|
||||
border: 1px #CCC solid;
|
||||
width: 400px;
|
||||
padding: 4px;
|
||||
}
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
p.mysql,
|
||||
p.adminAcc,
|
||||
p.devHelp {
|
||||
padding-top: 20px;
|
||||
}
|
||||
p#mysql_credentials,
|
||||
p#AdminAccount,
|
||||
p#DevSites {
|
||||
width: 330px;
|
||||
margin-top: 0;
|
||||
float: left;
|
||||
}
|
||||
#Layout input.action {
|
||||
text-align: center;
|
||||
width: 160px;
|
||||
font-size: 1em;
|
||||
}
|
173
config-form.html
Normal file
@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>SilverStripe CMS Installation</title>
|
||||
<script type="text/js">
|
||||
function show(id) {
|
||||
document.getElementById(id).style.display = '';
|
||||
}
|
||||
function hide(id) {
|
||||
document.getElementById(id).style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/layout.css" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/typography.css" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/form.css" />
|
||||
<link rel="stylesheet" type="text/css" href="config-form.css" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="BgContainer">
|
||||
<div id="Container">
|
||||
<div id="Header">
|
||||
<h1>SilverStripe CMS Installation</h1>
|
||||
<p>Version <?php echo $silverstripe_version; ?></p>
|
||||
</div>
|
||||
|
||||
<div id="Navigation"> </div>
|
||||
<div class="clear"><!-- --></div>
|
||||
|
||||
<div id="Layout">
|
||||
<div class="typography">
|
||||
<h1>Welcome to SilverStripe</h1>
|
||||
<p>Thanks for choosing to use SilverStripe! Please follow the instructions below to get SilverStripe installed.</p>
|
||||
|
||||
<form action="install.php" method="post">
|
||||
<?php if(isset($hasErrorOtherThanDatabase)) { ?>
|
||||
<p class="error">
|
||||
You aren't currently able to install the software. Please <a href="#requirements">see below</a> for details.<br />
|
||||
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.com/doku.php?id=server-requirements">server requirements wiki page</a>.
|
||||
</p>
|
||||
<?php } else { ?>
|
||||
<?php if($req->hasWarnings()) { ?>
|
||||
<p class="warning">
|
||||
There are some issues that we recommend you look at before installing, however, you are still able to install the software.
|
||||
Please see below for details.<br />
|
||||
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.com/doku.php?id=server-requirements">server requirements wiki page</a>.
|
||||
</p>
|
||||
<?php } else if(!$dbReq->hasErrors()) { ?>
|
||||
<p class="good">
|
||||
You're ready to install!
|
||||
</p>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<b>Template to install:</b>
|
||||
</p>
|
||||
<ul id="Themes">
|
||||
<li><input type="radio" name="template" value="default" id="BlackCandy" checked="checked" /><label for="BlackCandy">BlackCandy, default template ready to use.</label></li>
|
||||
<li><input type="radio" name="template" value="tutorial" id="EmptyTemplate" /><label for="EmptyTemplate">Empty template, ready to begin the tutorial.</label></li>
|
||||
</ul>
|
||||
<p>You can change the template or download another from the SilverStripe website after installation.</p>
|
||||
|
||||
<input type="checkbox" id="stats" name="stats" checked="checked"><label for="stats">Send information on my webserver to SilverStripe (this is only version information, used for statistical purposes)</label><br />
|
||||
|
||||
|
||||
<?php if($alreadyInstalled) { ?>
|
||||
<p class="warning">
|
||||
<strong>Note:</strong> It seems as though SilverStripe is already installed here. If you ask me to install, I will overwrite
|
||||
the <strong>.htaccess</strong> and <strong>mysite/_config.php</strong> files.
|
||||
<br />
|
||||
<input type="checkbox" id="ReIn" name="force_reinstall" onclick="document.getElementById('install_button').disabled = !this.checked" /><label for="ReIn">That's okay, please re-install SilverStripe and overwrite these files.</label>
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<p>
|
||||
<?php if($alreadyInstalled) { ?>
|
||||
<input id="install_button" type="submit" disabled="disabled" class="action" name="go" value="Install SilverStripe" onclick="document.getElementById('saving_top').style.display = ''; this.value = 'Installing SilverStripe...'" />
|
||||
<?php } else { ?>
|
||||
<input id="install_button" type="submit" class="action" name="go" value="Install SilverStripe" onclick="document.getElementById('saving_top').style.display = ''; this.value = 'Installing SilverStripe...'" />
|
||||
<?php } ?>
|
||||
|
||||
<span id="saving_top" style="display: none">
|
||||
|
||||
<img src="cms/images/network-save.gif" />
|
||||
(this will take a minute or so)
|
||||
</span>
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="database" value="MySQLDatabase" />
|
||||
<h4>MySQL Database</h4>
|
||||
<?php if($dbReq->hasErrors()) { ?>
|
||||
<p class="error"><!-- class="error" -->
|
||||
These database details don't appear to be correct. Please enter the correct details before installing.
|
||||
</p>
|
||||
<?php } else { ?>
|
||||
<p class="good">
|
||||
These database details look all good!
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<p id="mysql_credentials">
|
||||
<label for="mysql_server">MySQL server:</label>
|
||||
<span class="middleColumn"><input id="mysql_server" class="text" type="text" name="mysql[server]" value="<?php echo $databaseConfig['server']; ?>" /></span>
|
||||
<label for="mysql_username">MySQL username:</label>
|
||||
<span class="middleColumn"><input id="mysql_username" class="text" type="text" name="mysql[username]" value="<?php echo $databaseConfig['username']; ?>" /></span>
|
||||
<label for="mysql_password">MySQL password:</label>
|
||||
<span class="middleColumn"><input id="mysql_password" class="text" type="password" name="mysql[password]" value="<?php echo $databaseConfig['password']; ?>" /></span>
|
||||
<label for="mysql_database">MySQL database:</label>
|
||||
<span class="middleColumn"><input id="mysql_database" class="text" type="text" name="mysql[database]" value="<?php echo $databaseConfig['database']; ?>" onchange="this.value = this.value.replace(/[^A-Za-z0-9_]+/g,'');" /></span>
|
||||
<input type="submit" class="action" value="Re-check requirements" />
|
||||
</p>
|
||||
<p class="mysql">SilverStripe stores its content in a MySQL database. Please provide the username and password to connect to the server here. If this account has permission to create databases, then we will create the database for you; otherwise, you must give the name of a database that already exists.</p>
|
||||
<div class="clear"><!-- --></div>
|
||||
<h5>Details</h5>
|
||||
<?php $dbReq->showTable("MySQL Configuration"); ?>
|
||||
|
||||
<br />
|
||||
|
||||
<h4>SilverStripe Administration Account</h4>
|
||||
|
||||
<p id="AdminAccount">
|
||||
<label for="admin_username">Administrator email:</label>
|
||||
<span class="middleColumn"><input type="text" class="text" name="admin[username]" id="admin_username" value="<?php echo $adminConfig['username']; ?>" /></span>
|
||||
<label for="admin_password">Administrator password:</label>
|
||||
<span class="middleColumn"><input type="text" class="text" name="admin[password]" id="admin_password" value="<?php echo $adminConfig['password']; ?>" /></span>
|
||||
<label for="admin_firstname">Administrator first name:</label>
|
||||
<span class="middleColumn"><input type="text" class="text" name="admin[firstname]" id="admin_firstname" value="<?php echo $adminConfig['firstname']; ?>" /></span>
|
||||
<label for="admin_surname">Administrator surname:</label>
|
||||
<span class="middleColumn"><input type="text" class="text" name="admin[surname]" id="admin_surname" value="<?php echo $adminConfig['surname']; ?>" /></span>
|
||||
</p>
|
||||
<p class="adminAcc">
|
||||
We will set up 1 administrator account for you automatically. Enter the email address and password. If you'd
|
||||
rather log-in with a username instead of an email address, enter that instead.
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<h4>Development Servers</h4>
|
||||
<p id="DevSites">
|
||||
<label for="devsites">Development servers:</label>
|
||||
<span class="middleColumn"><textarea name="devsites" id="devsites" rows="5" />localhost
|
||||
127.0.0.1</textarea></span>
|
||||
</p>
|
||||
<p class="devHelp">
|
||||
SilverStripe allows you to run a site in <a href="http://doc.silverstripe.com/doku.php?id=devmode">development mode</a>.
|
||||
This shows all error messages in the web browser instead of emailing them to the administrator, and allows
|
||||
the database to be built without logging in as administrator. Please enter the host/domain names for servers
|
||||
you will be using for development.
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h4 id="requirements">Requirements</h4>
|
||||
<?php
|
||||
$req->showTable();
|
||||
?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"><!-- --></div>
|
||||
</div>
|
||||
|
||||
<div id="Footer">
|
||||
<div class="footerTop"><!-- --></div>
|
||||
<p>Copyright © 2007 | Powered by <a href="http://www.silverstripe.com">SilverStripe Open Source CMS</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
favicon.ico
Normal file
After Width: | Height: | Size: 318 B |
17
index.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<!--
|
||||
This simple page will redirect to check-php.php
|
||||
check-php.php will either redirect to install.php or no-php.html, depending on whether PHP support
|
||||
is installed
|
||||
-->
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.location = 'check-php.php';
|
||||
</script>
|
||||
<noscript>
|
||||
<a href="install.php">Click here to install</a>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
976
install.php
Normal file
@ -0,0 +1,976 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SilverStripe CMS Installer
|
||||
* This installer doesn't use any of the fancy Sapphire stuff in case it's unsupported.
|
||||
*/
|
||||
|
||||
ini_set('max_execution_time', 300);
|
||||
|
||||
session_start();
|
||||
|
||||
// Load database config
|
||||
if(isset($_REQUEST['mysql'])) {
|
||||
$databaseConfig = $_REQUEST['mysql'];
|
||||
} else {
|
||||
$databaseConfig = array(
|
||||
"server" => "localhost",
|
||||
"username" => "root",
|
||||
"password" => "",
|
||||
"database" => "SS_mysite",
|
||||
);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['admin'])) {
|
||||
$adminConfig = $_REQUEST['admin'];
|
||||
} else {
|
||||
$adminConfig = array(
|
||||
'username' => 'admin',
|
||||
'password' => 'password',
|
||||
'firstname' => '',
|
||||
'surname' => ''
|
||||
);
|
||||
}
|
||||
|
||||
$alreadyInstalled = (file_exists('mysite/_config.php') || file_exists('tutorial/_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];
|
||||
}
|
||||
} else {
|
||||
$silverstripe_version = "unknown";
|
||||
}
|
||||
|
||||
// Check requirements
|
||||
$req = new InstallRequirements();
|
||||
$req->check();
|
||||
|
||||
if($req->hasErrors()) {
|
||||
$hasErrorOtherThanDatabase = true;
|
||||
}
|
||||
|
||||
if($databaseConfig) {
|
||||
$dbReq = new InstallRequirements();
|
||||
$dbReq->checkdatabase($databaseConfig);
|
||||
}
|
||||
|
||||
// Actual processor
|
||||
if(isset($_REQUEST['go']) && !$req->hasErrors() && !$dbReq->hasErrors()) {
|
||||
// Confirm before reinstalling
|
||||
if(!isset($_REQUEST['force_reinstall']) && $alreadyInstalled) {
|
||||
include('config-form.html');
|
||||
|
||||
} else {
|
||||
$inst = new Installer();
|
||||
$inst->install($_REQUEST);
|
||||
}
|
||||
|
||||
// Show the config form
|
||||
} else {
|
||||
include('config-form.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* This class checks requirements
|
||||
* Each of the requireXXX functions takes an argument which gives a user description of the test. It's an array
|
||||
* of 3 parts:
|
||||
* $description[0] - The test catetgory
|
||||
* $description[1] - The test title
|
||||
* $description[2] - The test error to show, if it goes wrong
|
||||
*/
|
||||
|
||||
class InstallRequirements {
|
||||
var $errors, $warnings, $tests;
|
||||
|
||||
/**
|
||||
* Just check that the database configuration is okay
|
||||
*/
|
||||
function checkdatabase($databaseConfig) {
|
||||
if($this->requireFunction('mysql_connect', array("PHP Configuration", "MySQL support", "MySQL support not included in PHP."))) {
|
||||
$this->requireMySQLServer($databaseConfig['server'], array("MySQL Configuration", "Does the server exist",
|
||||
"Can't find the a MySQL server on '$databaseConfig[server]'", $databaseConfig['server']));
|
||||
if($this->requireMysqlConnection($databaseConfig['server'], $databaseConfig['username'], $databaseConfig['password'],
|
||||
array("MySQL Configuration", "Are the access credentials correct", "That username/password doesn't work"))) {
|
||||
@$this->requireMySQLVersion("4.1", array("MySQL Configuration", "MySQL version at least 4.1", "MySQL version 4.1 is required, you only have ", "MySQL " . mysql_get_server_info()));
|
||||
}
|
||||
$this->requireDatabaseOrCreatePermissions($databaseConfig['server'], $databaseConfig['username'], $databaseConfig['password'], $databaseConfig['database'],
|
||||
array("MySQL Configuration", "Can I access/create the database", "I can't create new databases and the database '$databaseConfig[database]' doesn't exist"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check everything except the database
|
||||
*/
|
||||
function check() {
|
||||
$this->errors = null;
|
||||
|
||||
$this->requirePHPVersion('5.2.0', '5.0.4', array("PHP Configuration", "PHP5 installed", null, "PHP version " . phpversion()));
|
||||
|
||||
// Check that we can identify the root folder successfully
|
||||
$this->requireFile('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->requireFile('mysite', array("File permissions", "mysite/ folder exists", "There's no mysite folder."));
|
||||
$this->requireFile('sapphire', array("File permissions", "sapphire/ folder exists", "There's no sapphire folder."));
|
||||
$this->requireFile('cms', array("File permissions", "cms/ folder exists", "There's no cms folder."));
|
||||
$this->requireFile('jsparty', array("File permissions", "jsparty/ folder exists", "There's no jsparty folder."));
|
||||
$this->requireWriteable('.htaccess', array("File permissions", "Is the .htaccess file writeable?", null));
|
||||
$this->requireWriteable('mysite', array("File permissions", "Is the mysite/ folder writeable?", null));
|
||||
$this->requireWriteable('tutorial', array("File permissions", "Is the tutorial/ folder writeable?", null));
|
||||
$this->requireWriteable('assets', array("File permissions", "Is the assets/ folder writeable?", null));
|
||||
|
||||
$this->requireTempFolder(array('File permissions', 'Is the temporary folder writeable?', null));
|
||||
|
||||
// Check for rewriting
|
||||
|
||||
$webserver = strip_tags(trim($_SERVER['SERVER_SIGNATURE']));
|
||||
if($webserver == '') {
|
||||
$webserver = "I can't tell what webserver you are running";
|
||||
}
|
||||
|
||||
$this->isRunningApache(array("Webserver Configuration", "Server software", "$webserver. Without Apache I can't tell if mod_rewrite is enabled.", $webserver));
|
||||
if(function_exists('apache_get_modules')) {
|
||||
$this->requireApacheModule('mod_rewrite', array("Webserver Configuration", "mod_rewrite enabled", "You need mod_rewrite to run SilverStripe CMS, but it is not enabled."));
|
||||
} else {
|
||||
$this->warning(array("Webserver Configuration", "mod_rewrite enabled", "I can't tell whether mod_rewrite is running. You may need to configure a rewriting rule yourself."));
|
||||
}
|
||||
|
||||
// Check for $_SERVER configuration
|
||||
$this->requireServerVariables(array('SCRIPT_NAME','HTTP_HOST','SCRIPT_FILENAME'), array("Webserver config", "Recognised webserver", "You seem to be using an unsupported webserver. The server variables SCRIPT_NAME, HTTP_HOST, SCRIPT_FILENAME need to be set."));
|
||||
|
||||
// Check for GD support
|
||||
if(!$this->requireFunction("imagecreatetruecolor", array("PHP Configuration", "GD2 support", "PHP must have GD version 2."))) {
|
||||
$this->requireFunction("imagecreate", array("PHP Configuration", "GD2 support", "GD2 support", "GD support for PHP not included."));
|
||||
}
|
||||
|
||||
// Check for XML support
|
||||
$this->requireFunction('xml_set_object', array("PHP Configuration", "XML support", "XML support not included in PHP."));
|
||||
|
||||
// Check for MySQL support
|
||||
$this->requireFunction('mysql_connect', array("PHP Configuration", "MySQL support", "MySQL support not included in PHP."));
|
||||
|
||||
// Check memory allocation
|
||||
$this->requireMemory(20*1024*1024, 32*1024*1024, array("PHP Configuration", "Memory allocated (PHP config option 'memory_limit')", "SilverStripe needs a minimum of 20M allocated to PHP, but recommends 32M.", ini_get("memory_limit")));
|
||||
|
||||
// Check allow_call_time_pass_reference
|
||||
$this->suggestPHPSetting('allow_call_time_pass_reference', array(1,'1','on','On'), array("PHP Configuration", "Check that the php.ini setting allow_call_time_pass_reference is on",
|
||||
"You can install with allow_call_time_pass_reference not set, but some warnings may get displayed. For best results, turn it on."));
|
||||
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
function suggestPHPSetting($settingName, $settingValues, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
|
||||
$val = ini_get($settingName);
|
||||
if(!in_array($val, $settingValues) && $val != $settingValues) {
|
||||
$testDetails[2] = "$settingName is set to '$val' in php.ini. $testDetails[2]";
|
||||
$this->warning($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function requireMemory($min, $recommended, $testDetails) {
|
||||
$_SESSION['forcemem'] = false;
|
||||
|
||||
$mem = $this->getPHPMemory();
|
||||
if($mem < (32 * 1024 * 1024)) {
|
||||
$_SESSION['forcemem'] = true;
|
||||
ini_set('memory_limit', '32M');
|
||||
$mem = $this->getPHPMemory();
|
||||
$testDetails[3] = ini_get("memory_limit");
|
||||
}
|
||||
|
||||
$this->testing($testDetails);
|
||||
|
||||
if($mem < $min && $mem > 0) {
|
||||
$testDetails[2] .= " You only have " . ini_get("memory_limit") . " allocated";
|
||||
$this->error($testDetails);
|
||||
} else if($mem < $recommended && $mem > 0) {
|
||||
$testDetails[2] .= " You only have " . ini_get("memory_limit") . " allocated";
|
||||
$this->warning($testDetails);
|
||||
} elseif($mem == 0) {
|
||||
$testDetails[2] .= " We can't determine how much memory you have allocated. Install only if you're sure you've allocated at least 20 MB.";
|
||||
$this->warning($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function getPHPMemory() {
|
||||
$memString = ini_get("memory_limit");
|
||||
|
||||
switch(strtolower(substr($memString,-1))) {
|
||||
case "k":
|
||||
return round(substr($memString,0,-1)*1024);
|
||||
|
||||
case "m":
|
||||
return round(substr($memString,0,-1)*1024*1024);
|
||||
|
||||
case "g":
|
||||
return round(substr($memString,0,-1)*1024*1024*1024);
|
||||
|
||||
default:
|
||||
return round($memString);
|
||||
}
|
||||
}
|
||||
|
||||
function listErrors() {
|
||||
if($this->errors) {
|
||||
echo "<p>The following problems are preventing me from installing SilverStripe CMS:</p>";
|
||||
foreach($this->errors as $error) {
|
||||
echo "<li>" . htmlentities($error) . "</li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showTable($section = null) {
|
||||
if($section) {
|
||||
$tests = $this->tests[$section];
|
||||
echo "<table class=\"testResults\" width=\"100%\">";
|
||||
foreach($tests as $test => $result) {
|
||||
echo "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1])) . "</td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
} else {
|
||||
foreach($this->tests as $section => $tests) {
|
||||
echo "<h5>$section</h5>";
|
||||
echo "<table class=\"testResults\">";
|
||||
|
||||
foreach($tests as $test => $result) {
|
||||
echo "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1])) . "</td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showInstallStatus() {
|
||||
if($this->warnings) {
|
||||
echo "I have installed SilverStripe CMS, however, you should note the following:";
|
||||
foreach($this->warnings as $warning) {
|
||||
echo "<li>" . htmlentities($warning) . "</li>";
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<p>I have installed SilverStripe CMS successfully!</p>
|
||||
<p><a href="./admin/" target="_blank">Open the CMS tool</a><br />
|
||||
<a href="./" target="_blank">Open the site</a></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function requireFunction($funcName, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
if(!function_exists($funcName)) $this->error($testDetails);
|
||||
else return true;
|
||||
}
|
||||
|
||||
function requirePHPVersion($recommendedVersion, $requiredVersion, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
|
||||
list($recA, $recB, $recC) = explode('.', $recommendedVersion);
|
||||
list($reqA, $reqB, $reqC) = explode('.', $requiredVersion);
|
||||
list($a, $b, $c) = explode('.', phpversion());
|
||||
$c = ereg_replace('-.*$','',$c);
|
||||
|
||||
if($a > $recA || ($a == $recA && $b > $recB) || ($a == $reqA && $b == $reqB && $c >= $reqC)) {
|
||||
$testDetails[2] = "SilverStripe recommends PHP version $recommendedVersion or later, only $a.$b.$c is installed. While SilverStripe should run, you may run into issues, and future versions of SilverStripe may require a later version. Upgrading PHP is recommended.";
|
||||
$this->warning($testDetails);
|
||||
return;
|
||||
}
|
||||
|
||||
if($a > $reqA) return true;
|
||||
if($a == $reqA && $b > $reqB) return true;
|
||||
if($a == $reqA && $b == $reqB && $c >= $reqC) return true;
|
||||
|
||||
if(!$testDetails[2]) {
|
||||
if($a < $reqA) {
|
||||
$testDetails[2] = "You need PHP version $version or later, only $a.$b.$c is installed. Unfortunately PHP$a and PHP$reqA have some incompatabilities, so if you are on a your web-host may need to move you to a different server. Some software doesn't work with PHP5 and so upgrading a shared server could be problematic.";
|
||||
} else {
|
||||
$testDetails[2] = "You need PHP version $requiredVersion or later, only $a.$b.$c is installed. Please upgrade your server, or ask your web-host to do so.";
|
||||
}
|
||||
}
|
||||
|
||||
$this->error($testDetails);
|
||||
}
|
||||
|
||||
function requireFile($filename, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$filename = $this->getBaseDir() . $filename;
|
||||
if(!file_exists($filename)) {
|
||||
$testDetails[2] .= " (file '$filename' not found)";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
function requireNoFile($filename, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$filename = $this->getBaseDir() . $filename;
|
||||
if(file_exists($filename)) {
|
||||
$testDetails[2] .= " (file '$filename' found)";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
function moveFileOutOfTheWay($filename, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$filename = $this->getBaseDir() . $filename;
|
||||
if(file_exists($filename)) {
|
||||
if(file_exists("$filename.bak")) rm("$filename.bak");
|
||||
rename($filename, "$filename.bak");
|
||||
}
|
||||
}
|
||||
|
||||
function requireWriteable($filename, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$filename = $this->getBaseDir() . $filename;
|
||||
|
||||
if(function_exists('posix_getgroups')) {
|
||||
if(!is_writeable($filename)) {
|
||||
$user = posix_getpwuid(posix_geteuid());
|
||||
$groups = posix_getgroups();
|
||||
foreach($groups as $group) {
|
||||
$groupInfo = posix_getgrgid($group);
|
||||
$groupList[] = $groupInfo['name'];
|
||||
}
|
||||
$groupList = "'" . implode("', '", $groupList) . "'";
|
||||
|
||||
$testDetails[2] .= "User '$user[name]' needs to write be able to write to this file:\n$filename";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
} else {
|
||||
$testDetails[2] .= "Unable to detect whether I can write to files. Please ensure $filename is writable.";
|
||||
$this->warning($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function requireTempFolder($testDetails) {
|
||||
$this->testing($testDetails);
|
||||
|
||||
if(function_exists('sys_get_temp_dir')) {
|
||||
$sysTmp = sys_get_temp_dir();
|
||||
} elseif(isset($_ENV['TMP'])) {
|
||||
$sysTmp = $_ENV['TMP'];
|
||||
} else {
|
||||
@$tmpFile = tempnam('adfadsfdas','');
|
||||
@unlink($tmpFile);
|
||||
$sysTmp = dirname($tmpFile);
|
||||
}
|
||||
|
||||
$worked = true;
|
||||
$ssTmp = "$sysTmp/silverstripe-cache";
|
||||
|
||||
if(!@file_exists($ssTmp)) {
|
||||
@$worked = mkdir($ssTmp);
|
||||
|
||||
if(!$worked) {
|
||||
$ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . "/silverstripe-cache";
|
||||
$worked = true;
|
||||
if(!@file_exists($ssTmp)) {
|
||||
@$worked = mkdir($ssTmp);
|
||||
}
|
||||
if(!$worked) {
|
||||
$testDetails[2] = "Permission problem gaining access to a temp folder. " .
|
||||
"Please create a folder named silverstripe-cache in the base folder " .
|
||||
"of the installation and ensure it has the adequate permissions";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function requireApacheModule($moduleName, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
if(!in_array($moduleName, apache_get_modules())) $this->error($testDetails);
|
||||
}
|
||||
|
||||
function requireMysqlConnection($server, $username, $password, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$conn = @mysql_connect($server, $username, $password);
|
||||
|
||||
if($conn) {
|
||||
return true;
|
||||
/*
|
||||
if(mysql_query("CREATE DATABASE testing123")) {
|
||||
mysql_query("DROP DATABASE testing123");
|
||||
return true;
|
||||
} else {
|
||||
$testDetails[2] .= " (user '$username' doesn't have CREATE DATABASE permissions.)";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
$testDetails[2] .= ": " . mysql_error();
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function requireMySQLServer($server, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$conn = @mysql_connect($server, null, null);
|
||||
|
||||
if($conn || mysql_errno() < 2000) {
|
||||
return true;
|
||||
} else {
|
||||
$testDetails[2] .= ": " . mysql_error();
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function requireMySQLVersion($version, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
|
||||
if(!mysql_get_server_info()) {
|
||||
$testDetails[2] = 'Cannot determine the version of MySQL installed. Please ensure at least version 4.1 is installed.';
|
||||
$this->warning($testDetails);
|
||||
} else {
|
||||
list($majorRequested, $minorRequested) = explode('.', $version);
|
||||
list($majorHas, $minorHas) = explode('.', mysql_get_server_info());
|
||||
|
||||
if(($majorHas > $majorRequested) || ($majorHas == $majorRequested && $minorHas >= $minorRequested)) {
|
||||
return true;
|
||||
} else {
|
||||
$testDetails[2] .= "{$majorHas}.{$minorHas}.";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function requireDatabaseOrCreatePermissions($server, $username, $password, $database, $testDetails) {
|
||||
$this->testing($testDetails);
|
||||
$conn = @mysql_connect($server, $username, $password);
|
||||
|
||||
if(@mysql_select_db($database)) {
|
||||
$okay = "Database '$database' exists";
|
||||
|
||||
} else {
|
||||
if(@mysql_query("CREATE DATABASE testing123")) {
|
||||
mysql_query("DROP DATABASE testing123");
|
||||
$okay = "Able to create a new database";
|
||||
|
||||
} else {
|
||||
$testDetails[2] .= " (user '$username' doesn't have CREATE DATABASE permissions.)";
|
||||
$this->error($testDetails);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if($okay) {
|
||||
$testDetails[3] = $okay;
|
||||
$this->testing($testDetails);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function requireServerVariables($varNames, $errorMessage) {
|
||||
//$this->testing($testDetails);
|
||||
foreach($varNames as $varName) {
|
||||
if(!$_SERVER[$varName]) $missing[] = '$_SERVER[' . $varName . ']';
|
||||
}
|
||||
if(!isset($missing)) {
|
||||
return true;
|
||||
} else {
|
||||
$testDetails[2] .= " (the following PHP variables are missing: " . implode(", ", $missing) . ")";
|
||||
$this->error($testDetails);
|
||||
}
|
||||
}
|
||||
|
||||
function isRunningApache($testDetails) {
|
||||
$this->testing($testDetails);
|
||||
if(function_exists('apache_get_modules') || stristr($_SERVER['SERVER_SIGNATURE'], 'Apache'))
|
||||
return true;
|
||||
|
||||
$this->warning($testDetails);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getBaseDir() {
|
||||
return dirname($_SERVER['SCRIPT_FILENAME']) . '/';
|
||||
}
|
||||
|
||||
function testing($testDetails) {
|
||||
if(!$testDetails) return;
|
||||
|
||||
$section = $testDetails[0];
|
||||
$test = $testDetails[1];
|
||||
|
||||
$message = "OK";
|
||||
if(isset($testDetails[3])) $message .= " ($testDetails[3])";
|
||||
|
||||
$this->tests[$section][$test] = array("good", $message);
|
||||
}
|
||||
|
||||
function error($testDetails) {
|
||||
$section = $testDetails[0];
|
||||
$test = $testDetails[1];
|
||||
|
||||
$this->tests[$section][$test] = array("error", $testDetails[2]);
|
||||
$this->errors[] = $testDetails;
|
||||
|
||||
}
|
||||
function warning($testDetails) {
|
||||
$section = $testDetails[0];
|
||||
$test = $testDetails[1];
|
||||
|
||||
|
||||
$this->tests[$section][$test] = array("warning", $testDetails[2]);
|
||||
$this->warnings[] = $testDetails;
|
||||
}
|
||||
|
||||
function hasErrors() {
|
||||
return sizeof($this->errors);
|
||||
}
|
||||
function hasWarnings() {
|
||||
return sizeof($this->warnings);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Installer extends InstallRequirements {
|
||||
function install($config) {
|
||||
?>
|
||||
<h1>Installing SilverStripe...</h1>
|
||||
<p>I am now running through the installation steps (this should take about 30 seconds)</p>
|
||||
<p>If you receive a fatal error, refresh this page to continue the installation
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if(isset($_POST['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];
|
||||
}
|
||||
} else {
|
||||
$silverstripe_version = "unknown";
|
||||
}
|
||||
|
||||
$phpVersion = urlencode(phpversion());
|
||||
$conn = @mysql_connect($config['mysql']['server'], null, null);
|
||||
$databaseVersion = urlencode('MySQL ' . mysql_get_server_info());
|
||||
$webserver = urlencode($_SERVER['SERVER_SOFTWARE']);
|
||||
|
||||
$url = "http://ss2stat.silverstripe.com/Installation/add?SilverStripe=$silverstripe_version&PHP=$phpVersion&Database=$databaseVersion&WebServer=$webserver";
|
||||
|
||||
if(isset($_SESSION['StatsID']) && $_SESSION['StatsID']) {
|
||||
$url .= '&ID=' . $_SESSION['StatsID'];
|
||||
}
|
||||
|
||||
@$_SESSION['StatsID'] = file_get_contents($url);
|
||||
}
|
||||
|
||||
// Delete old _config.php files
|
||||
if(file_exists('tutorial/_config.php')) {
|
||||
unlink('tutorial/_config.php');
|
||||
}
|
||||
|
||||
if(file_exists('mysite/_config.php')) {
|
||||
unlink('mysite/_config.php');
|
||||
}
|
||||
|
||||
// Write the config file
|
||||
|
||||
$template = $_POST['template'] == 'tutorial' ? 'tutorial' : 'mysite';
|
||||
|
||||
$theme = '';
|
||||
if($_POST['template'] == 'default') {
|
||||
$theme = <<<PHP
|
||||
// This line set's the current theme. More themes can be
|
||||
// downloaded from http://www.silverstripe.com/cms-themes-and-skin
|
||||
SSViewer::set_theme('blackcandy');
|
||||
PHP;
|
||||
}
|
||||
|
||||
$mem = $_SESSION['forcemem'] ? "ini_set('memory_limit', '32M');" : '';
|
||||
|
||||
echo "<li>Creating '$template/_config.php'...</li>";
|
||||
flush();
|
||||
|
||||
$devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
|
||||
|
||||
$this->createFile("$template/_config.php", <<<PHP
|
||||
<?php
|
||||
|
||||
$mem
|
||||
|
||||
global \$project;
|
||||
\$project = '$template';
|
||||
|
||||
global \$databaseConfig;
|
||||
\$databaseConfig = array(
|
||||
"type" => "$config[database]",
|
||||
"server" => "{$config['mysql']['server']}",
|
||||
"username" => "{$config['mysql']['username']}",
|
||||
"password" => "{$config['mysql']['password']}",
|
||||
"database" => "{$config['mysql']['database']}",
|
||||
);
|
||||
|
||||
// Sites running on the following servers will be
|
||||
// run in development mode. See
|
||||
// http://doc.silverstripe.com/doku.php?id=devmode
|
||||
// for a description of what dev mode does.
|
||||
Director::set_dev_servers($devServers);
|
||||
|
||||
$theme
|
||||
|
||||
?>
|
||||
PHP
|
||||
);
|
||||
|
||||
echo "<li>Creating '.htaccess' file...</li>";
|
||||
flush();
|
||||
|
||||
$this->createHtaccess();
|
||||
|
||||
// Load the sapphire runtime
|
||||
$_SERVER['SCRIPT_FILENAME'] = dirname($_SERVER['SCRIPT_FILENAME']) . '/sapphire/main.php';
|
||||
chdir('sapphire');
|
||||
|
||||
require_once('core/Core.php');
|
||||
require_once('core/ManifestBuilder.php');
|
||||
require_once('core/ClassInfo.php');
|
||||
require_once('core/Object.php');
|
||||
require_once('core/control/Director.php');
|
||||
require_once('core/ViewableData.php');
|
||||
require_once('core/Session.php');
|
||||
require_once('core/control/Controller.php');
|
||||
require_once('filesystem/Filesystem.php');
|
||||
|
||||
echo "<li>Building database schema...</li>";
|
||||
flush();
|
||||
|
||||
// Build database
|
||||
$_GET['flush'] = true;
|
||||
$con = new Controller();
|
||||
$con->pushCurrent();
|
||||
ManifestBuilder::compileManifest();
|
||||
$dbAdmin = new DatabaseAdmin();
|
||||
$dbAdmin->init();
|
||||
|
||||
$_REQUEST['username'] = $_REQUEST['admin']['username'];
|
||||
$_REQUEST['password'] = $_REQUEST['admin']['password'];
|
||||
$dbAdmin->doBuild(true);
|
||||
|
||||
$adminmember = DataObject::get_one('Member',"`Email`= '".$_REQUEST['admin']['username']."'");
|
||||
if($adminmember) {
|
||||
$adminmember->FirstName = $_REQUEST['admin']['firstname'];
|
||||
$adminmember->Surname = $_REQUEST['admin']['surname'];
|
||||
$adminmember->write();
|
||||
}
|
||||
|
||||
|
||||
echo "<li>Checking mod_rewrite works</li>";
|
||||
|
||||
$_SESSION['username'] = $_REQUEST['admin']['username'];
|
||||
$_SESSION['password'] = $_REQUEST['admin']['password'];
|
||||
|
||||
if($this->checkModRewrite()) {
|
||||
|
||||
|
||||
if($this->errors) {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
echo "<p>Installed SilverStripe successfully. I will now try and direct you to
|
||||
<a href=\"home/successfullyinstalled?flush=1\">home/successfullyinstalled</a> to confirm that the installation was successful.</p>
|
||||
<script>setTimeout(function() { window.location.href = 'home/successfullyinstalled?flush=1'; }, 1000);</script>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
function makeFolder($folder) {
|
||||
$base = $this->getBaseDir();
|
||||
if(!file_exists($base . $folder)) {
|
||||
if(!mkdir($base . $folder, 02775)) {
|
||||
$this->error("Couldn't create a folder called $base$folder");
|
||||
} else {
|
||||
chmod($base . $folder, 02775);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function renameFolder($oldName, $newName) {
|
||||
if($oldName == $newName) return true;
|
||||
|
||||
$base = $this->getBaseDir();
|
||||
if(!rename($base . $oldName, $base . $newName)) {
|
||||
$this->error("Couldn't rename $base$oldName to $base$newName");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function copyFolder($oldName, $newName) {
|
||||
if($oldName == $newName) return true;
|
||||
|
||||
$base = $this->getBaseDir();
|
||||
if(!copyr($base . $oldName, $base . $newName)) {
|
||||
$this->error("Couldn't rename $base$oldName to $base$newName");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createFile($filename, $content) {
|
||||
$base = $this->getBaseDir();
|
||||
|
||||
if((@$fh = fopen($base . $filename, 'w')) && fwrite($fh, $content) && fclose($fh)) {
|
||||
return true;
|
||||
} else {
|
||||
$this->error("Couldn't write to file $base$filename");
|
||||
}
|
||||
}
|
||||
|
||||
function createHtaccess() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
$rewrite = <<<TEXT
|
||||
RewriteEngine On
|
||||
|
||||
|
||||
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]
|
||||
TEXT
|
||||
;
|
||||
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->createFile('.htaccess', $start . $rewrite . $end);
|
||||
}
|
||||
|
||||
function createHtaccessAlternative() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
$rewrite = <<<TEXT
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
|
||||
TEXT
|
||||
;
|
||||
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->createFile('.htaccess', $start . $rewrite . $end);
|
||||
}
|
||||
|
||||
function restoreHtaccess() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->createFile('.htaccess', $start . $end);
|
||||
}
|
||||
|
||||
function checkModRewrite() {
|
||||
if($this->performModRewriteTest() == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->createHtaccessAlternative();
|
||||
|
||||
if($this->performModRewriteTest() == false) {
|
||||
echo "<li>ERROR: mod_rewrite not working, redirecting to mod_rewrite test page</li>";
|
||||
|
||||
$this->restoreHtaccess();
|
||||
|
||||
echo "I will now try and direct you to <a href=\"rewritetest.php\">rewritetest</a> to troubleshoot mod_rewrite</p>
|
||||
<script>setTimeout(function() { window.location.href = 'rewritetest.php'; }, 1000);</script>
|
||||
";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function performModRewriteTest() {
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
// Check if mod_rewrite works properly
|
||||
$location = 'http://' . (isset($_SERVER['PHP_AUTH_USER']) ? "$_SERVER[PHP_AUTH_USER]:$_SERVER[PHP_AUTH_PW]@" : '') . $_SERVER['HTTP_HOST'] . $baseURL . '/InstallerTest/testRewrite';
|
||||
@$testrewriting = file_get_contents($location);
|
||||
|
||||
if($testrewriting == 'OK') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Workaround for 'URL file-access is disabled in the server configuration' using curl
|
||||
if(function_exists('curl_init')) {
|
||||
$ch = curl_init($location);
|
||||
$fp = @fopen(dirname(tempnam('adfadsfdas','')) . '/rewritetest', "w");
|
||||
|
||||
if($fp) {
|
||||
curl_setopt($ch, CURLOPT_FILE, $fp);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
fclose($fp);
|
||||
$testrewriting = file_get_contents(dirname(tempnam('adfadsfdas','')) . '/rewritetest');
|
||||
unlink(dirname(tempnam('adfadsfdas','')) . '/rewritetest');
|
||||
if($testrewriting == 'OK') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function var_export_array_nokeys($array) {
|
||||
$retval = "array(\n";
|
||||
foreach($array as $item) {
|
||||
$retval .= "\t'";
|
||||
$retval .= trim($item);
|
||||
$retval .= "',\n";
|
||||
}
|
||||
$retval .= ")";
|
||||
return $retval;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy a file, or recursively copy a folder and its contents
|
||||
*
|
||||
* @author Aidan Lister <aidan@php.net>
|
||||
* @version 1.0.1
|
||||
* @link http://aidanlister.com/repos/v/function.copyr.php
|
||||
* @param string $source Source path
|
||||
* @param string $dest Destination path
|
||||
* @return bool Returns TRUE on success, FALSE on failure
|
||||
*/
|
||||
function copyr($source, $dest)
|
||||
{
|
||||
// Simple copy for a file
|
||||
if (is_file($source)) {
|
||||
return copy($source, $dest);
|
||||
}
|
||||
|
||||
// Make destination directory
|
||||
if (!is_dir($dest)) {
|
||||
mkdir($dest);
|
||||
}
|
||||
|
||||
// Loop through the folder
|
||||
$dir = dir($source);
|
||||
while (false !== $entry = $dir->read()) {
|
||||
// Skip pointers
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Deep copy directories
|
||||
if ($dest !== "$source/$entry") {
|
||||
copyr("$source/$entry", "$dest/$entry");
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up
|
||||
$dir->close();
|
||||
return true;
|
||||
}
|
||||
|
||||
function rm($fileglob)
|
||||
{
|
||||
if (is_string($fileglob)) {
|
||||
if (is_file($fileglob)) {
|
||||
return unlink($fileglob);
|
||||
} else if (is_dir($fileglob)) {
|
||||
$ok = rm("$fileglob/*");
|
||||
if (! $ok) {
|
||||
return false;
|
||||
}
|
||||
return rmdir($fileglob);
|
||||
} else {
|
||||
$matching = glob($fileglob);
|
||||
if ($matching === false) {
|
||||
trigger_error(sprintf('No files match supplied glob %s', $fileglob), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
$rcs = array_map('rm', $matching);
|
||||
if (in_array(false, $rcs)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (is_array($fileglob)) {
|
||||
$rcs = array_map('rm', $fileglob);
|
||||
if (in_array(false, $rcs)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
trigger_error('Param #1 must be filename or glob pattern, or array of filenames or glob patterns', E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
20
mysite/code/Page.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
class Page extends SiteTree {
|
||||
static $db = array(
|
||||
);
|
||||
static $has_one = array(
|
||||
);
|
||||
}
|
||||
|
||||
class Page_Controller extends ContentController {
|
||||
function init() {
|
||||
parent::init();
|
||||
|
||||
Requirements::themedCSS("layout");
|
||||
Requirements::themedCSS("typography");
|
||||
Requirements::themedCSS("form");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="SS3">
|
||||
<description>Coding standard for SilverStripe 4.x</description>
|
||||
|
||||
<file>app</file>
|
||||
|
||||
<!-- Don't sniff third party libraries -->
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
<exclude-pattern>*/thirdparty/*</exclude-pattern>
|
||||
|
||||
<!-- Show progress and output sniff names on violation, and add colours -->
|
||||
<arg value="sp"/>
|
||||
<arg name="colors"/>
|
||||
|
||||
<!-- Use PSR-2 as a base standard -->
|
||||
<rule ref="PSR2">
|
||||
<!-- Allow classes to not declare a namespace -->
|
||||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
|
||||
|
||||
<!-- Allow underscores in class names -->
|
||||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
|
||||
|
||||
<!-- Allow non camel cased method names -->
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
||||
</rule>
|
||||
</ruleset>
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
PHPUnit configuration for SilverStripe
|
||||
|
||||
Requires PHPUnit 9+
|
||||
|
||||
Usage:
|
||||
- "vendor/bin/phpunit": Runs all tests in all folders
|
||||
- "vendor/bin/phpunit vendor/silverstripe/framework/tests/": Run all tests of the framework module
|
||||
- "vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem": Run all filesystem tests within framework
|
||||
- "vendor/bin/phpunit vendor/silverstripe/framework/tests/filesystem/FolderTest.php": Run a single test
|
||||
- "vendor/bin/phpunit <dash><dash>coverage-html assets/": Generate coverage report (replace
|
||||
<dash> with "-", requires xdebug or phpdbg)
|
||||
|
||||
More information:
|
||||
- http://www.phpunit.de/manual/current/en/textui.html
|
||||
- http://doc.silverstripe.org/framework/en/topics/testing/#configuration
|
||||
|
||||
It is safe to remove this file for normal website operation.
|
||||
-->
|
||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="Default">
|
||||
<directory>app/tests</directory>
|
||||
<directory>vendor/silverstripe/cms/tests/php</directory>
|
||||
<directory>vendor/silverstripe/framework/tests/php</directory>
|
||||
</testsuite>
|
||||
|
||||
<!-- Framework ORM tests are split up to run in parallel -->
|
||||
<testsuite name="framework-core">
|
||||
<directory>vendor/silverstripe/framework/tests/php</directory>
|
||||
<exclude>vendor/silverstripe/framework/tests/php/ORM</exclude>
|
||||
</testsuite>
|
||||
<testsuite name="framework-orm">
|
||||
<directory>vendor/silverstripe/framework/tests/php/ORM</directory>
|
||||
</testsuite>
|
||||
|
||||
<!-- other core components -->
|
||||
<testsuite name="core">
|
||||
<directory>vendor/silverstripe/assets/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/versioned/tests/php/</directory>
|
||||
</testsuite>
|
||||
|
||||
<!-- admin components -->
|
||||
<testsuite name="admin">
|
||||
<directory>vendor/silverstripe/admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/asset-admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/campaign-admin/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/cms/tests/</directory>
|
||||
<directory>vendor/silverstripe/config/tests/</directory>
|
||||
<directory>vendor/silverstripe/errorpage/tests/</directory>
|
||||
<directory>vendor/silverstripe/graphql/tests/</directory>
|
||||
<directory>vendor/silverstripe/login-forms/tests/php/</directory>
|
||||
<directory>vendor/silverstripe/mimevalidator/tests/</directory>
|
||||
<directory>vendor/silverstripe/reports/tests/</directory>
|
||||
<directory>vendor/silverstripe/siteconfig/tests/php/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
4
public/assets/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
/**/*
|
||||
!.gitignore
|
||||
!.htaccess
|
||||
!web.config
|
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Whitelist appropriate assets files.
|
||||
# This file is automatically generated via File.allowed_extensions configuration
|
||||
# See AssetAdapter::renderTemplate() for reference.
|
||||
#
|
||||
|
||||
# We disable PHP via several methods
|
||||
# Replace the handler with the default plaintext handler
|
||||
AddHandler default-handler php phtml php3 php4 php5 inc
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
# Turn the PHP engine off
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_env.c>
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Allow error pages
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule error[^\\/]*\.html$ - [L]
|
||||
|
||||
# Block invalid file extensions
|
||||
RewriteCond %{REQUEST_URI} !^[^.]*\.(?i:css|js|ace|arc|arj|asf|au|avi|bmp|bz2|cab|cda|csv|dmg|doc|docx|dotx|flv|gif|gpx|gz|hqx|ico|jpeg|jpg|kml|m4a|m4v|mid|midi|mkv|mov|mp3|mp4|mpa|mpeg|mpg|ogg|ogv|pages|pcx|pdf|png|pps|ppt|pptx|potx|ra|ram|rm|rtf|sit|sitx|tar|tgz|tif|tiff|txt|wav|webm|wma|wmv|xls|xlsx|xltx|zip|zipx)$
|
||||
RewriteRule .* - [F]
|
||||
|
||||
# Non-existent files passed to requesthandler
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* ../index.php [QSA]
|
||||
</IfModule>
|
@ -1,101 +0,0 @@
|
||||
<!--
|
||||
|
||||
Configuration to whitelist appropriate asset files, for IIS.
|
||||
Note that you will need to maintain this whitelist yourself if you modify File::$allowed_extensions
|
||||
|
||||
If you are not using IIS then you can ignore this file.
|
||||
If you are using Apache then you should look at assets/.htaccess instead.
|
||||
|
||||
To add an extension to to the list, you will need to add another <add> entry inside the <fileExtensions>
|
||||
tag.
|
||||
|
||||
For example, to add *.exe files to the list of downloadable assets, add this line below the
|
||||
<fileExtensions line>:
|
||||
|
||||
<add fileExtension=".exe" allowed="true" />
|
||||
|
||||
Once you do this, visitors will be able to download *.exe files that are uploaded to the assets
|
||||
directory.
|
||||
|
||||
-->
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<fileExtensions allowUnlisted="false" applyToWebDAV="true">
|
||||
<add fileExtension=".html" allowed="true" />
|
||||
<add fileExtension=".htm" allowed="true" />
|
||||
<add fileExtension=".xhtml" allowed="true" />
|
||||
<add fileExtension=".js" allowed="true" />
|
||||
<add fileExtension=".css" allowed="true" />
|
||||
<add fileExtension=".bmp" allowed="true" />
|
||||
<add fileExtension=".png" allowed="true" />
|
||||
<add fileExtension=".gif" allowed="true" />
|
||||
<add fileExtension=".jpg" allowed="true" />
|
||||
<add fileExtension=".jpeg" allowed="true" />
|
||||
<add fileExtension=".ico" allowed="true" />
|
||||
<add fileExtension=".pcx" allowed="true" />
|
||||
<add fileExtension=".tif" allowed="true" />
|
||||
<add fileExtension=".tiff" allowed="true" />
|
||||
<add fileExtension=".au" allowed="true" />
|
||||
<add fileExtension=".mid" allowed="true" />
|
||||
<add fileExtension=".midi" allowed="true" />
|
||||
<add fileExtension=".mpa" allowed="true" />
|
||||
<add fileExtension=".mp3" allowed="true" />
|
||||
<add fileExtension=".ogg" allowed="true" />
|
||||
<add fileExtension=".m4a" allowed="true" />
|
||||
<add fileExtension=".ra" allowed="true" />
|
||||
<add fileExtension=".wma" allowed="true" />
|
||||
<add fileExtension=".wav" allowed="true" />
|
||||
<add fileExtension=".cda" allowed="true" />
|
||||
<add fileExtension=".avi" allowed="true" />
|
||||
<add fileExtension=".mpg" allowed="true" />
|
||||
<add fileExtension=".mpeg" allowed="true" />
|
||||
<add fileExtension=".asf" allowed="true" />
|
||||
<add fileExtension=".wmv" allowed="true" />
|
||||
<add fileExtension=".m4v" allowed="true" />
|
||||
<add fileExtension=".mov" allowed="true" />
|
||||
<add fileExtension=".mkv" allowed="true" />
|
||||
<add fileExtension=".mp4" allowed="true" />
|
||||
<add fileExtension=".ogv" allowed="true" />
|
||||
<add fileExtension=".webm" allowed="true" />
|
||||
<add fileExtension=".swf" allowed="true" />
|
||||
<add fileExtension=".flv" allowed="true" />
|
||||
<add fileExtension=".ram" allowed="true" />
|
||||
<add fileExtension=".rm" allowed="true" />
|
||||
<add fileExtension=".doc" allowed="true" />
|
||||
<add fileExtension=".docx" allowed="true" />
|
||||
<add fileExtension=".txt" allowed="true" />
|
||||
<add fileExtension=".rtf" allowed="true" />
|
||||
<add fileExtension=".xls" allowed="true" />
|
||||
<add fileExtension=".xlsx" allowed="true" />
|
||||
<add fileExtension=".pages" allowed="true" />
|
||||
<add fileExtension=".ppt" allowed="true" />
|
||||
<add fileExtension=".pptx" allowed="true" />
|
||||
<add fileExtension=".pps" allowed="true" />
|
||||
<add fileExtension=".csv" allowed="true" />
|
||||
<add fileExtension=".cab" allowed="true" />
|
||||
<add fileExtension=".arj" allowed="true" />
|
||||
<add fileExtension=".tar" allowed="true" />
|
||||
<add fileExtension=".zip" allowed="true" />
|
||||
<add fileExtension=".zipx" allowed="true" />
|
||||
<add fileExtension=".sit" allowed="true" />
|
||||
<add fileExtension=".sitx" allowed="true" />
|
||||
<add fileExtension=".gz" allowed="true" />
|
||||
<add fileExtension=".tgz" allowed="true" />
|
||||
<add fileExtension=".bz2" allowed="true" />
|
||||
<add fileExtension=".ace" allowed="true" />
|
||||
<add fileExtension=".arc" allowed="true" />
|
||||
<add fileExtension=".pkg" allowed="true" />
|
||||
<add fileExtension=".dmg" allowed="true" />
|
||||
<add fileExtension=".hqx" allowed="true" />
|
||||
<add fileExtension=".jar" allowed="true" />
|
||||
<add fileExtension=".xml" allowed="true" />
|
||||
<add fileExtension=".pdf" allowed="true" />
|
||||
<add fileExtension=".gpx" allowed="true" />
|
||||
<add fileExtension=".kml" allowed="true" />
|
||||
</fileExtensions>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
Before Width: | Height: | Size: 1.4 KiB |
173
rewritetest.php
Normal file
@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
createHtaccess();
|
||||
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['force'])) {
|
||||
echo "Forced continue, attempting to redirect to <a href=\"home/successfullyinstalled?flush=1\">home/successfullyinstalled</a>.
|
||||
<script>setTimeout(function() { window.location.href = 'home/successfullyinstalled?flush=1'; }, 1000);</script>";
|
||||
} else {
|
||||
$modRewriteWorking = performModRewriteTest();
|
||||
|
||||
if(!$modRewriteWorking) {
|
||||
createHtaccessAlternative();
|
||||
$modRewriteWorking = performModRewriteTest();
|
||||
}
|
||||
|
||||
if($modRewriteWorking) {
|
||||
echo "mod_rewrite is working! I will now try and direct you to
|
||||
<a href=\"home/successfullyinstalled?flush=1\">home/successfullyinstalled</a> to confirm that the installation was successful.
|
||||
<script>setTimeout(function() { window.location.href = 'home/successfullyinstalled?flush=1'; }, 1000);</script>
|
||||
";
|
||||
} else {
|
||||
restoreHtaccess();
|
||||
|
||||
echo "mod_rewrite doesn't appear to be working. Make sure:" .
|
||||
"<ul>" .
|
||||
"<li>mod_rewrite is enabled in your httpd.conf</li>" .
|
||||
"<li>AllowOverride is enabled for the current path.</li>" .
|
||||
"</ul>" .
|
||||
"Please check these options, then refresh this page." .
|
||||
"If you believe that your configuration is correct, <a href=\"rewritetest.php?force=1\">click here to proceed anyway.</a>";
|
||||
}
|
||||
}
|
||||
|
||||
function performModRewriteTest() {
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
// Check if mod_rewrite works properly
|
||||
$location = 'http://' . (isset($_SERVER['PHP_AUTH_USER']) ? "$_SERVER[PHP_AUTH_USER]:$_SERVER[PHP_AUTH_PW]@" : '') . $_SERVER['HTTP_HOST'] . $baseURL . '/InstallerTest/testRewrite';
|
||||
@$testrewriting = file_get_contents($location);
|
||||
|
||||
if($testrewriting == 'OK') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Workaround for 'URL file-access is disabled in the server configuration' using curl
|
||||
if(function_exists('curl_init')) {
|
||||
$ch = curl_init($location);
|
||||
$fp = @fopen(dirname(tempnam('adfadsfdas','')) . '/rewritetest', "w");
|
||||
|
||||
if($fp) {
|
||||
curl_setopt($ch, CURLOPT_FILE, $fp);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
fclose($fp);
|
||||
$testrewriting = file_get_contents(dirname(tempnam('adfadsfdas','')) . '/rewritetest');
|
||||
unlink(dirname(tempnam('adfadsfdas','')) . '/rewritetest');
|
||||
if($testrewriting == 'OK') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function createHtaccess() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
$rewrite = <<<TEXT
|
||||
RewriteEngine On
|
||||
|
||||
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]
|
||||
TEXT
|
||||
;
|
||||
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
createFile('.htaccess', $start . $rewrite . $end);
|
||||
}
|
||||
|
||||
function createHtaccessAlternative() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
$rewrite = <<<TEXT
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
|
||||
TEXT
|
||||
;
|
||||
|
||||
$baseURL = dirname($_SERVER['SCRIPT_NAME']);
|
||||
if($baseURL == "/") {
|
||||
$baseURL = "";
|
||||
}
|
||||
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
createFile('.htaccess', $start . $rewrite . $end);
|
||||
}
|
||||
|
||||
function restoreHtaccess() {
|
||||
$start = "### SILVERSTRIPE START ###\n";
|
||||
$end= "\n### SILVERSTRIPE END ###";
|
||||
|
||||
if(file_exists('.htaccess')) {
|
||||
$htaccess = file_get_contents('.htaccess');
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') === false && strpos($htaccess, '### SILVERSTRIPE END ###') === false) {
|
||||
$htaccess .= "\n### SILVERSTRIPE START ###\n### SILVERSTRIPE END ###\n";
|
||||
}
|
||||
|
||||
if(strpos($htaccess, '### SILVERSTRIPE START ###') !== false && strpos($htaccess, '### SILVERSTRIPE END ###') !== false) {
|
||||
$start = substr($htaccess, 0, strpos($htaccess, '### SILVERSTRIPE START ###')) . "### SILVERSTRIPE START ###\n";
|
||||
$end = "\n" . substr($htaccess, strpos($htaccess, '### SILVERSTRIPE END ###'));
|
||||
}
|
||||
}
|
||||
|
||||
createFile('.htaccess', $start . $end);
|
||||
}
|
||||
|
||||
function getBaseDir() {
|
||||
return dirname($_SERVER['SCRIPT_FILENAME']) . '/';
|
||||
}
|
||||
|
||||
function createFile($filename, $content) {
|
||||
$base = getBaseDir();
|
||||
if(($fh = fopen($base . $filename, 'w')) && fwrite($fh, $content) && fclose($fh))
|
||||
return true;
|
||||
}
|
||||
?>
|
23
tutorial/code/Page.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class Page extends SiteTree {
|
||||
static $db = array(
|
||||
);
|
||||
|
||||
static $defaults = array(
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Page_Controller extends ContentController {
|
||||
function init() {
|
||||
parent::init();
|
||||
|
||||
Requirements::themedCSS("layout");
|
||||
Requirements::themedCSS("typography");
|
||||
Requirements::themedCSS("form");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
14
tutorial/css/editor.css
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* This support file is used to style the WYSIWYG editor in the CMS
|
||||
*/
|
||||
|
||||
@import "typography.css";
|
||||
|
||||
body.mceContentBody {
|
||||
min-height: 200px;
|
||||
font-size: 62.5%;
|
||||
}
|
||||
body.mceContentBody a.broken {
|
||||
background-color: #FF7B71;
|
||||
border: 1px red solid;
|
||||
}
|
64
tutorial/css/form.css
Normal file
@ -0,0 +1,64 @@
|
||||
/* GENERIC FORM STYLING */
|
||||
#Content form {
|
||||
width:378px;
|
||||
}
|
||||
#Content form fieldset {
|
||||
border:0;
|
||||
padding:12px;
|
||||
}
|
||||
#Content .message {
|
||||
color:red;
|
||||
background:#ddd;
|
||||
border:1px solid #ccc;
|
||||
padding:5px;
|
||||
margin:5px;
|
||||
}
|
||||
#Content span.message {
|
||||
width: 300px;
|
||||
}
|
||||
#Content form div {
|
||||
margin-top:10px;
|
||||
width:100%;
|
||||
}
|
||||
#Content form label {
|
||||
font-size:1.1em;
|
||||
color:#333;
|
||||
}
|
||||
#Content form label.left {
|
||||
float:left;
|
||||
width:12em;
|
||||
}
|
||||
#Content form label.FormHeading {
|
||||
font-size:1.3em;
|
||||
color:#ff7200;
|
||||
font-weight:bold;
|
||||
}
|
||||
#Content form input.text,
|
||||
#Content form textarea,
|
||||
#Content form select {
|
||||
width:200px;
|
||||
color:#000;
|
||||
background:#f8f8f8;
|
||||
border:1px solid #aaa;
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
#Content form input.numeric {
|
||||
width:20px;
|
||||
background:#f0f0f0;
|
||||
border:1px solid #aaa;
|
||||
padding:3px;
|
||||
color:#000;
|
||||
margin-right:4px;
|
||||
}
|
||||
#Content form input.year {
|
||||
width:35px;
|
||||
}
|
||||
#Content form p.Actions {
|
||||
text-align:right;
|
||||
padding:0 22px 15px 0;
|
||||
}
|
||||
#Content form p.Actions input {
|
||||
padding:2px;
|
||||
}
|
||||
|
287
tutorial/css/layout.css
Normal file
@ -0,0 +1,287 @@
|
||||
/* Global Resetting */
|
||||
html{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background:url(../images/body_bg.gif) repeat;
|
||||
}
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 62.5%;
|
||||
/* reset font-sizes to 1em == 10px */
|
||||
}
|
||||
* {
|
||||
font-size: 1em;
|
||||
/* reset font-sizes to 1em == 10px */
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family:Verdana,Helvetica,sans-serif;
|
||||
list-style:none;
|
||||
}
|
||||
a img{
|
||||
border:0;
|
||||
}
|
||||
.clear{
|
||||
clear:both;
|
||||
}
|
||||
|
||||
/* Layout CSS */
|
||||
#Main {
|
||||
margin:20px auto;
|
||||
width:900px;
|
||||
}
|
||||
#Header {
|
||||
background:url(../images/blueback.gif) bottom left repeat-x;
|
||||
border-left:1px solid #ccc;
|
||||
border-right:1px solid #ccc;
|
||||
clear:left;
|
||||
}
|
||||
#Header h1 {
|
||||
color:#fff;
|
||||
font-size:1.5em;
|
||||
line-height:4.5em;
|
||||
padding-left:20px;
|
||||
}
|
||||
#Menu1 {
|
||||
padding:10px 50px 0;
|
||||
}
|
||||
#Menu1 li {
|
||||
float:left;
|
||||
margin-left:2px;
|
||||
background:url(../images/menu1_right.gif) no-repeat right top;
|
||||
}
|
||||
#Menu1 li.current,
|
||||
#Menu1 li.section {
|
||||
background:url(../images/menu1_right_on.gif) no-repeat right top;
|
||||
}
|
||||
#Menu1 li a {
|
||||
display:block;
|
||||
color:#fff;
|
||||
font-weight:bold;
|
||||
font-size:1.1em;
|
||||
text-decoration:none;
|
||||
padding:5px 15px;
|
||||
background:url(../images/menu1_left.gif) no-repeat left top;
|
||||
}
|
||||
#Menu1 li a:hover {
|
||||
color:#d2ebff;
|
||||
}
|
||||
#Menu1 li.current a,
|
||||
#Menu1 li.section a {
|
||||
background:url(../images/menu1_left_on.gif) no-repeat left top;
|
||||
color:#d2ebff;
|
||||
}
|
||||
|
||||
#ContentContainer {
|
||||
background:#f5f5f5 url(../images/ss_watermark.gif) bottom left no-repeat;
|
||||
padding-top:20px;
|
||||
padding-bottom:20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#Banner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#Menu2 {
|
||||
margin-left: 20px;
|
||||
width: 17em;
|
||||
float:left;
|
||||
background:#f0f0f0;
|
||||
border:1px solid #ddd;
|
||||
padding:10px 10px 10px 10px;
|
||||
}
|
||||
#Menu2 li {
|
||||
padding-left:15px;
|
||||
background:url(../images/menu2_arrow.gif) no-repeat left center;
|
||||
}
|
||||
#Menu2 a {
|
||||
color:#333;
|
||||
font-weight:bold;
|
||||
font-size:1.1em;
|
||||
line-height:1.6em;
|
||||
text-decoration:none;
|
||||
}
|
||||
#Menu2 a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
#Menu2 li.current a,
|
||||
#Menu2 li.section a {
|
||||
color:#0083C8;
|
||||
}
|
||||
|
||||
#Content {
|
||||
float: left;
|
||||
margin: 0px 20px;
|
||||
width:70%;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
margin-bottom:10px;
|
||||
font-size:1em;
|
||||
color:#666;
|
||||
}
|
||||
div.breadcrumbs a {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#Footer {
|
||||
background:#015581;
|
||||
clear:both;
|
||||
text-align:right;
|
||||
padding-right:20px;
|
||||
border:1px solid #ccc;
|
||||
border-top:0;
|
||||
}
|
||||
#Footer span {
|
||||
color:#ccc;
|
||||
font-size:1.1em;
|
||||
line-height:2em;
|
||||
font-weight:bold;
|
||||
padding-left:20px;
|
||||
background:url(../images/ss_logo.gif) no-repeat;
|
||||
}
|
||||
#Footer a {
|
||||
color:#fff;
|
||||
}
|
||||
#Footer a:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
/* The rest of this file is for the second tutorial */
|
||||
#NewsList,
|
||||
#StaffList {
|
||||
background:#f0f0f0;
|
||||
border:1px dotted #ccc;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
#NewsList li,
|
||||
#StaffList li {
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
#NewsList li.newsDateTitle span {
|
||||
color:#666;
|
||||
line-height:2em;
|
||||
}
|
||||
#NewsList li.newsDateTitle a {
|
||||
font-size:1.3em;
|
||||
font-weight:bold;
|
||||
color:#0083C8;
|
||||
text-decoration:none;
|
||||
padding-left:20px;
|
||||
background:url(../images/treeicons/news-file.gif) no-repeat left center;
|
||||
}
|
||||
#NewsList li.newsDateTitle a:hover {
|
||||
border-bottom:1px dotted #0083C8;
|
||||
}
|
||||
|
||||
#NewsList li.newsSummary {
|
||||
margin-bottom:20px;
|
||||
}
|
||||
#NewsList li.newsSummary span {
|
||||
font-size:1.1em;
|
||||
line-height:1.5em;
|
||||
color:#333;
|
||||
}
|
||||
#NewsList li.newsSummary a.readMoreLink {
|
||||
color:#0083C8;
|
||||
text-decoration:none;
|
||||
}
|
||||
#NewsList li.newsSummary a.readMoreLink:hover {
|
||||
border-bottom:1px dotted #0083C8;
|
||||
}
|
||||
|
||||
div.newsDetails {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
div.newsDetails p {
|
||||
color:#666;
|
||||
margin:0;
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
div.pageComments {
|
||||
background:#f0f0f0;
|
||||
border:1px dotted #ccc;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
#StaffList .staffname {
|
||||
clear: both;
|
||||
padding-left: 60px;
|
||||
height: 1.2em;
|
||||
}
|
||||
|
||||
#StaffList .staffphoto {
|
||||
float: left;
|
||||
margin-left: 3px;
|
||||
margin-top: -1.2em;
|
||||
}
|
||||
#StaffList .staffphoto img {
|
||||
border:1px solid #AAA;
|
||||
}
|
||||
|
||||
#StaffList .staffdescription {
|
||||
margin-left: 60px;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
|
||||
#StaffPhoto {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#StaffPhoto img {
|
||||
border:1px solid #AAA;
|
||||
}
|
||||
|
||||
#PageComments {
|
||||
list-style:none;
|
||||
background:#e9e9e9;
|
||||
border:1px solid #ccc;
|
||||
border-bottom:0;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
#PageComments li {
|
||||
list-style:none;
|
||||
padding:5px;
|
||||
margin:0;
|
||||
font-size:1em;
|
||||
border-bottom:1px dotted #bbb;
|
||||
}
|
||||
#PageComments li p span {
|
||||
font-style:italic;
|
||||
}
|
||||
#PageComments a.deletelink {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
|
||||
#PageNumbers {
|
||||
font-weight:bold;
|
||||
color:#333;
|
||||
font-size:1.1em;
|
||||
text-align:center;
|
||||
padding:5px;
|
||||
border:1px solid #ddd;
|
||||
background:#e9e9e9;
|
||||
}
|
||||
#PageNumbers * {
|
||||
padding:0 5px;
|
||||
line-height:1.5em;
|
||||
}
|
||||
#PageNumbers a {
|
||||
color:#0083C8;
|
||||
text-decoration:none;
|
||||
}
|
||||
#PageNumbers a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
|
||||
|
113
tutorial/css/typography.css
Normal file
@ -0,0 +1,113 @@
|
||||
/**
|
||||
* This typography file is included in the WYSIWYG editor
|
||||
*/
|
||||
.typography * {
|
||||
font-family:Verdana,Arial,sans-serif;
|
||||
font-size:1em;
|
||||
}
|
||||
.typography blockquote {
|
||||
margin-left:20px;
|
||||
}
|
||||
.typography hr {
|
||||
padding:5px;
|
||||
}
|
||||
.typography p,
|
||||
.typography ul li,
|
||||
.typography ol li,
|
||||
.typography a {
|
||||
color:#333;
|
||||
line-height:1.5em;
|
||||
font-size:1.1em;
|
||||
}
|
||||
.typography p {
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
|
||||
/** CMS LIST STYLES **/
|
||||
.typography ul,
|
||||
.typography ol {
|
||||
margin-left:10px;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
.typography ul li,
|
||||
.typography ol li {
|
||||
margin:4px 10px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
.typography ul li {
|
||||
list-style-type:disc;
|
||||
}
|
||||
.typography ol li {
|
||||
list-style-type:decimal;
|
||||
}
|
||||
|
||||
/* HEADER STYLES */
|
||||
|
||||
.typography h1,
|
||||
.typography h2,
|
||||
.typography h3,
|
||||
.typography h4 {
|
||||
margin-bottom:14px;
|
||||
color:#0083C8;
|
||||
}
|
||||
.typography h1,
|
||||
.typography h4 {
|
||||
font-weight:bold;
|
||||
}
|
||||
.typography h2,
|
||||
.typography h3 {
|
||||
font-weight:normal;
|
||||
}
|
||||
.typography h1 {
|
||||
font-size:2.2em;
|
||||
}
|
||||
.typography h2 {
|
||||
font-size:2.2em;
|
||||
}
|
||||
.typography h3 {
|
||||
font-size:1.6em;
|
||||
}
|
||||
.typography h4 {
|
||||
font-size:1.4em;
|
||||
}
|
||||
|
||||
/* LINK STYLES */
|
||||
.typography a {
|
||||
color:#0083C8;
|
||||
font-size:1em;
|
||||
text-decoration:none;
|
||||
}
|
||||
.typography a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
|
||||
.typography table {
|
||||
font-size:1.1em;
|
||||
}
|
||||
.typography table tr td {
|
||||
padding:3px 5px;
|
||||
}
|
||||
|
||||
|
||||
/* WYSIWYG EDITOR ALIGNMENT CLASSES */
|
||||
.typography .left {
|
||||
text-align:left;
|
||||
}
|
||||
.typography .center {
|
||||
text-align:center;
|
||||
}
|
||||
.typography .right {
|
||||
text-align:right;
|
||||
}
|
||||
.typography img.right {
|
||||
float:right;
|
||||
}
|
||||
.typography img.left {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.typography p.MsoNormal, .typography p.MsoBodyText {
|
||||
margin: 0;
|
||||
}
|
BIN
tutorial/images/blueback.gif
Normal file
After Width: | Height: | Size: 285 B |
BIN
tutorial/images/body_bg.gif
Normal file
After Width: | Height: | Size: 51 B |
BIN
tutorial/images/menu1_left.gif
Normal file
After Width: | Height: | Size: 312 B |
BIN
tutorial/images/menu1_left_on.gif
Normal file
After Width: | Height: | Size: 446 B |
BIN
tutorial/images/menu1_right.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
tutorial/images/menu1_right_on.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
tutorial/images/menu2_arrow.gif
Normal file
After Width: | Height: | Size: 117 B |
BIN
tutorial/images/ss_logo.gif
Normal file
After Width: | Height: | Size: 556 B |
BIN
tutorial/images/ss_watermark.gif
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
tutorial/images/treeicons/home-file.gif
Normal file
After Width: | Height: | Size: 173 B |
BIN
tutorial/images/treeicons/news-file.gif
Normal file
After Width: | Height: | Size: 176 B |
BIN
tutorial/images/welcome.png
Normal file
After Width: | Height: | Size: 19 KiB |
26
tutorial/templates/Page.ss
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
||||
<head>
|
||||
<% base_tag %>
|
||||
<link rel="stylesheet" type="text/css" href="tutorial/css/layout.css" />
|
||||
<link rel="stylesheet" type="text/css" href="tutorial/css/typography.css" />
|
||||
<link rel="stylesheet" type="text/css" href="tutorial/css/form.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="Main">
|
||||
<div id="Header">
|
||||
<h1> </h1>
|
||||
</div>
|
||||
<div id="ContentContainer">
|
||||
<div id="Content" class="typography">
|
||||
$Content
|
||||
</div>
|
||||
</div>
|
||||
<div id="Footer">
|
||||
<span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a> to download the CMS</span>
|
||||
</div>
|
||||
</div>
|
||||
$SilverStripeNavigator
|
||||
</body>
|
||||
</html>
|
23
web.config
@ -1,23 +0,0 @@
|
||||
<!-- Routing configuration for Microsoft IIS web server -->
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="SilverStripe Global URLs">
|
||||
<match url="^(.*)$" />
|
||||
<conditions>
|
||||
<add input="{R:1}" matchType="Pattern" pattern="public(/|$)" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="public/{R:1}" appendQueryString="true" />
|
||||
</rule>
|
||||
<rule name="SilverStripe Preprocessed URLs" stopProcessing="true">
|
||||
<match url="^(.*)$" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="public/index.php" appendQueryString="true" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|