From 032a49d92999a6a6c1d19f628c85a92b4c411a87 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 26 Mar 2013 11:08:44 +0100 Subject: [PATCH] 3.1/3.2 compat --- code/DocumentationSearch.php | 2 +- code/controllers/DocumentationOpenSearchController.php | 2 +- code/controllers/DocumentationViewer.php | 2 +- code/models/DocumentationEntity.php | 2 +- composer.json | 2 +- templates/DocFolderListing.ss | 4 ++-- templates/DocumentationViewer.ss | 8 ++++---- templates/Includes/DocBreadcrumbs.ss | 4 ++-- templates/Includes/DocInThisModule.ss | 8 ++++---- templates/Includes/DocSubmenu.ss | 8 ++++---- templates/Includes/DocumentationVersion_warning.ss | 4 ++-- templates/Layout/DocumentationViewer_home.ss | 4 ++-- templates/Layout/DocumentationViewer_results.ss | 8 ++++---- templates/OpenSearchResults.ss | 4 ++-- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/code/DocumentationSearch.php b/code/DocumentationSearch.php index 9806186..7cae67d 100755 --- a/code/DocumentationSearch.php +++ b/code/DocumentationSearch.php @@ -428,7 +428,7 @@ class DocumentationSearch { $defaults = array( 'Description' => _t('DocumentationViewer.OPENSEARCHDESC', 'Search the documentation'), 'Tags' => _t('DocumentationViewer.OPENSEARCHTAGS', 'documentation'), - 'Contact' => Email::getAdminEmail(), + 'Contact' => Config::inst()->get('Email', 'admin_email'), 'ShortName' => _t('DocumentationViewer.OPENSEARCHNAME', 'Documentation Search'), 'Author' => 'SilverStripe' ); diff --git a/code/controllers/DocumentationOpenSearchController.php b/code/controllers/DocumentationOpenSearchController.php index b196558..bfd350d 100644 --- a/code/controllers/DocumentationOpenSearchController.php +++ b/code/controllers/DocumentationOpenSearchController.php @@ -9,7 +9,7 @@ class DocumentationOpenSearchController extends Controller { - public static $allowed_actions = array( + private static $allowed_actions = array( 'description' ); diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index 0beef5d..95155e8 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -14,7 +14,7 @@ class DocumentationViewer extends Controller { - public static $allowed_actions = array( + private static $allowed_actions = array( 'home', 'LanguageForm', 'doLanguageForm', diff --git a/code/models/DocumentationEntity.php b/code/models/DocumentationEntity.php index bc8db4b..0450312 100755 --- a/code/models/DocumentationEntity.php +++ b/code/models/DocumentationEntity.php @@ -26,7 +26,7 @@ class DocumentationEntity extends ViewableData { /** * @var array */ - static $casting = array( + private static $casting = array( 'Name' => 'Text' ); diff --git a/composer.json b/composer.json index 08c3ade..5f78476 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,6 @@ "irc": "irc://irc.freenode.org/silverstripe" }], "require": { - "silverstripe/framework": ">=3.1.*@dev" + "silverstripe/framework": "~3.1" } } diff --git a/templates/DocFolderListing.ss b/templates/DocFolderListing.ss index 7eb1f2c..7cf8897 100755 --- a/templates/DocFolderListing.ss +++ b/templates/DocFolderListing.ss @@ -3,9 +3,9 @@ <% if Pages %> <% else %>

No documentation pages found for $Title. If you need help writing documentation please consult the README.

diff --git a/templates/DocumentationViewer.ss b/templates/DocumentationViewer.ss index 01c9b81..2ec52c3 100755 --- a/templates/DocumentationViewer.ss +++ b/templates/DocumentationViewer.ss @@ -30,9 +30,9 @@

Modules:

@@ -43,9 +43,9 @@

Versions:

    - <% control Versions %> + <% loop Versions %>
  • $Title
  • - <% end_control %> + <% end_loop %>
<% end_if %> diff --git a/templates/Includes/DocBreadcrumbs.ss b/templates/Includes/DocBreadcrumbs.ss index 7cb9fd8..3eefe41 100755 --- a/templates/Includes/DocBreadcrumbs.ss +++ b/templates/Includes/DocBreadcrumbs.ss @@ -1,7 +1,7 @@

- <% control Breadcrumbs %> + <% loop Breadcrumbs %> $Title <% if Last %><% else %>›<% end_if %> - <% end_control %> + <% end_loop %>

\ No newline at end of file diff --git a/templates/Includes/DocInThisModule.ss b/templates/Includes/DocInThisModule.ss index 313606f..bdaa1b2 100755 --- a/templates/Includes/DocInThisModule.ss +++ b/templates/Includes/DocInThisModule.ss @@ -2,7 +2,7 @@ <% end_if %> <% if SubmenuLocation = separate %> - <% control CurrentLevelOnePage %> + <% loop CurrentLevelOnePage %> <% if Children %> <% end_if %> - <% end_control %> + <% end_loop %> <% end_if %> diff --git a/templates/Includes/DocSubmenu.ss b/templates/Includes/DocSubmenu.ss index 781a3f1..7821c38 100644 --- a/templates/Includes/DocSubmenu.ss +++ b/templates/Includes/DocSubmenu.ss @@ -1,14 +1,14 @@ diff --git a/templates/Includes/DocumentationVersion_warning.ss b/templates/Includes/DocumentationVersion_warning.ss index f2d9196..2002c9b 100644 --- a/templates/Includes/DocumentationVersion_warning.ss +++ b/templates/Includes/DocumentationVersion_warning.ss @@ -1,6 +1,6 @@
- <% control VersionWarning %> + <% loop VersionWarning %> <% if OutdatedRelease %>

This document contains information for an outdated version <% if Top.Version %>($Top.Version)<% end_if %> and may not be maintained any more.

If some of your projects still use this version, consider upgrading as soon as possible.

@@ -8,6 +8,6 @@

This document contains information about a future release <% if StableVersion %>and not the current stable version ($StableVersion)<% end_if %>.

Be aware that information on this page may change and API's may not be stable for production use.

<% end_if %> - <% end_control %> + <% end_loop %>
diff --git a/templates/Layout/DocumentationViewer_home.ss b/templates/Layout/DocumentationViewer_home.ss index 7d271b5..18138d1 100755 --- a/templates/Layout/DocumentationViewer_home.ss +++ b/templates/Layout/DocumentationViewer_home.ss @@ -2,11 +2,11 @@

<% _t('DOCUMENTEDMODULES', 'Documented Modules') %>

<% if Entities %> - <% control Entities %> + <% loop Entities %> - <% end_control %> + <% end_loop %> <% else %>

<% _t('NOMODULEDOCUMENTATION', 'No modules with documentation installed could be found.') %>

<% end_if %> diff --git a/templates/Layout/DocumentationViewer_results.ss b/templates/Layout/DocumentationViewer_results.ss index 06a2b0f..1e8aca5 100755 --- a/templates/Layout/DocumentationViewer_results.ss +++ b/templates/Layout/DocumentationViewer_results.ss @@ -8,10 +8,10 @@ <% if Results %>

Showing page $ThisPage of $TotalPages

- <% control Results %> + <% loop Results %>

<% if BreadcrumbTitle %>$BreadcrumbTitle<% else %>$Title<% end_if %>

$Content.LimitCharacters(200)

- <% end_control %> + <% end_loop %> <% if SearchPages %>