Compare commits

..

48 Commits
4 ... 2.3.6

Author SHA1 Message Date
sharvey
bbde99d69e MINOR Fixed comma where it should've been a dot
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@83449 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
ischommer
e3c2e2391a MINOR Merged from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@81849 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sharvey
8ab9a67c16 BUGFIX #4356 Removed string checking of PHP version and replaced with version_compare() in SS installer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@81646 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
ischommer
64607059e2 MINOR Reverted accidental commit from r79279
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@79330 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
ischommer
9488dd219c MINOR Reverted accidental commit in r79279
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@79329 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
ischommer
64bcb94c34 MINOR Merged from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@79279 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
9db2aa6377 BUGFIX #4171 hamish: Fixed assets/.htaccess for CGI environments.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@79222 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
ischommer
57f70b4d46 MINOR Merged from trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@78435 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
59cd361155 MINOR: Fixed buildbot makefile
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@76039 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
3222cf752a Disable PHP in the assets directory, regardless of virtual-host config
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@74816 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
eb7ef3c72c Added additional switch for a slight variation of the URL parsing code.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@73224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
752f272e53 BUGFIX: Fixed rewriteless operation in IIS 5.1
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@73166 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
c40f843145 BUGFIX: Fixed mod_rewrite-less operation in the root folder of a windows box
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72995 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
aoneil
92d82236e2 MINOR: Use password field for password, dont require call by reference
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72928 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:18 +13:00
sminnee
6f889ef939 BUGFIX: Get index.php filename rewriting working for windows
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
sminnee
63a16ecabe ENHANCEMENT: Added index.php that will keep SilverStripe functioning even if the .htaccess doesn't work (svn diff)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
sminnee
326f22be24 BUGFIX: Allow SilverStripe to work when asp_tags is on
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@72337 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
aoneil
5136747d89 MINOR: Changed change log to point to online change log.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
sharvey
a1ed605a0a Reverted changes in r71749
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71798 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
phalkunz
fc9f5e17fe revert wrong commit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
phalkunz
b148ddf16e MINOR: refactored - move mollom method to MollomServer so that later we can add server error/exception handling without touching MollomField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71749 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
245901686b MINOR Reverted accidental comit in r71145
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
8ee54ccb4b MINOR Reverted accidental commits in r71146, r71147, r71148, r71149, r71150, r71151 - thought I was committing to another repository...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
10dca7fa20 ...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71151 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
bdb638e58e database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
23afaa2309 fixed label display for optionsetfields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71149 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
0d683854da added mysite theme
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71148 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
c65de0c85a removed tutorial files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:17 +13:00
ischommer
0f17a9a6d5 ...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@71146 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
phalkunz
8367c56071 MERGE changeset 69919 from trunk into 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@69929 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
80e2ff20b8 Removed DirectorySlash update from installer's default htaccess as it breaks some installation targets
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@67085 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
492be9705f MINOR: Removed no-longer-used createHtAccessAlternative()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
c59f674f36 ENHANCEMENT #3123: Use ajax for mod_rewrite testing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66906 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
8887b48699 BUGFIX: Improved installer operation with PHP4 installed or no PHP installed.
API CHANGE: Reduced number of files needed for installer to work, and moved some into sapphire directory.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
0cea0274d3 ENHANCEMENT #3126: Put site into dev mode for installation so you can see error messages.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
38daa8be70 MINOR: Converted dos 2 unix
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66887 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
0934c8a724 ENHANCEMENT: Installer checks that Query and HTTPResponse classes don't exist before installing.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
4a636eb98b Updated default htaccess to avoid 500 error if mod_rewrite isn't installed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66884 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
2bc705b9ef Improved help text that the installer provides when file permissions aren't met.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
292343da48 Improved file can-write checking on Windows (IIS, in particular)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66314 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
8aa321743b Remove install.php call from test runner; it's not necessary anymore
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66297 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
e0f653e2e7 BUGFIX: Fixed buildbot makefile for new installer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@66295 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
1b1e5870f2 Better checking of whether you're about to overwrite a previous installation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:16 +13:00
sminnee
a31f388373 Modified the installer so that default .htaccess and mysite/_config.php files exist out of the box
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65980 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:15 +13:00
sminnee
737b02dde7 Reverted r65957
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65958 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:15 +13:00
sminnee
1773598cee MINOR: accidental commit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:15 +13:00
sminnee
563e9da2de BUGFIX #3060: Better support for running the installer on an existing site with modules removed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65837 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:15 +13:00
sminnee
fcbddca74e API CHANGE: Don't let people visit .ss templates directly via the browser (except from localhost)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@65835 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 18:57:15 +13:00
57 changed files with 1976 additions and 692 deletions

View File

@ -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"
]
}

View File

@ -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 }}

View File

@ -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

View File

@ -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
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
View File

@ -1,8 +0,0 @@
/silverstripe-cache/
/.env
/vendor/
/themes/simple/
/_resources/
/public/_resources/
/.graphql-generated/
/public/_graphql/

View File

@ -1,2 +1,17 @@
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

View File

@ -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.

View File

@ -1,4 +1,4 @@
Copyright (c) 2007-2017, SilverStripe Limited - www.silverstripe.com
Copyright (c) 2007-2008, 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:

1
ChangeLog Normal file
View File

@ -0,0 +1 @@
For a full change log, please visit http://open.silverstripe.org/wiki/ChangeLog.

22
INSTALL Normal file
View 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/

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
#
# This makefile is a secondary way of installing SilverStripe.
# It is used for things like continuous integration
#
# Most users should simply visit the site root in your web browser.
#
test:
php ./sapphire/cli-script.php dev/build flush=1
$(MAKE) -C sapphire test

View File

@ -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
View 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 wont 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

View File

@ -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

View File

@ -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

View File

@ -1,8 +0,0 @@
---
Name: mytheme
---
SilverStripe\View\SSViewer:
themes:
- '$public'
- 'simple'
- '$default'

2
assets/.htaccess Normal file
View File

@ -0,0 +1,2 @@
RemoveHandler .php .phtml .php3 .php4 .php5 .inc
RemoveType .php .phtml .php3 .php4 .php5 .inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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

View File

@ -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>

View File

@ -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"
}

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

71
index.php Normal file
View File

@ -0,0 +1,71 @@
<?php
/************************************************************************************
************************************************************************************
** **
** If you can read this text in your browser then you don't have PHP installed. **
** Please install PHP 5.0 or higher, preferably PHP 5.2. **
** **
************************************************************************************
************************************************************************************/
/**
* This script bolts on top of SilverStripe/Sapphire to allow access without the use of .htaccess
* rewriting rules.
*/
// This is the URL of the script that everything must be viewed with.
define('BASE_SCRIPT_URL','index.php/');
$ruLen = strlen($_SERVER['REQUEST_URI']);
$snLen = strlen($_SERVER['SCRIPT_NAME']);
$isIIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false);
// IIS will populate server variables using one of these two ways
if($isIIS) {
if($_SERVER['REQUEST_URI'] == $_SERVER['SCRIPT_NAME']) {
$url = "";
} else if($ruLen > $snLen && substr($_SERVER['REQUEST_URI'],0,$snLen+1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
$url = substr($_SERVER['REQUEST_URI'],$snLen+1);
$url = strtok($url, '?');
} else {
$url = $_SERVER['REQUEST_URI'];
if($url[0] == '/') $url = substr($url,1);
$url = strtok($url, '?');
}
// Apache will populate the server variables this way
} else {
if($ruLen > $snLen && substr($_SERVER['REQUEST_URI'],0,$snLen+1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
$url = substr($_SERVER['REQUEST_URI'],$snLen+1);
$url = strtok($url, '?');
} else {
$url = "";
}
}
$_GET['url'] = $_REQUEST['url'] = $url;
$fileName = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $url;
/**
* This code is a very simple wrapper for sending files
* Very quickly pass through references to files
*/
if($url && file_exists($fileName)) {
$fileURL = dirname($_SERVER['SCRIPT_NAME']) . '/' . $url;
header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
header("Location: $fileURL");
die();
}
// For linux
$_SERVER['SCRIPT_FILENAME'] = str_replace('/index.php','/sapphire/main.php', $_SERVER['SCRIPT_FILENAME']);
$_SERVER['SCRIPT_NAME'] = str_replace('/index.php','/sapphire/main.php', $_SERVER['SCRIPT_NAME']);
// And for windows
$_SERVER['SCRIPT_FILENAME'] = str_replace('\\index.php','\\sapphire\\main.php', $_SERVER['SCRIPT_FILENAME']);
$_SERVER['SCRIPT_NAME'] = str_replace('\\index.php','\\sapphire\\main.php', $_SERVER['SCRIPT_NAME']);
chdir('sapphire');
require_once('sapphire/main.php');

1071
install.php Normal file
View File

@ -0,0 +1,1071 @@
<?php
/************************************************************************************
************************************************************************************
** **
** If you can read this text in your browser then you don't have PHP installed. **
** Please install PHP 5.0 or higher, preferably PHP 5.2. **
** **
************************************************************************************
************************************************************************************/
/**
* SilverStripe CMS Installer
* This installer doesn't use any of the fancy Sapphire stuff in case it's unsupported.
* It's also PHP4 syntax compatable
*/
ini_set('max_execution_time', 0);
error_reporting(E_ALL ^ E_NOTICE);
session_start();
$majorVersion = strtok(phpversion(),'.');
if($majorVersion < 5) {
header("HTTP/1.1 500 Server Error");
echo str_replace('$PHPVersion', phpversion(), file_get_contents("sapphire/dev/install/php5-required.html"));
die();
}
// Include environment files
$usingEnv = false;
$envFiles = array('_ss_environment.php', '../_ss_environment.php', '../../_ss_environment.php');
foreach($envFiles as $envFile) {
if(@file_exists($envFile)) {
include_once($envFile);
$usingEnv = true;
break;
}
}
// Load database config
if(isset($_REQUEST['mysql'])) {
$databaseConfig = $_REQUEST['mysql'];
} else {
$_REQUEST['mysql'] = $databaseConfig = array(
"type" => "MySQLDatabase",
"server" => defined('SS_DATABASE_SERVER') ? SS_DATABASE_SERVER : "localhost",
"username" => defined('SS_DATABASE_USERNAME') ? SS_DATABASE_USERNAME : "root",
"password" => defined('SS_DATABASE_PASSWORD') ? SS_DATABASE_PASSWORD : "",
"database" => isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : "SS_mysite",
);
}
if(isset($_REQUEST['admin'])) {
$adminConfig = $_REQUEST['admin'];
} else {
$_REQUEST['admin'] = $adminConfig = array(
'username' => 'admin',
'password' => '',
'firstname' => '',
'surname' => ''
);
}
$alreadyInstalled = false;
if(file_exists('mysite/_config.php')) {
// Find the $database variable in the relevant config file without having to execute the config file
if(preg_match("/\\\$database\s*=\s*[^\n\r]+[\n\r]/", file_get_contents("mysite/_config.php"), $parts)) {
eval($parts[0]);
if($database) $alreadyInstalled = true;
// Assume that if $databaseConfig is defined in mysite/_config.php, then a non-environment-based installation has
// already gone ahead
} else if(preg_match("/\\\$databaseConfig\s*=\s*[^\n\r]+[\n\r]/", file_get_contents("mysite/_config.php"), $parts)) {
$alreadyInstalled = true;
}
}
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
$installFromCli = (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'install');
// CLI-install error message. exit(1) will halt any makefile.
if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) {
echo "Cannot install due to errors:\n";
$req->listErrors();
$dbReq->listErrors();
exit(1);
}
if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) {
// Confirm before reinstalling
if(!isset($_REQUEST['force_reinstall']) && !$installFromCli && $alreadyInstalled) {
include('sapphire/dev/install/config-form.html');
} else {
$inst = new Installer();
if($_REQUEST) $inst->install($_REQUEST);
else $inst->install(array(
'database' => $databaseConfig['type'],
'mysql' => $databaseConfig,
'admin' => $adminConfig,
));
}
// Show the config form
} else {
include('sapphire/dev/install/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('sapphire/dev/install/config-form.html', array("File permissions",
"Does the webserver know where files are stored?",
"The webserver isn't letting me identify where files are stored.",
$this->getBaseDir()
));
$this->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/_config.php', array("File permissions", "Is the mysite/_config.php file 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 web server, unless we're calling the installer from the command-line
if(!isset($_SERVER['argv']) || !$_SERVER['argv']) {
$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."));
}
$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", "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(32*1024*1024, 64*1024*1024, array("PHP Configuration", "Memory allocated (PHP config option 'memory_limit')", "SilverStripe needs a minimum of 32M allocated to PHP, but recommends 64M.", ini_get("memory_limit")));
// Check that troublesome classes don't exist
$badClasses = array('Query', 'HTTPResponse');
$this->requireNoClasses($badClasses, array("PHP Configuration", "Check that certain classes haven't been defined by PHP plugins", "Your version of PHP has defined some classes that conflict with SilverStripe's"));
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 < (64 * 1024 * 1024)) {
ini_set('memory_limit', '64M');
$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>\n\n";
foreach($this->errors as $error) {
echo "<li>" . htmlentities(implode(", ", $error)) . "</li>\n";
}
}
}
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 {
if(isset($_SERVER['HTTP_HOST'])) {
?>
<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
} else {
echo "\nSilverStripe successfully installed\n";
}
}
}
function requireFunction($funcName, $testDetails) {
$this->testing($testDetails);
if(!function_exists($funcName)) $this->error($testDetails);
else return true;
}
/**
* Require that the given class doesn't exist
*/
function requireNoClasses($classNames, $testDetails) {
$this->testing($testDetails);
$badClasses = array();
foreach($classNames as $className) {
if(class_exists($className)) $badClasses[] = $className;
}
if($badClasses) {
$testDetails[2] .= ". The following classes are at fault: " . implode(', ', $badClasses);
$this->error($testDetails);
}
else return true;
}
function requirePHPVersion($recommendedVersion, $requiredVersion, $testDetails) {
$this->testing($testDetails);
$installedVersion = phpversion();
if(version_compare($installedVersion, $requiredVersion, '<')) {
$testDetails[2] = "SilverStripe requires PHP version $requiredVersion or later.\n
PHP version $installedVersion is currently installed.\n
While SilverStripe requires at least PHP version $requiredVersion, upgrading to $recommendedVersion or later is recommended.\n
If you are installing SilverStripe on a shared web server, please ask your web hosting provider to upgrade PHP for you.";
$this->error($testDetails);
return;
}
if(version_compare($installedVersion, $recommendedVersion, '<')) {
$testDetails[2] = "PHP version $installedVersion is currently installed.\n
Upgrading to at least PHP version $recommendedVersion is recommended.\n
SilverStripe should run, but you may run into issues. Future releases may require a later version of PHP.\n";
$this->warning($testDetails);
return;
}
return true;
}
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() . str_replace("/", DIRECTORY_SEPARATOR,$filename);
if(!is_writeable($filename)) {
if(function_exists('posix_getgroups')) {
$userID = posix_geteuid();
$user = posix_getpwuid($userID);
$currentOwnerID = fileowner($filename);
$currentOwner = posix_getpwuid($currentOwnerID);
$testDetails[2] .= "User '$user[name]' needs to be able to write to this file:\n$filename\n\nThe file is currently owned by '$currentOwner[name]'. ";
if($user['name'] == $currentOwner['name']) {
$testDetails[2] .= "We recommend that you make the file writeable.";
} else {
$groups = posix_getgroups();
foreach($groups as $group) {
$groupInfo = posix_getgrgid($group);
if(in_array($currentOwner['name'], $groupInfo['members'])) $groupList[] = $groupInfo['name'];
}
if($groupList) {
$testDetails[2] .= " We recommend that you make the file group-writeable and change the group to one of these groups:\n - ". implode("\n - ", $groupList)
. "\n\nFor example:\nchmod g+w $filename\nchgrp " . $groupList[0] . " $filename";
} else {
$testDetails[2] .= " There is no user-group that contains both the web-server user and the owner of this file. Change the ownership of the file, create a new group, or temporarily make the file writeable by everyone during the install process.";
}
}
} else {
$testDetails[2] .= "The webserver user needs to be able to write to this file:\n$filename";
}
$this->error($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);
$result = mysql_query('SELECT VERSION()');
$row=mysql_fetch_row($result);
$version = ereg_replace("([A-Za-z-])", "", $row[0]);
list($majorHas, $minorHas) = explode('.', substr(trim($version), 0, 3));
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;
}
// Must be PHP4 compatible
var $baseDir;
function getBaseDir() {
// Cache the value so that when the installer mucks with SCRIPT_FILENAME half way through, this method
// still returns the correct value.
if(!$this->baseDir) $this->baseDir = realpath(dirname($_SERVER['SCRIPT_FILENAME'])) . DIRECTORY_SEPARATOR;
return $this->baseDir;
}
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 __construct() {
// Cache the baseDir value
$this->getBaseDir();
}
function install($config) {
if(isset($_SERVER['HTTP_HOST'])) {
?>
<html>
<head>
<title>PHP 5 is required</title>
<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="sapphire/dev/install/install.css" />
<script src="jsparty/jquery/jquery.js"></script>
</head>
<body>
<div id="BgContainer">
<div id="Container">
<div id="Header">
<h1>SilverStripe CMS Installation</h1>
</div>
<div id="Navigation">&nbsp;</div>
<div class="clear"><!-- --></div>
<div id="Layout">
<div class="typography">
<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</p>
<ul>
<?php
} else {
echo "SILVERSTRIPE COMMAND-LINE INSTALLATION\n\n";
}
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);
}
if(file_exists('mysite/_config.php')) {
unlink('mysite/_config.php');
}
$theme = isset($_POST['template']) ? $_POST['template'] : 'blackcandy';
// Write the config file
global $usingEnv;
if($usingEnv) {
$this->statusMessage("Creating 'mysite/_config.php' for use with _ss_environment.php...");
$this->createFile("mysite/_config.php", <<<PHP
<?php
global \$project;
\$project = 'mysite';
global \$database;
\$database = "{$config['mysql']['database']}";
require_once("conf/ConfigureFromEnv.php");
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/themes/
SSViewer::set_theme('$theme');
?>
PHP
);
} else {
$this->statusMessage("Creating 'mysite/_config.php'...");
$devServers = $this->var_export_array_nokeys(explode("\n", $_POST['devsites']));
$escapedPassword = addslashes($config['mysql']['password']);
$this->createFile("mysite/_config.php", <<<PHP
<?php
global \$project;
\$project = 'mysite';
global \$databaseConfig;
\$databaseConfig = array(
"type" => "$config[database]",
"server" => "{$config['mysql']['server']}",
"username" => "{$config['mysql']['username']}",
"password" => "{$escapedPassword}",
"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);
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/themes/
SSViewer::set_theme('$theme');
?>
PHP
);
}
$this->statusMessage("Creating '.htaccess' file...");
$this->createHtaccess();
// Load the sapphire runtime
$_SERVER['SCRIPT_FILENAME'] = dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/sapphire/main.php';
chdir('sapphire');
// Rebuild the manifest
$_GET['flush'] = true;
// Show errors as if you're in development mode
$_SESSION['isDev'] = 1;
require_once('core/Core.php');
$this->statusMessage("Building database schema...");
// Build database
$con = new Controller();
$con->pushCurrent();
global $databaseConfig;
DB::connect($databaseConfig);
$dbAdmin = new DatabaseAdmin();
$dbAdmin->init();
$_REQUEST['username'] = $config['admin']['username'];
$_REQUEST['password'] = $config['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();
}
// Syncing filesystem (so /assets/Uploads is available instantly, see ticket #2266)
FileSystem::sync();
$_SESSION['username'] = $config['admin']['username'];
$_SESSION['password'] = $config['admin']['password'];
if(!$this->errors) {
if(isset($_SERVER['HTTP_HOST'])) {
$this->statusMessage("Checking that friendly URLs work...");
$this->checkModRewrite();
} else {
echo "\n\nSilverStripe successfully installed\n";
}
}
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();
$this->statusMessage("Creating $base$filename");
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 ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
if(defined('DIRECTORY_SEPARATOR')) $base = str_replace(DIRECTORY_SEPARATOR, '/', $base);
else $base = str_replace("\\", '/', $base);
if($base != '.') $baseClause = "RewriteBase $base\n";
else $baseClause = "";
$rewrite = <<<TEXT
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
$baseClause
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
TEXT
;
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(!isset($_SERVER['HTTP_HOST']) || !$_SERVER['HTTP_HOST']) {
$this->statusMessage("Installer seems to be called from command-line, we're going to assume that rewriting is working.");
return true;
}
echo <<<HTML
<li id="ModRewriteResult">Testing...</li>
<script>
if(typeof $ == 'undefined') {
document.getElemenyById('ModeRewriteResult').innerHTML = "I can't run jQuery ajax to set rewriting; I will redirect you to the homepage to see if everything is working.";
setTimeout(function() {
window.location = "home/successfullyinstalled?flush=1";
}, 10000);
} else {
$.ajax({
method: 'get',
url: 'InstallerTest/testrewrite',
complete: function(response) {
if(response.responseText == 'OK') {
$('#ModRewriteResult').html("Friendly URLs set up successfully; I am now redirecting you to your SilverStripe site...")
setTimeout(function() {
window.location = "home/successfullyinstalled?flush=1";
}, 2000);
} else {
$('#ModRewriteResult').html("Friendly URLs are not working. This is most likely because mod_rewrite isn't configured"
+ "correctly on your site. Please check the following things in your Apache configuration; "
+ " you may need to get your web host or server administrator to do this for you:"
+ "<ul><li>mod_rewrite is enabled</li><li>AllowOverride All is set for your directory</li></ul>");
}
}
});
}
</script>
<noscript>
<li><a href="home/successfullyinstalled?flush=1">Click here to check friendly URLs are working. If you get a 404 then something is wrong.</li>
</noscript>
HTML;
}
function var_export_array_nokeys($array) {
$retval = "array(\n";
foreach($array as $item) {
$retval .= "\t'";
$retval .= trim($item);
$retval .= "',\n";
}
$retval .= ")";
return $retval;
}
/**
* Show an installation status message.
* The output differs depending on whether this is CLI or web based
*/
function statusMessage($msg) {
if(isset($_SERVER['HTTP_HOST'])) echo "<li>$msg</li>\n";
else echo "$msg\n";
flush();
}
}
/**
* 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;
}
?>

15
mysite/_config.php Normal file
View File

@ -0,0 +1,15 @@
<?php
global $project;
$project = 'mysite';
global $database;
$database = "";
require_once("conf/ConfigureFromEnv.php");
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/themes/
SSViewer::set_theme('blackcandy');
?>

56
mysite/code/Page.php Executable file
View File

@ -0,0 +1,56 @@
<?php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
}
class Page_Controller extends ContentController {
public function init() {
parent::init();
// Note: you should use SS template require tags inside your templates
// instead of putting Requirements calls here. However these are
// included so that our older themes still work
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
/**
* Site search form
*/
function SearchForm() {
$searchText = isset($_REQUEST['Search']) ? $_REQUEST['Search'] : 'Search';
$fields = new FieldSet(
new TextField("Search", "", $searchText)
);
$actions = new FieldSet(
new FormAction('results', 'Search')
);
return new SearchForm($this, "SearchForm", $fields, $actions);
}
/**
* Process and render search results
*/
function results($data, $form){
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);
return $this->customise($data)->renderWith(array('Page_results', 'Page'));
}
}
?>

View File

@ -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>

View File

@ -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>

View File

@ -1,4 +0,0 @@
/**/*
!.gitignore
!.htaccess
!web.config

View File

@ -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>

View File

@ -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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

170
rewritetest.php Normal file
View File

@ -0,0 +1,170 @@
<?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 ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
TEXT
;
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 ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
$rewrite = <<<TEXT
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* $_SERVER[DOCUMENT_ROOT]/sapphire/main.php?url=%1&%{QUERY_STRING} [L]
TEXT
;
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;
}
?>

View 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;
}

View 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;
}

View 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;
}

View 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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,27 @@
<?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>&nbsp;</h1>
</div>
<div id="ContentContainer">
<div id="Content" class="typography">
$Content
$Form
</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>

View File

@ -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>