Commit Graph

117 Commits

Author SHA1 Message Date
Ingo Schommer
9886aef57d BUGFIX Removed version number from <meta> generator tag - opt for security by obscurity in this case (originally committed in r70422 and r71172)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73836 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-30 16:34:38 +00:00
Geoff Munn
6a53df681f BUG FIX: Fulltext fields restored in SiteTree.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 22:56:43 +00:00
Geoff Munn
50ca8ff01a MSSQL enabled for GW metlink
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 21:06:06 +00:00
Ingo Schommer
7ad7f8dcf2 ENHANCEMENT Adjusted SearchForm, Debug, ErrorPage, SiteTree to using locales instead of lang codes
API CHANGE Changed Translatable datamodel to use locales ("en_US") instead of lang values ("en).
API CHANGE Changed Translatable::$default_lang to $default_locale, Translatable::$reading_lang to $reading_locale
API CHANGE Using "locale" instead of "lang" in Translatable::choose_site_lang() to auto-detect language from cookies or GET parameters
API CHANGE Deprecated Translatable::is_default_lang(), set_default_lang(), get_default_lang(), current_lang(), set_reading_lang(), get_reading_lang(), get_by_lang(), get_one_by_lang()
API CHANGE Removed Translatable::get_original() - with the new "translation groups" concept there no longer is an original for a translation
BUGFIX Updated MigrateTranslatableTask to new Locale based datamodel

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 08:47:06 +00:00
Ingo Schommer
fef49abefa BUGFIX Disabled "untranslated" CSS class for SiteTree elements - doesn't apply any longer with the new "translation groups" concept
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73339 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 16:15:46 +00:00
Geoff Munn
ef5c9a42d5 BUG FIX: SQL queries fixed for MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 21:48:58 +00:00
Sam Minnee
08a5a7c387 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72803 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:08:52 +00:00
Ingo Schommer
7f4f57c307 ENHANCEMENT Added i18n::get_lang_from_locale() and i18n::convert_rfc1766()
ENHANCEMENT Using IETF/HTTP compatible "long" language code in SiteTree->MetaTags(). This means the default <meta type="content-language..."> value will be "en-US" instead of "en". The locale can be either set through the Translatable content language, or through i18n::set_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72367 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-02 22:13:30 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
2956cc482f FEATURE Supporting search for special characters like umlauts in SearchForm. These characters are encoded to HTML entities by TinyMCE for SiteTree->Content, hence we need a special case in the search logic (incl. unit tests)
ENHANCEMENT Added MySQL FULLTEXT index for $Content property on SiteTree, Needs separate indexing to be searchable by SearchForm - $Content is the only field which has special characters encoded as HTML entities (through TinyMCE)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-19 02:49:42 +00:00
Ingo Schommer
7ccd1bbc24 ENHANCEMENT Looking for URLSegments in languages outside of default language in ModelAsController by implementing a new extension point in SiteTree::get_by_url(): DataObjectDecorator->alternativeMatches()
ENHANCEMENT Allowing non-default language URLs to be accessed without explicitly specifying the language in GET request

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-16 04:07:17 +00:00
Andrew O'Neil
2b6842e634 BUGFIX: Fixed URLs having to unique across languages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70078 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-13 05:02:11 +00:00
Ingo Schommer
d3d6ae833d Merged, debugged and enhanced Translatable patches from branches/translatable at r64523, r64523, 64523, thanks wakeless!
API CHANGE Changed Translatable schema from auxilliary tables (SiteTree_lang, SiteTree_lang_Live) to automatically filtered records on the original table (SiteTree, SiteTree_Live), using $Lang and $OriginalID properties. Incompatible update to old schema, migration script is in the works.
API CHANGE Removed Translatable::get_one(), Translatable::write()
ENHANCEMENT Simplified Translatable tree generation by using getSiteTreeFor() in CMSMain->createtranslation()
ENHANCEMENT Added AllChildrenIncludingDeleted(), augmentNumChildrenCountQuery(),  augmentAllChildrenIncludingDeleted(), augmentStageChildren() to Translatable class to allow for more stable tree generation.
ENHANCEMENT Moved definition of Translatable schema from augmentDatabase() to Translatable->extraStatics()
ENHANCEMENT Changes to the CMS language selection refresh the whole admin interface instead of the tree only. This way we can add a URL parameter ?lang=<lang> to /admin, which makes the specific language bookmarkable and reloadable. Changes to LangSelector.js
ENHANCEMENT Added fallback to ModelAsController->getNestedController() to fetch page with matching URLSegment but different language in case no page is found in the current language.
ENHANCEMENT Added helper methods to Translatable: getTranslation(), hasTranslation(), isTranslation(), findOriginalIDs()
ENHANCEMENT Getters and setters for Translatable->getOriginalPage() etc.
ENHANCEMENT Hooking Translatable into ModelAsController and ContentController initialization in order to call choose_site_lang()
ENHANCEMENT Simplified Translatable->augmentSQL(), augmentWrite() by not using auxilliary tables
ENHANCEMENT Showing clickable links for Translations in Translatable->updateCMSFields()
BUGFIX Modifying Hierarchy/SiteTree Children getters to accept optional "context" which can be used to set a language explicitly through the $Lang property, rather than implicitly reyling on the static Translatable::current_lang()
BUGFIX Fixed TranslatableTest to work with new datamodel
BUGFIX Temporarily disabled cookie/session selection in Translatable::choose_site_lang() until we have a good test suite for the side effects.
MINOR Added "untranslated" CSS styles to tree nodes and marking them as inactive/grey


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69959 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-10 12:15:30 +00:00
Ingo Schommer
b7d394008e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-10 11:35:50 +00:00
Ingo Schommer
c8200f67ac BUGFIX Fixed SiteTree->getIsDeletedFromStage() to return false on non-numeric IDs (isNew())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69857 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-07 23:01:38 +00:00
Ingo Schommer
c4250635bc BUGFIX Disabling batch selection of pages without publication rights in SiteTree->CMSTreeClasses()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69747 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-06 02:46:16 +00:00
Ingo Schommer
085346f0e0 MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-05 06:19:48 +00:00
Ingo Schommer
40215a9937 ENHANCEMENT Removed object state setting in CMSMain/SiteTree publication process: DeletedFromStage, CheckedPublicationDifferences, IsAddedToStage and added getters for them. Improves testability as we don't have to rely on random methods like MenuTitle() being called to set object state.
ENHANCEMENT Flushing cache in SiteTree->onAfterWrite() and SiteTree->onAfterDelete() to ensure the publication state is up to date


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69410 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-17 22:41:07 +00:00
Geoff Munn
fe0a640c39 API CHANGE: fulltext and unique indexes are now arrays
API CHANGE: db/build now no longer notifies you of changes which haven't actually happened.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69303 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-17 00:40:24 +00:00
Ingo Schommer
d26f08b481 MINOR merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-04 22:38:32 +00:00
Andrew O'Neil
17e855da88 BUGFIX: Fix incomplete change in r66672
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-02 04:32:19 +00:00
Sam Minnee
d76638249e BUGFIX: Access tab - include 'inherit' in the option lists on top level pages if that is the current value. Otherwise you try and save a null which MySQL can cope with but stricter databases can't.
BUGFIX: Fixed posgresql syntax for tree-sort publishing.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66794 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-27 00:06:35 +00:00
Ingo Schommer
47a67a5a4e BUGFIX Wrong usage of Member::currentUser() in SiteTree->canEdit()
ENHANCEMENT Allowing to explicitly check SiteTree->can*() actions for a non-existing member without triggering Member::currentUser() fallback for better testability

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66672 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-25 22:23:47 +00:00
Ingo Schommer
aa7b5f4ee3 MINOR merged from branches/2.3 (googlesitemaps modularization)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 22:04:32 +00:00
Sam Minnee
2e955b498e BUGFIX: Fixing tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 19:28:46 +00:00
Sam Minnee
96c5be8252 Updating queries to be more DB agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 09:31:14 +00:00
Sam Minnee
93438e0be2 API CHANGE: Adding double quotes to all table and field references (a work in progress)
API CHANGE: DataObject::get()'s GROUP BY clause is only generated for MySQL as it needs to be improved for other databases to accept it.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 23:28:16 +00:00
Sam Minnee
a3d3fb65a9 Updated SQL queries to be ansi compatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 00:31:06 +00:00
Sam Minnee
2984355f43 Merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66395 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-22 03:33:00 +00:00
Sam Minnee
4e6036911e Merged branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66112 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-18 01:52:32 +00:00
Sam Minnee
3d9532db83 Merged branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66108 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-18 01:48:37 +00:00
Sam Minnee
73a075a491 FEATURE #594: Added javascript-on-demand support
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65688 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-12 04:31:33 +00:00
Sam Minnee
58dbe416ee Merged from branches/2.2
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-10 03:51:35 +00:00
Ingo Schommer
4452e9bb5b ENHANCEMENT Updated UpgradeSiteTreePermissionSchemaTask to rename obsolete database columns
ENHANCEMENT Calling UpgradeSiteTreePermissionSchemaTask from SiteTree->requireDefaultRecords as a temporary workaround for missing migration infrastructure. This means that upgrading the schema for 2.3 can be done without manual task triggers, just the usual dev/build (see http://open.silverstripe.com/ticket/2847#comment:4)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 23:58:48 +00:00
Ingo Schommer
137b76e271 API CHANGE Deprecated DataObjectDecorator->augmentBeforeWrite(), use DataObjectDecorator->onBeforeWrite()
API CHANGE Deprecated DataObjectDecorator->augmentPopulateDefaults(), use DataObjectDecorator->populateDefaults()
API CHANGE Deprecated DataObjectDecorator->augmentDefaultRecords(), use DataObjectDecorator->requireDefaultRecords()
API CHANGE Deprecated DataObjectDecorator->alternateCan(), use DataObjectDecorator->can()
API CHANGE Deprecated DataObjectDecorator->alternateCanAddChildren(), use DataObjectDecorator->canAddChildren()
API CHANGE Deprecated DataObjectDecorator->alternateCanView(), use DataObjectDecorator->canView()
API CHANGE Deprecated DataObjectDecorator->alternateCanDelete(), use DataObjectDecorator->canDelete()
API CHANGE Deprecated DataObjectDecorator->alternateCanEdit(), use DataObjectDecorator->canEdit()
API CHANGE Deprecated DataObjectDecorator->alternateCanCreate(), use DataObjectDecorator->canCreate()
ENHANCEMENT Added DataObject->onAfterDelete() and DataObjectDecorator->onAfterDelete()
ENHANCEMENT Added stub methods to DataObjectDecorator for documentation purposes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-07 12:18:35 +00:00
Will Rossiter
bb20921fef BUGFIX: fixed canPublish() so it actually got the member if none was passed and fixed notice with $results not existing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65242 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-05 01:05:57 +00:00
Sam Minnee
5f177b9f08 BUGFIX #2056: Removed all references to deprecated Member::isAdmin()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65232 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:31:33 +00:00
Sam Minnee
72d90ab270 Set default edit rights on pages to be only administrators
API CHANGE: Use return value of alternateCanPublish()
BUGFIX: Fixed the Link() value for homepage
BUGFIX: Allow DBField::__construct() without a name
API CAHNGE: Allow augmentPopulateDefaults on data object decorators

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-04 23:17:14 +00:00
Ingo Schommer
ca6d92341e API CHANGE Changed SiteTree->Viewers to SiteTree->CanViewType, Changed SiteTree->Editors to SiteTree->CanEditType (see #2847)
API CHANGE Changed SiteTree->ViewersGroup has_one relationship to SiteTree->ViewerGroups has_many relationship (see #2847)
API CHANGE Changed SiteTree->EditorsGroup has_one relationship to SiteTree->EditorGroups has_many relationship (see #2847)
ENHANCEMENT Added 'Inherit' flag to SiteTree->CanViewType and SiteTree->CanEditType (see #2419)
ENHANCEMENT Added unit tests for SiteTree permissions
BUGFIX Checking recursively for permissions on children with SiteTree->canDelete()
BUGFIX Disallow SiteTree->canEdit() if SiteTree->canView() is not granted
Note: Use dev/tasks/UpgradeSiteTreePermissionSchemaTask/run to migrate legacy data to the new schema as outlined above

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-03 14:52:35 +00:00
Ingo Schommer
3edc358ead ENHANCEMENT Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:04:10 +00:00
Ingo Schommer
f06ae18409 API CHANGE Moved DataObject::get_by_url() to SiteTree::get_by_url()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65060 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:24:23 +00:00
Sam Minnee
cd699e3d89 API CHANGE #2857 - Renamed RequestHandlingData to RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64953 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-30 22:03:21 +00:00
Sam Minnee
672ca89c0b API CHANGE #2698 ajshort: URL handler only passes control to subclasses of RequestHandlingData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-30 21:51:59 +00:00
Sean Harvey
a6e6a4387d BUGFIX Renamed "Save & Publish" to "Save and Publish" since this value is used in the value attribute of input elements, properly parsed, this would produce &amp; instead of &
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-19 01:28:30 +00:00
Ingo Schommer
768fc5a588 BUGFIX Adjusted HeaderField and LabelField implementation to new constructor arguments (see r64421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64422 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 13:26:50 +00:00
Ingo Schommer
bc28a64e18 MINOR Changed visibility of SiteTree->getClassDropdown()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64418 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 13:00:02 +00:00
Ingo Schommer
edd087f80b API CHANGE Removed SiteTree->makelinksunique() and SiteTree->makelinksuniquequick() - use new SiteTreeMaintenanceTask
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64416 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 12:18:16 +00:00
Ingo Schommer
9b1db223ce API CHANGE Removed deprecated Datetime class, use SSDatetime instead (was conflicting with PHP 5.2 integrated classes)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64394 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:59:40 +00:00
Sam Minnee
b91be01aa8 API CHANGE #551: Move code from CMSMain to SiteTree
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64351 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 03:21:58 +00:00
Josh Kosmala
3d4d4d0c42 BUGFIX: Fix broken breadcrumbs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 00:28:36 +00:00