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
13 changed files with 321 additions and 1395 deletions

View File

@ -0,0 +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
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 ###

890
ChangeLog
View File

@ -1,889 +1 @@
SilverStripe ChangeLog
2.2.2 (In development)
New Features
- Translations
- Added Translations for LOLCAT
- Added Translations for Esperanto
- Added Translations for Sinhalese
- Added Translations for Finnish
- Added Translations for Danish
- Ability to translate newsletter
Developer Tools
- Added more unit tests
- Added Makefile so that you can execute 'make test' in sapphire
- Added SS_DEFAULT_ADMIN_USERNAME/PASSWORD defines to conf/ConfigureFromEnv.php
- Added missing ChangePasswordEmail.ss
- main.php: Moved _ss_environment.php include to very top
- ArrayLib
- Added in_array_recursive() for recursively checking an array with nested arrays
- Controller
- Improved allowed_actions support for subclassed controllers, such as CMSMain extends LeftAndMain
- Allow use of on controller extensions
- DataObject
- Added hasDatabaseField()
- DataObjectSet
- Implemented equal values
- Date
- Added TimeDiffIn()
- Email
- Changed email encoding from iso-8859-15 to utf-8, in compliance with other parts of SilverStripe and IMC recommendations
- ErrorPage
- Added all the types of error pages (ErrorPage.400,401,403 - 417,500 - 505)
- File
- Updated AssetAdmin to use TreeTitle() in place of Title for tree generation
- Updated TreeTitle() to allow use of alternateTreeTitle() in decorator
- Updated File to allow the insertion of extra columns by decorator
- FileUploadField
- Added ability to customise which folder a file is uploaded to
- Folder
- Moved folder admin form to Folder::getCMSFields() to let you more easily manipulate the form with a decorator
- Form
- Added added setFields()/setActions()
- Group
- Added canEdit(), which can be used to filter the SecurityAdmin group list
- HTMLEditorField
- Added paste plain text and paste from word buttons
- Added 'anchor' option to link inserter
- Image
- adding "delete" class to DeleteImageForm()
- Member
- Added $notify_password_change - now sends an email to the member
- Added BaseHref() to Member_ChangePasswordEmail so that the email shows the domain name of the current subsite
- Added Member->SetPassword, a field that lets you have a write-only password field
- Used Member->SetPassword to create a password column on the MemberTableField for SecurityAdmin
- Send 'changed password' emails when a user is first created as well as edited
- Added $searchable_fields in preparation for a more generic search implementation, currently limited to Member.php and MemberTableField.php
- RSSFeed
- Make RSS feed work with objects that don't support AbsoluteLink, such as the forum
- Security
- Added support for password and old_password encryption mechanisms if you're using MySQL
- SiteTree
- Made breadcrumbs delimiter configurable
- Added simple to-do list facility
- Don't let people create a page name that is the same as a class name
- Moved CMS page-disabled logic into SiteTree::CMSTreeClasses(), so that it can be more easily customised for specific sites
- Versioned
- Added database indexes for AuthorID and PublisherID
- ViewableData
- Added $SecurityID for templates
- Added escapeTypeForField() to determine if the record-field needs escaping (currently only 'xml' supported)
- Added title attributes to the SilverStripeNavigator messages
- Added $casting for BaseHref()
Bug Fixes
- Sapphire
- Better handling of memory limit
- Fix locale files on Windows
- More solid ID-detection in Member::php()
- ComplexTableField:
- added $popupClass to avoid duplication, getting basedataclass for existing children in DetailForm() (in case we're dealing with different subclasses)
- fixed getParentIdName() call in DetailForm() - paramter-order was wrong
- better checking in saveComplexTableField() to avoid PHP-notice
- Fix title and description in RSS feeds
- Fix interface translations in CMS footer
- DataObject:
- fix for quering database for child elements when it hasnt been serialized
- Remove HAVING clause from methods where it doesn't make sense to have them
- Fix caching in DataObject::get_one()
- Take orderby clause into account when caching in DataObject::get_one()
- Removes having clause as it can't be used
- Fixed DataObjectSet::insertFirst() - it now uses a numeric key rather than null
- TestRunner: Ensured that the autoloader pulls in the test class
- Database::createDatabase() shouldn't need any arguments. Fixed this in the core class and MySQLDatabase
- Debug: Fix stack trace on objects that don't extend the Object class
- SapphireTest.php: Fix YAML many_many/has_many relationships
- HasManyComplexTableField: set $template and $itemClass to public (according to parent implementation) and fixed formatting
- Email: Fix attachments that could not be emailed from mac or windows systems
- Use lighter version of browscap.ini
- Added ArrayLib::is_associative()
- Allowing object-parameters in DataObjectSet and ArrayData, added ArrayData::object_to_array()
- Allow insertion of <img> tags that refer to external domains and add alt= to any images that don't have alt tags
- Show the saved value of EditableEmailField.SendCopy
- ManifestBuilder: Fix building manifest before database is created
- HTMLText.Summary: Don't close img and br tags
- Don't fail in i18n::include_by_class if the module isn't translatable
- Database: When removing a value from an enum, set affected rows back to the default
- Fix DataObjectSet constructor breaking with associative arrays
- Make ContentNegotiator send XHTML to the W3C validator
- Image: Fix attaching an existing folder to an ImageField
- TableField:
- when no source items found, the table should still show and it should works as adding new records
- renamed $wantDefaultAddRow to $showAddRow
- Form: removed Form::dropDatalessFields()
- Refactored Member::session_regenerate_id to make it easier to disable in some circumstances.
- Deprecated use of DBField 'Text' for saving HTML-Content (added check in HTMLEditorField->saveInto())
- Make Security::get_encryption_algorithms() a dynamic function again.
- Fix sorting in complextablefield
- Added sapphire/conf/ConfigureFromEnv.php for making use of _ss_environment.php
- SelectionGroup: Fix for bug that initialises with preloaded selected items with right hide/show
- Fixed fatal error due to browscap.ini capitalisation error
- Allow many-many complex table fields to be used on the reverse side of the join (belongs many many)
- Fix incorrect text boxes on many-many complex table fields and relational complex table fields being set on an ajax request
- BasicAuth: Fixed illegal reference to this
- Image: locking down URLs: image/iframe, image/flush, image/transferlegacycontent
- RelationComplexTableField: fixed "object not found" error in ie6
- ImageField: compressed layout to fit in CTF-popup (removed "click here to remove" label), removed iframe-borders for IE
- RelationComplexTableField: added check if sitetree exists otherwise IE broken with all genericDataAdmin panel
- ComplexTableField: updating form in ctf-popup after saving (including validation-errors and fields that have may changed on the serverside, e.g. ImageField?)
- fix PageView's recording of referrers.
- File: fix upload folder
- Fixed seamonkey browser recognition in browscap.ini
- ComplexTableField: fix sql error on comments section
- fixed i18n::get_owner_module() calls on classes with _s
- Fixed ManifestBuilder execution in restrictive openbasedir environments
- Removed clone behaviour from Form::Fields()
- Object: Added object caching methods
- Make DataObject::write() call the recursive write on components, even when the dataobject itself hasn't changed
- fix ComplexTableField caching
- ManifestBuilder regex
- Debug: Supress disabled errors on live site
- Allowed subclasses in ComponentSet::add/remove
- added extra security on Controller ( checkAccessAction() )
- Member: Used Object::create() to create email instances sent by the system.
- Object, Versioned, Hierarchy: Allow selection of folder when inserting files / images
- AjaxUniqueTextField: fixed sql-injection
- TableField: Removed use of deprecated TableField::setExtraClass()
- Group: Removed warning in group admin
- DataObject: fixed caching in getManyManyComponents
- DataObject: Fixed MySQL 4.1 support for situations where we are sorting by a group aggregation function and fixed notice level error
- Fixed bug with BasicAuth enabled on an old database, it was preventing you from visiting db/build
- DataObject: Fixed 4.1-sort-by-group-aggregate query rewriter for sort functions containing columns, eg, ORDER BY if(A,B,C), X
- Director: Small fix for session bugs on Lightspeed server
- DataObjectSets: cannot be iterated over multiple times concurrently
- fix to Installer: falsely claims modrewrite fails (mamp)
- Widget: fixed widget editor
- ComplexTableField: Fixed double-escaping of CTF popup page-navigation links
- ComponentSet: fixing bug with in-memory child objects not having their parent ID field updated via the ->add() method
- ComplexTableField: BUGFIX properly setting $childID in form for newly created items to avoid duplicates after subsequent saving (the form reloaded without the ID connection)
- TableListField: fixed csv export in MemberTableField by checking for valid database columns when building SELECT statement
- ComplexTableField: fix popup breaking after saving
- CMS
- cmsmain_left: You can't reorganise pages without creating pages
- MemberTableField: Patch for more i18n strings
- Fix i18n errors
- UserDefinedForm: Fixed notice level error
- Bug in PageComments class (Security)
- Fix autocompletion in Security Admin
- Fixed the $hide_ancestor static on SiteTree? subclasses
- Fixed bug: Page class wasn't shown in add-page dropdown
- More memory-efficient version of admin/publishall
- tinymce.template: Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS
- SideReport: fixed bug in todo list report
- Fixed 404 on spacer.gif
- Fixed context menus in CMS
- CMSMain: Added 'duplicate page and children' context-item in addition to 'duplicate just this page'
- GenericDataAdmin: Recover ExportForm for genericDataAdmin Which is needed for CRM CreateCommunication
- Added default SubscribeForm.ss
- Added SubscribeSubmission template to get subscribeforms to work
- SubscribeForm: Fix newsletter subscription form
- AssetAdmin: Disabled unused files list, as it uses way too much memory
- CMSMain->getNewItem now calls $this->extend('augmentNewSiteTreeItem', $newItem);
- Changed call to ViewableData::castingHelperPair to fix sort not being set by getNewItem
- Used Member->SetPassword? to create a password column on the MemberTableField? for SecurityAdmin?
- Send 'changed password' emails when a user is first created as well as edited
- Updated core to allow for subsites restriction of filesystem: Folder::getCMSFields() is now responsible for generating the folder form.
- Folder::syncChildren() now exclusively uses DB::query() calls instead of DataObject::get().
- CMSMain: Fixed CMS bottom-navigation after publish, when using the subsites module (or other alternateAbsoluteLink implementors)
- SideReport: Fixed newlines in to-do report
- Javascript
- Improved the Behaviour.addLoader() method to play more nicely with tools
- tree.js: Fix bug when duplicating pages with reorganise enabled
- tiny_mce_improvements.js: Improvement to link-insertion logic when selecting text that doesn't have a link
- tiny_mce_improvements.js: Fixed default-setting for link anchor
2.2.1 (21 Dec 2007)
New Features
- Translations
- Added Italian translation
- Added Russian translation
- Added Slovak translation
- Added Turkish translation
- Added Bulgarian translation
- Added Czech translation
- Added Hungarian translation
- Added Portuguese (Brazil) translation
- Added Swedish translation
- Added Chinese (Taiwan) translation
- Added support for sapphire to Portuguese (Portugal) translation
Developer Tools
- Added augmentDefaultRecords(), so DataObjectDecorators can extend requireDefaultRecords
Bug fixes
- Sapphire
- Hardcoded array of encryption algorithims in Security::get_encryption_algorithms(), as a bug in MySQL causes corruption in dumps with enums with commas
- Fixed bug with google sitemap on translated sites
- Removed title from SecurityID fields, as some forms show labels on HiddenFields
- Fixed Object::uninherited() for PHP 5.1.2
- Added empty array to member so that roles can add their own has_one relations
- CMS
- Added SecurityAdmin_rightbottom.ss
- Javascript
- Upgraded TinyMCE to 2.1.3
2.2.0 (28 Nov 2007)
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 (simplified) translation
- Spanish translation
- French translation
- Croatian translation
- Polish translation
- Portuguese (Portugal) 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
- Added the ability to align images 'left on their own'
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()
- Added set_status_code() and get_status_code()
- 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
- Added the ability for Member decorators to augment MemberFormFields()
- 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
- RestfulService
- Added caching
- 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
- ?previewwrite no longer works on live sites
- Fixed incorrect CSS in TableListField.css
- Fixed incorrect namespacing in TableListField::BaseLink()
- If a CreditCardField is completely blank, then it's not invalid. Required-fields should be used to check for values.
- 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
- Use classes instead of the align tag to align images
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
For a full change log, please visit http://open.silverstripe.org/wiki/ChangeLog.

View File

@ -5,17 +5,6 @@
# Most users should simply visit the site root in your web browser.
#
suffix=`basename \`dirname \\\`pwd\\\`\``
install: mysite/_config.php
mysite/_config.php:
php install.php install SS_testdatabase_${suffix}
test: clean install
test:
php ./sapphire/cli-script.php dev/build flush=1
$(MAKE) -C sapphire test
clean:
if [ -f .htaccess ]; then rm .htaccess; fi
touch .htaccess
if [ -f mysite/_config.php ]; then rm mysite/_config.php; fi

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

View File

@ -1,18 +0,0 @@
<?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>
<!--*/?>-->

View File

@ -1,118 +0,0 @@
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;
clear: left;
}
.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;
}

View File

@ -1,173 +0,0 @@
<!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">&nbsp;</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! &nbsp;&nbsp;
</p>
<?php } ?>
<p>
<b>Template to install:</b>
</p>
<ul id="Themes">
<li><input type="radio" name="template" value="blackcandy" 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">
&nbsp;
<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 &copy; 2007 | Powered by <a href="http://www.silverstripe.com">SilverStripe Open Source CMS</a></p>
</div>
</div>
</body>
</html>

View File

@ -1,17 +0,0 @@
<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>

View File

@ -1,3 +1,71 @@
<?php
header("Location: check-php.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');

View File

@ -1,14 +1,32 @@
<?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');
@ -20,6 +38,7 @@ foreach($envFiles as $envFile) {
}
}
// Load database config
if(isset($_REQUEST['mysql'])) {
$databaseConfig = $_REQUEST['mysql'];
@ -38,13 +57,25 @@ if(isset($_REQUEST['admin'])) {
} else {
$_REQUEST['admin'] = $adminConfig = array(
'username' => 'admin',
'password' => 'password',
'password' => '',
'firstname' => '',
'surname' => ''
);
}
$alreadyInstalled = (file_exists('mysite/_config.php') || file_exists('tutorial/_config.php'));
$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');
@ -82,10 +113,10 @@ if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) {
exit(1);
}
if(isset($_REQUEST['go']) || $installFromCli && !$req->hasErrors() && !$dbReq->hasErrors()) {
if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) {
// Confirm before reinstalling
if(!isset($_REQUEST['force_reinstall']) && !$installFromCli && $alreadyInstalled) {
include('config-form.html');
include('sapphire/dev/install/config-form.html');
} else {
$inst = new Installer();
@ -99,7 +130,7 @@ if(isset($_REQUEST['go']) || $installFromCli && !$req->hasErrors() && !$dbReq->h
// Show the config form
} else {
include('config-form.html');
include('sapphire/dev/install/config-form.html');
}
/**
@ -140,7 +171,7 @@ class InstallRequirements {
$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",
$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()
@ -150,7 +181,7 @@ class InstallRequirements {
$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('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));
@ -185,11 +216,11 @@ class InstallRequirements {
// 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"));
// 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;
}
@ -301,33 +332,45 @@ class InstallRequirements {
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);
list($recA, $recB, $recC) = explode('.', $recommendedVersion);
list($reqA, $reqB, $reqC) = explode('.', $requiredVersion);
list($a, $b, $c) = explode('.', phpversion());
$c = ereg_replace('-.*$','',$c);
$installedVersion = phpversion();
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.";
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;
}
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);
return true;
}
function requireFile($filename, $testDetails) {
@ -357,24 +400,40 @@ class InstallRequirements {
function requireWriteable($filename, $testDetails) {
$this->testing($testDetails);
$filename = $this->getBaseDir() . $filename;
$filename = $this->getBaseDir() . str_replace("/", DIRECTORY_SEPARATOR,$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'];
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.";
}
}
$groupList = "'" . implode("', '", $groupList) . "'";
$testDetails[2] .= "User '$user[name]' needs to be able to write to this file:\n$filename";
$this->error($testDetails);
} else {
$testDetails[2] .= "The webserver user needs to be able to write to this file:\n$filename";
}
} else {
$testDetails[2] .= "Unable to detect whether I can write to files. Please ensure $filename is writable.";
$this->warning($testDetails);
$this->error($testDetails);
}
}
@ -523,11 +582,12 @@ class InstallRequirements {
}
protected $baseDir;
// 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'])) . '/';
if(!$this->baseDir) $this->baseDir = realpath(dirname($_SERVER['SCRIPT_FILENAME'])) . DIRECTORY_SEPARATOR;
return $this->baseDir;
}
@ -578,10 +638,32 @@ class Installer extends InstallRequirements {
function install($config) {
if(isset($_SERVER['HTTP_HOST'])) {
?>
<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
<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";
}
@ -687,12 +769,16 @@ PHP
$_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
$_GET['flush'] = true;
$con = new Controller();
$con->pushCurrent();
@ -716,24 +802,15 @@ PHP
// Syncing filesystem (so /assets/Uploads is available instantly, see ticket #2266)
FileSystem::sync();
if(isset($_SERVER['HTTP_HOST'])) {
$this->statusMessage("Checking mod_rewrite works...");
$modRewriteWorks = $this->checkModRewrite();
} else {
$modRewriteWorks = true;
}
$_SESSION['username'] = $config['admin']['username'];
$_SESSION['password'] = $config['admin']['password'];
if($modRewriteWorks && !$this->errors) {
if(!$this->errors) {
if(isset($_SERVER['HTTP_HOST'])) {
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>
";
$this->statusMessage("Checking that friendly URLs work...");
$this->checkModRewrite();
} else {
echo "\nSilverStripe successfully installed\n";
echo "\n\nSilverStripe successfully installed\n";
}
}
@ -799,17 +876,21 @@ PHP
else $baseClause = "";
$rewrite = <<<TEXT
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
<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)|(\.php)$
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
;
@ -828,45 +909,6 @@ TEXT
$this->createFile('.htaccess', $start . $rewrite . $end);
}
function createHtaccessAlternative() {
$start = "### SILVERSTRIPE START ###\n";
$end= "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
if($base != '.') $baseClause = "RewriteBase $base\n";
$rewrite = <<<TEXT
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
RewriteEngine On
$baseClause
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;
if(file_exists($this->getBaseDir() . '.htaccess')) {
$htaccess = file_get_contents($this->getBaseDir() . '.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 ###'));
}
}
echo "\n\nRewrite is $rewrite\n";
$this->createFile('.htaccess', $start . $rewrite . $end);
}
function restoreHtaccess() {
$start = "### SILVERSTRIPE START ###\n";
@ -889,65 +931,43 @@ TEXT;
}
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() {
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;
}
$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';
echo $location;
@$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;
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>");
}
}
}
return false;
});
}
</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) {

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');
?>

View File

@ -15,13 +15,42 @@ class Page_Controller extends ContentController {
public function init() {
parent::init();
// Note: you should use <% require %> tags inside your templates instead of putting Requirements calls here. However
// these are included so that our older themes still work
// 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

@ -81,7 +81,7 @@ function createHtaccess() {
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
@ -114,7 +114,7 @@ function createHtaccessAlternative() {
RewriteEngine On
RewriteBase $base
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f