Commit Graph

104 Commits

Author SHA1 Message Date
Ingo Schommer
1039cfade4 FEATURE Allowing translation of SiteConfig (including toplevel permission groups)
BUGFIX Fixed SiteConfig->canView()/canEdit() to respect empty CanViewType/CanEditType assignments. (from r97370)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 05:02:31 +00:00
Ingo Schommer
6eb4d67c86 BUGFIX: Let users without a specific TRANSLATE_ permission edit the default locale, so that things don't break when you install the Translatabe module. (from r97267)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102435 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:41:34 +00:00
Ingo Schommer
e362790abd BUGFIX: Fixed bug in r93095 (from r93097) (from r96750)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102379 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:41:02 +00:00
Ingo Schommer
08075929ba API CHANGE: Added DataObjectDecorator::cacheKeyComponent() to ensure that the cached behind DataObject::get_one() is appropriately specific (from r93095) (from r96749)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102378 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:40:50 +00:00
Ingo Schommer
103ebbb168 BUGFIX Escaping Translatable->MetaTags() (#4826, thanks juanparati)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95174 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-12-14 19:59:23 +00:00
Sean Harvey
8844c1adf9 BUGFIX Removed calls to Translatable::is_enabled() since it's deprecated, replaced with Object::has_extension('SiteTree', 'Translatable') instead (from r93677)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93768 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-27 01:46:09 +00:00
Ingo Schommer
0009b5491c MINOR Markup changes to Translatable->getCMSField() to better support clientside language selection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92525 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:31:03 +00:00
Ingo Schommer
e567b47f07 BUGFIX Returning TRUE on Translatable->hasTranslation() if called on a record that is in the current locale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91032 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-09 04:13:08 +00:00
Sam Minnee
4252067f0c MINOR Changed silverstripe.com references to silverstripe.org
MINOR Fixed broken wiki links (#4672) (from r90886)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-06 03:35:07 +00:00
Sam Minnee
994e93f790 API CHANGE: replaced Database::USE_ANSI_SQL with DB::USE_ANSI_SQL
API CHANGE: replaced Database::alteration_message() with DB::alteration_message()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 22:03:29 +00:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Sean Harvey
559bbfcca8 BUGFIX #4605 DataObject::newClassInstance() should repopulate it's defaults after changing to an instance of a different class, otherwise databases will complain of NULL values being written to columns that don't accept NULL values.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88956 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-14 06:35:45 +00:00
Andrew Short
ea906a50a8 FEATURE: Implemented Translatable::get_homepage_link_by_locale() to enable translated home pages to function.
FEATURE: Updated SiteTree::get_by_link() to integrate with translatable, and allow it to work across languages by implementing Translatable->alternateGetByLink().
API CHANGE: Moved lang_filter enabling & disabling into static methods on Translatable, and renamed to locale_filter.
BUGFIX: Fixed viewing a translatable page by URL without explicitly setting a Locale in ContentController->handleRequest().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:22 +00:00
Andrew Short
ad7194cc40 FEATURE: Refactored RootURLController to allow nested home pages.
MINOR: Deprecated RootURLController::get_homepage_urlsegment() in favour of get_homepage_link().
MINOR: Updated SiteTree->RelativeLink() to return a link to the site root for the home page.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:17 +00:00
Ingo Schommer
54824945f5 MINOR Don't invoke Translatable->providePermissions() if its not enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:39:57 +00:00
Ingo Schommer
2506816ad6 ENHANCEMENT Added Translatable->getAllowedLocalesForMember()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88125 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:07:03 +00:00
Ingo Schommer
0faf03ee4e API CHANGE Requiring TRANSLATE_ALL or TRANSLATE_<locale> permission for authors without administrative access to edit translations
ENHANCEMENT Added Translatable->providePermissions()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 10:33:36 +00:00
Sam Minnee
f85a95f3aa BUGFIX #4579: Translatable's call to new LanguageDropdownField() broked
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87456 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 01:04:37 +00:00
Geoff Munn
9ec8c5c310 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:06:12 +00:00
Sam Minnee
5f6bee22ba BUGFIX: Added static resetting methods for more reliable test execution.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 04:45:54 +00:00
Sam Minnee
6fd387c99c API CHANGE ajshort: Deprecated the Director site mode and callback functionality.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-25 08:15:52 +00:00
Sam Minnee
0540bec71f BUGFIX #4255 sharvey: Fix application of extra db fields by DataObjectDecorators.
API CHANGE #4255 sharvey: DataObjectDecorator::extraStatics() can no longer refer to $this because it's called staticly


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 07:01:28 +00:00
Ingo Schommer
a145ebf8d2 BUGFIX Marking has_many() and many_many() fields as Translatable fields
BUGFIX Excluding Access fields on SiteTree from Translatable->updateCMSFields(), as their original values break the javascript logic for showing/hiding the fields

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:29:53 +00:00
Ingo Schommer
20ada72b4d BUGFIX Don't remove translation groups in Translatable->onBeforeDelete() if the decorated record uses Versioned, as other representations of the record might still exist in other tables (e.g. SiteTree_Live) (see #4219)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 05:02:43 +00:00
Ingo Schommer
de23d55a8b BUGFIX Writing Locale in Translatable->onBeforeWrite() regardless of the record ID existing (see #4232). This is more in line with Translatable->requireDefaultRecords() which automatically updates all NULL locale values anyway.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79194 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 04:34:03 +00:00
Ingo Schommer
601672cdff BUGFIX Fixed Translatable->requireDefaultRecords() for non-SiteTree objects (was assuming Versioned to be present)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78729 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-09 21:00:11 +00:00
Sam Minnee
b2460de140 ENHANCEMENT: Removed circular references from extensions to improve garbage collection.
API CHANGE: The result of any extension returned by Object::extInstance() should have setOwner() called on it before calling a method, and clearOwner() after.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 06:48:44 +00:00
Sean Harvey
08b651bd2d Merged r77256 from sapphire/branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 22:02:44 +00:00
Sean Harvey
161e7a35c7 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77020 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 23:15:31 +00:00
Ingo Schommer
104470006e API CHANGE Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
MINOR Renamed internal property Translatable::$reading_lang to $current_lang

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77006 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 05:36:01 +00:00
Ingo Schommer
9790c4832a BUGFIX Fixed default locale setting in SiteTree_Live through Translatable->requireDefaultRecords()
BUGFIX Added translation groups for existing entries the first time Translatable is switched on through Translatable->requireDefaultRecords() (see #4051)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 21:05:48 +00:00
Ingo Schommer
1b76ac9130 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76862 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:58:04 +00:00
Ingo Schommer
67180937ff API CHANGE Deprecated Translatable::current_lang(), use Translatable::get_current_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76853 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:05:48 +00:00
Ingo Schommer
5b0ee9678f API CHANGE Deprecated Translatable->getTranslatedLangs(), use getTranslatedLocales()
ENHANCEMENT Added Translatable::$allowed_locales to limit the available locales in the CMS for page translations. Added Translatable->canTranslate() and Translatable->canEdit() to determine if a translation is allowed.
ENHANCEMENT Added $instance parameter to LanguageDropdownField to call instance-specific canTranslate() on it (optionally)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:16:49 +00:00
Ingo Schommer
261ab10e00 MINOR Class naming in Translatable (see #4060)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76737 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 21:39:32 +00:00
Ingo Schommer
d3b95a0009 BUGFIX Fixed "Translations" tab display in CMS - no more duplication of original language and translated tab - see #4020
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 02:33:59 +00:00
Ingo Schommer
3fbdbd50d0 BUGFIX Closing <link type="alternate"> tags for XHTML compliance on Translatable->MetaTags(). Use ContentNegotiator to transform them back to HTML markup. See #3989
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 02:47:20 +00:00
Ingo Schommer
0cab3bf61e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:50:19 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Ingo Schommer
aafaee660b BUGFIX Removing ParentType and ParentID fields in Translatable->updateCMSFields() as they are causing js problems when set to readonly. These fields should only be set on the original record anyway (at least as long as we don't have a multi-language capable TreeMultiSelectField).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75984 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 09:01:14 +00:00
Ingo Schommer
3fcb2a336a BUGFIX Fixed TranslatableTest URLSegment detection
BUGFIX Removed URLSegment detection from Translatable->onBeforeWrite() - it was always preceeded by SiteTree->onBeforeWrite() which already alters the URL, so the appending of locale values to disambiguate the URL was pointless (never triggered)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 08:48:14 +00:00
Ingo Schommer
4965352bc3 BUGFIX Limiting all SQL queries going through Translatable->augmentSQL() to the Locale of the current object (if set), otherwise falling back to default locale. This fixes lots of problems with the Versioned extension in combination with Translatable, for example showing and comparing versions in the CMS sidebar (see #3886)
BUGFIX Removing the appended querying for NULL or empty Locale values in Translatable->augmentSQL() - this should no longer be necessary as we set default locales to all records through Translatable->requireDefaultRecords()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75826 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:18:40 +00:00
Ingo Schommer
c28c90b708 MINOR Re-added Translatable->extendWithSuffix()
BUGFIX Fixed DBLocaleTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 08:39:49 +00:00
Ingo Schommer
c1c920cca0 ENHANCEMENT Added DBLocale class for Translatable extension
API CHANGE Deprecated Translatable::get_langs_by_id() - use getTranslations()
MINOR Removed Translatable::is_default_locale() - no deprecation necessary, was recently added
MINOR Removed commented out methods in Translatable: augmentNumChildrenCountQuery(), augmentAllChildrenIncludingDeleted() and augmentStageChildren()
MINOR Removed fieldsInExtraTables() and extendWithSuffix()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 07:37:09 +00:00
Ingo Schommer
f2efb12bdd MINOR Updated Translatable and i18n documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75707 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 02:51:17 +00:00
Ingo Schommer
332e231529 ENHANCEMENT Added Versioned support to Translatable::getTranslation() and getTranslations()
ENHANCEMENT Marking 2.1-style "_lang" tables obsolete in Translatable::requireDefaultRecords()
ENHANCEMENT Added override flag to Translatable::addTranslationGroups()
MINOR Disabled Translatable->TranslationMasterID - not implemented yet

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75677 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:18:17 +00:00
Ingo Schommer
908ef4c1b7 ENHANCEMENT Auto-update locale values in Translatable->requireDefaultRecords() with default language when Translatable is first enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75421 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 03:12:57 +00:00
Ingo Schommer
a8028df67e ENHANCEMENT Added Translatable->MetaTags() to automatically insert <link rel="alternate" hreflang="...> tags into the page template
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 00:08:14 +00:00
Ingo Schommer
99c1fe9f93 BUGFIX Allowing translated homepages in RootUrlController
BUGFIX Limiting RootURLController to just trigger Translatable if no DomainForHomepage value is found
BUGFIX Using $locale parameter in Translatable::get_homepage_urlsegment_by_locale()
BUGFIX Updated enabling mechanism in Translatable->alternateGetByUrl()
MINOR Removed HTTP_HOST setting in TranslatableTest, wasn't necessary
API CHANGE Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 23:08:39 +00:00
Ingo Schommer
ca24365c6f BUGFIX Fixed Translatable->onBeforeWrite() to change ClassNames on all translations when the "master page" (default language) changes its class to avoid inconsistencies with saving translations (see #3487)
BUGFIX Correctly showing the available languages dropdown in Translatable->getCMSFields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:57:11 +00:00