Merge remote-tracking branch 'origin/3.1' into 3

Conflicts:
	code/model/SiteTree.php
	code/model/SiteTreeLinkTracking.php
	tests/controller/CMSMainTest.php
This commit is contained in:
Damian Mooyman 2015-06-02 19:23:48 +12:00
commit 1f9fc33349
17 changed files with 718 additions and 483 deletions

View File

@ -294,9 +294,9 @@ JS
$actions = $form->Actions();
$saveBtn = $actions->fieldByName('action_save');
$deleteBtn = $actions->fieldByName('action_delete');
$actions->removeByName('action_save');
$actions->removeByName('action_delete');
if(($saveBtn || $deleteBtn) && $fields->fieldByName('Root.DetailsView')) {
$actions->removeByName('action_save');
$actions->removeByName('action_delete');
$fields->addFieldToTab(
'Root.DetailsView',
CompositeField::create($saveBtn,$deleteBtn)->addExtraClass('Actions')

View File

@ -1,17 +1,16 @@
<?php
/**
* Basic data-object representing all pages within the site tree.
* This data-object takes care of the heirachy. All page types that live within the hierarchy should inherit from this.
* In addition, it contains a number of static methods for querying the site tree.
* Basic data-object representing all pages within the site tree. All page types that live within the hierarchy should
* inherit from this. In addition, it contains a number of static methods for querying the site tree and working with
* draft and published states.
*
* <h2>URLs</h2>
* A page is identified during request handling via its "URLSegment" database column.
* As pages can be nested, the full path of a URL might contain multiple segments.
* Each segment is stored in its filtered representation (through {@link URLSegmentFilter}).
* The full path is constructed via {@link Link()}, {@link RelativeLink()} and {@link AbsoluteLink()}.
* You can allow these segments to contain multibyte characters through {@link URLSegmentFilter::$default_allow_multibyte}.
* A page is identified during request handling via its "URLSegment" database column. As pages can be nested, the full
* path of a URL might contain multiple segments. Each segment is stored in its filtered representation (through
* {@link URLSegmentFilter}). The full path is constructed via {@link Link()}, {@link RelativeLink()} and
* {@link AbsoluteLink()}. You can allow these segments to contain multibyte characters through
* {@link URLSegmentFilter::$default_allow_multibyte}.
*
* @property integer ID ID of the SiteTree object.
* @property string URLSegment
* @property string Title
* @property string MenuTitle
@ -21,17 +20,17 @@
* @property string ShowInMenus
* @property string ShowInSearch
* @property string Sort Integer value denoting the sort order.
* @property string HasBrokenFile
* @property string HasBrokenLink
* @property string ReportClass
* @property string CanViewType Type of restriction for viewing this object.
* @property string CanEditType Type of restriction for editing this object.
*
* @method ManyManyList LinkTracking() List of site pages linked on this page.
* @method ManyManyList ImageTracking() List of Images linked on this page.
* @method ManyManyList ViewerGroups() List of groups that can view this object.
* @method ManyManyList EditorGroups() List of groups that can edit this object.
* @method ManyManyList BackLinkTracking() List of site pages that link to this page.
* @method ManyManyList ViewerGroups List of groups that can view this object.
* @method ManyManyList EditorGroups List of groups that can edit this object.
* @method ManyManyList BackLinkTracking List of site pages that link to this page.
*
* @mixin Hierarchy
* @mixin Versioned
* @mixin SiteTreeLinkTracking
*
* @package cms
*/
@ -162,8 +161,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* If this is false, the class cannot be created in the CMS by regular content authors, only by ADMINs.
* @var boolean
* @config
*/
* @config
*/
private static $can_create = true;
/**
@ -228,7 +227,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
private static $enforce_strict_hierarchy = true;
/**
* The value used for the meta generator tag. Leave blank to omit the tag.
* The value used for the meta generator tag. Leave blank to omit the tag.
*
* @config
* @var string
@ -317,8 +316,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* Note that if no model can be found, this method will fall over to a extended alternateGetByLink method provided
* by a extension attached to {@link SiteTree}
*
* @param string $link
* @param bool $cache
* @param string $link The link of the page to search for
* @param bool $cache True (default) to use caching, false to force a fresh search from the database
* @return SiteTree
*/
static public function get_by_link($link, $cache = true) {
@ -389,9 +388,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return a subclass map of SiteTree
* that shouldn't be hidden through
* {@link SiteTree::$hide_ancestor}
* Return a subclass map of SiteTree that shouldn't be hidden through {@link SiteTree::$hide_ancestor}
*
* @return array
*/
@ -414,7 +411,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
// If any of the descendents don't want any of the elders to show up, cruelly render the elders surplus to requirements.
// If any of the descendents don't want any of the elders to show up, cruelly render the elders surplus to
// requirements
if($kill_ancestors) {
$kill_ancestors = array_unique($kill_ancestors);
foreach($kill_ancestors as $mark) {
@ -430,10 +428,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Replace a "[sitetree_link id=n]" shortcode with a link to the page with the corresponding ID.
*
* @param array $arguments
* @param mixed $content
* @param object|null $parser
* @return string|void
* @param array $arguments
* @param string $content
* @param TextParser $parser
* @return string
*/
static public function link_shortcode_handler($arguments, $content = null, $parser = null) {
if(!isset($arguments['id']) || !is_numeric($arguments['id'])) return;
@ -454,14 +452,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $link;
}
}
/**
* Return the link for this {@link SiteTree} object, with the {@link Director::baseURL()} included.
*
* @param string $action Optional controller action (method).
* Note: URI encoding of this parameter is applied automatically through template casting,
* don't encode the passed parameter.
* Please use {@link Controller::join_links()} instead to append GET parameters.
* @param string $action Optional controller action (method).
* Note: URI encoding of this parameter is applied automatically through template casting,
* don't encode the passed parameter. Please use {@link Controller::join_links()} instead to
* append GET parameters.
* @return string
*/
public function Link($action = null) {
@ -483,9 +481,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Base link used for previewing. Defaults to absolute URL,
* in order to account for domain changes, e.g. on multi site setups.
* Does not contain hints about the stage, see {@link SilverStripeNavigator} for details.
* Base link used for previewing. Defaults to absolute URL, in order to account for domain changes, e.g. on multi
* site setups. Does not contain hints about the stage, see {@link SilverStripeNavigator} for details.
*
* @param string $action See {@link Link()}
* @return string
@ -501,7 +498,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Return the link for this {@link SiteTree} object relative to the SilverStripe root.
*
* By default, it this page is the current home page, and there is no action specified then this will return a link
* By default, if this page is the current home page, and there is no action specified then this will return a link
* to the root of the site. However, if you set the $action parameter to TRUE then the link will not be rewritten
* and returned in its full form.
*
@ -530,9 +527,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return Controller::join_links($base, '/', $action);
}
/**
* Get the absolute URL for this page on the Live site.
*
* @param bool $includeStageEqualsLive Whether to append the URL with ?stage=Live to force Live mode
* @return string
*/
public function getAbsoluteLiveLink($includeStageEqualsLive = true) {
$oldStage = Versioned::current_stage();
@ -552,7 +552,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* @return String
* Generates a link to edit this page in the CMS.
*
* @return string
*/
public function CMSEditLink() {
return Controller::join_links(singleton('CMSPageEditController')->Link('show'), $this->ID);
@ -569,7 +571,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Returns TRUE if this is the currently active page that is being used to handle a request.
* Returns true if this is the currently active page being used to handle this request.
*
* @return bool
*/
@ -578,8 +580,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Check if this page is in the currently active section (e.g. it is either current or one of it's children is
* currently being viewed.
* Check if this page is in the currently active section (e.g. it is either current or one of its children is
* currently being viewed).
*
* @return bool
*/
@ -590,9 +592,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Check if the parent of this page has been removed (or made otherwise unavailable), and
* is still referenced by this child. Any such orphaned page may still require access via
* the cms, but should not be shown as accessible to external users.
* Check if the parent of this page has been removed (or made otherwise unavailable), and is still referenced by
* this child. Any such orphaned page may still require access via the CMS, but should not be shown as accessible
* to external users.
*
* @return bool
*/
@ -624,8 +626,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return "link", "current" or section depending on if this page is the current page, or not on the current page but
* in the current section.
* Return "link", "current" or "section" depending on if this page is the current page, or not on the current page
* but in the current section.
*
* @return string
*/
@ -642,8 +644,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Check if this page is in the given current section.
*
* @param string $sectionName Name of the section to check.
* @return boolean True if we are in the given section.
* @param string $sectionName Name of the section to check
* @return bool True if we are in the given section
*/
public function InSection($sectionName) {
$page = Director::get_current_page();
@ -656,11 +658,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Create a duplicate of this node. Doesn't affect joined data - create a
* custom overloading of this if you need such behaviour.
* Create a duplicate of this node. Doesn't affect joined data - create a custom overloading of this if you need
* such behaviour.
*
* @param bool $doWrite
* @return SiteTree The duplicated object.
* @param bool $doWrite Whether to write the new object before returning it
* @return self The duplicated object
*/
public function duplicate($doWrite = true) {
@ -678,12 +680,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $page;
}
/**
* Duplicates each child of this node recursively and returns the
* duplicate node.
* Duplicates each child of this node recursively and returns the top-level duplicate node.
*
* @return SiteTree The duplicated object.
* @return self The duplicated object
*/
public function duplicateWithChildren() {
$clone = $this->duplicate();
@ -702,10 +702,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $clone;
}
/**
* Duplicate this node and its children as a child of the node with the
* given ID
* Duplicate this node and its children as a child of the node with the given ID
*
* @param int $id ID of the new node's new parent
*/
@ -717,8 +715,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return a breadcrumb trail to this page. Excludes "hidden" pages
* (with ShowInMenus=0).
* Return a breadcrumb trail to this page. Excludes "hidden" pages (with ShowInMenus=0) by default.
*
* @param int $maxDepth The maximum depth to traverse.
* @param boolean $unlinked Whether to link page titles.
@ -768,8 +765,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Make this page a child of another page.
*
* If the parent page does not exist, resolve it to a valid ID
* before updating this page's reference.
* If the parent page does not exist, resolve it to a valid ID before updating this page's reference.
*
* @param SiteTree|int $item Either the parent object, or the parent ID
*/
@ -785,7 +781,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Get the parent of this page.
*
* @return SiteTree Parent of this page.
* @return SiteTree Parent of this page
*/
public function getParent() {
if ($parentID = $this->getField("ParentID")) {
@ -794,8 +790,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return a string of the form "parent - page" or
* "grandparent - parent - page".
* Return a string of the form "parent - page" or "grandparent - parent - page" using page titles
*
* @param int $level The maximum amount of levels to traverse.
* @param string $separator Seperating string
@ -812,8 +807,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* This function should return true if the current user can execute this action.
* It can be overloaded to customise the security model for an application.
* This function should return true if the current user can execute this action. It can be overloaded to customise
* the security model for an application.
*
* Slightly altered from parent behaviour in {@link DataObject->can()}:
* - Checks for existence of a method named "can<$perm>()" on the object
@ -823,10 +818,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*
* @uses DataObjectDecorator->can()
*
* @param string $perm The permission to be checked, such as 'View'.
* @param Member $member The member whose permissions need checking.
* Defaults to the currently logged in user.
* @return boolean True if the the member is allowed to do the given action.
* @param string $perm The permission to be checked, such as 'View'
* @param Member $member The member whose permissions need checking. Defaults to the currently logged in user.
* @return bool True if the the member is allowed to do the given action
*/
public function can($perm, $member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
@ -846,14 +840,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return ($member && Permission::checkMember($member, $perm));
}
/**
* This function should return true if the current user can add children
* to this page. It can be overloaded to customise the security model for an
* application.
* This function should return true if the current user can add children to this page. It can be overloaded to
* customise the security model for an application.
*
* Denies permission if any of the following conditions is TRUE:
* - alternateCanAddChildren() on a extension returns FALSE
* Denies permission if any of the following conditions is true:
* - alternateCanAddChildren() on a extension returns false
* - canEdit() is not granted
* - There are no classes defined in {@link $allowed_children}
*
@ -861,8 +853,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @uses canEdit()
* @uses $allowed_children
*
* @param Member|int|null $member
* @return boolean True if the current user can add children.
* @param Member|int $member
* @return bool True if the current user can add children
*/
public function canAddChildren($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
@ -878,14 +870,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $this->canEdit($member) && $this->stat('allowed_children') != 'none';
}
/**
* This function should return true if the current user can view this
* page. It can be overloaded to customise the security model for an
* application.
* This function should return true if the current user can view this page. It can be overloaded to customise the
* security model for an application.
*
* Denies permission if any of the following conditions is TRUE:
* - canView() on any extension returns FALSE
* Denies permission if any of the following conditions is true:
* - canView() on any extension returns false
* - "CanViewType" directive is set to "Inherit" and any parent page return false for canView()
* - "CanViewType" directive is set to "LoggedInUsers" and no user is logged in
* - "CanViewType" directive is set to "OnlyTheseUsers" and user is not in the given groups
@ -893,8 +883,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @uses DataExtension->canView()
* @uses ViewerGroups()
*
* @param Member|int|null $member
* @return boolean True if the current user can view this page.
* @param Member|int $member
* @return bool True if the current user can view this page
*/
public function canView($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
@ -959,9 +949,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*
* @todo Implement in CMS UI.
*
* @param String $stage
* @param string $stage
* @param Member $member
* @return boolean
* @return bool
*/
public function canViewStage($stage = 'Live', $member = null) {
$oldMode = Versioned::get_reading_mode();
@ -974,21 +964,20 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* This function should return true if the current user can delete this
* page. It can be overloaded to customise the security model for an
* application.
* This function should return true if the current user can delete this page. It can be overloaded to customise the
* security model for an application.
*
* Denies permission if any of the following conditions is TRUE:
* - canDelete() returns FALSE on any extension
* - canEdit() returns FALSE
* - any descendant page returns FALSE for canDelete()
* Denies permission if any of the following conditions is true:
* - canDelete() returns false on any extension
* - canEdit() returns false
* - any descendant page returns false for canDelete()
*
* @uses canDelete()
* @uses SiteTreeExtension->canDelete()
* @uses canEdit()
*
* @param Member $member
* @return boolean True if the current user can delete this page.
* @return bool True if the current user can delete this page
*/
public function canDelete($member = null) {
if($member instanceof Member) $memberID = $member->ID;
@ -1012,13 +1001,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* This function should return true if the current user can create new
* pages of this class, regardless of context. It can be overloaded
* to customise the security model for an application.
* This function should return true if the current user can create new pages of this class, regardless of class. It
* can be overloaded to customise the security model for an application.
*
* By default, permission to create at the root level is based on the SiteConfig
* configuration, and permission to create beneath a parent is based on the
* ability to edit that parent page.
* By default, permission to create at the root level is based on the SiteConfig configuration, and permission to
* create beneath a parent is based on the ability to edit that parent page.
*
* Use {@link canAddChildren()} to control behaviour of creating children under this page.
*
@ -1027,9 +1014,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*
* @param Member $member
* @param array $context Optional array which may contain array('Parent' => $parentObj)
* If a parent page is known, it will be checked for validity.
* If omitted, it will be assumed this is to be created as a top level page.
* @return boolean True if the current user can create pages on this class.
* If a parent page is known, it will be checked for validity.
* If omitted, it will be assumed this is to be created as a top level page.
* @return bool True if the current user can create pages on this class.
*/
public function canCreate($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
@ -1062,23 +1049,24 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* This function should return true if the current user can edit this
* page. It can be overloaded to customise the security model for an
* application.
* This function should return true if the current user can edit this page. It can be overloaded to customise the
* security model for an application.
*
* Denies permission if any of the following conditions is TRUE:
* - canEdit() on any extension returns FALSE
* Denies permission if any of the following conditions is true:
* - canEdit() on any extension returns false
* - canView() return false
* - "CanEditType" directive is set to "Inherit" and any parent page return false for canEdit()
* - "CanEditType" directive is set to "LoggedInUsers" and no user is logged in or doesn't have the CMS_Access_CMSMAIN permission code
* - "CanEditType" directive is set to "LoggedInUsers" and no user is logged in or doesn't have the
* CMS_Access_CMSMAIN permission code
* - "CanEditType" directive is set to "OnlyTheseUsers" and user is not in the given groups
*
* @uses canView()
* @uses EditorGroups()
* @uses DataExtension->canEdit()
*
* @param Member $member Set to FALSE if you want to explicitly test permissions without a valid user (useful for unit tests)
* @return boolean True if the current user can edit this page.
* @param Member $member Set to false if you want to explicitly test permissions without a valid user (useful for
* unit tests)
* @return bool True if the current user can edit this page
*/
public function canEdit($member = null) {
if($member instanceof Member) $memberID = $member->ID;
@ -1106,18 +1094,17 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* This function should return true if the current user can publish this
* page. It can be overloaded to customise the security model for an
* application.
* This function should return true if the current user can publish this page. It can be overloaded to customise
* the security model for an application.
*
* Denies permission if any of the following conditions is TRUE:
* - canPublish() on any extension returns FALSE
* - canEdit() returns FALSE
* Denies permission if any of the following conditions is true:
* - canPublish() on any extension returns false
* - canEdit() returns false
*
* @uses SiteTreeExtension->canPublish()
*
* @param Member $member
* @return boolean True if the current user can publish this page.
* @return bool True if the current user can publish this page.
*/
public function canPublish($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) $member = Member::currentUser();
@ -1141,7 +1128,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Stub method to get the site config, provided so it's easy to override
* Stub method to get the site config, unless the current class can provide an alternate.
*
* @return SiteConfig
*/
public function getSiteConfig() {
@ -1154,13 +1143,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Pre-populate the cache of canEdit, canView, canDelete, canPublish permissions.
* This method will use the static can_(perm)_multiple method for efficiency.
*
* @param string $permission The permission: edit, view, publish, approve, etc.
* @param array $ids An array of page IDs
* @param callback|null $batchCallback The function/static method to call to calculate permissions. Defaults
* to 'SiteTree::can_(permission)_multiple'
* Pre-populate the cache of canEdit, canView, canDelete, canPublish permissions. This method will use the static
* can_(perm)_multiple method for efficiency.
*
* @param string $permission The permission: edit, view, publish, approve, etc.
* @param array $ids An array of page IDs
* @param callable|string $batchCallback The function/static method to call to calculate permissions. Defaults
* to 'SiteTree::can_(permission)_multiple'
*/
static public function prepopulate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) {
if(!$batchCallback) $batchCallback = "SiteTree::can_{$permission}_multiple";
@ -1172,26 +1161,27 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
. "with callback '$batchCallback'", E_USER_WARNING);
}
}
/**
* This method is NOT a full replacement for the individual can*() methods, e.g. {@link canEdit()}.
* Rather than checking (potentially slow) PHP logic, it relies on the database group associations,
* e.g. the "CanEditType" field plus the "SiteTree_EditorGroups" many-many table.
* By batch checking multiple records, we can combine the queries efficiently.
*
* Caches based on $typeField data. To invalidate the cache, use {@link SiteTree::reset()}
* or set the $useCached property to FALSE.
*
* @param Array $ids Of {@link SiteTree} IDs
* @param Int $memberID Member ID
* @param String $typeField A property on the data record, e.g. "CanEditType".
* @param String $groupJoinTable A many-many table name on this record, e.g. "SiteTree_EditorGroups"
* @param String $siteConfigMethod Method to call on {@link SiteConfig} for toplevel items, e.g. "canEdit"
* @param String $globalPermission If the member doesn't have this permission code, don't bother iterating deeper.
* @param Boolean $useCached
* @return Array An map of {@link SiteTree} ID keys, to boolean values
* This method is NOT a full replacement for the individual can*() methods, e.g. {@link canEdit()}. Rather than
* checking (potentially slow) PHP logic, it relies on the database group associations, e.g. the "CanEditType" field
* plus the "SiteTree_EditorGroups" many-many table. By batch checking multiple records, we can combine the queries
* efficiently.
*
* Caches based on $typeField data. To invalidate the cache, use {@link SiteTree::reset()} or set the $useCached
* property to FALSE.
*
* @param array $ids Of {@link SiteTree} IDs
* @param int $memberID Member ID
* @param string $typeField A property on the data record, e.g. "CanEditType".
* @param string $groupJoinTable A many-many table name on this record, e.g. "SiteTree_EditorGroups"
* @param string $siteConfigMethod Method to call on {@link SiteConfig} for toplevel items, e.g. "canEdit"
* @param string $globalPermission If the member doesn't have this permission code, don't bother iterating deeper
* @param bool $useCached
* @return array An map of {@link SiteTree} ID keys to boolean values
*/
static public function batch_permission_check($ids, $memberID, $typeField, $groupJoinTable, $siteConfigMethod, $globalPermission = null, $useCached = true) {
public static function batch_permission_check($ids, $memberID, $typeField, $groupJoinTable, $siteConfigMethod,
$globalPermission = null, $useCached = true) {
if($globalPermission === NULL) $globalPermission = array('CMS_ACCESS_LeftAndMain', 'CMS_ACCESS_CMSMain');
// Sanitise the IDs
@ -1225,8 +1215,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// Placeholder for parameterised ID list
$idPlaceholders = DB::placeholders($ids);
// if page can't be viewed, don't grant edit permissions
// to do - implement can_view_multiple(), so this can be enabled
// If page can't be viewed, don't grant edit permissions to do - implement can_view_multiple(), so this can
// be enabled
//$ids = array_keys(array_filter(self::can_view_multiple($ids, $memberID)));
// Get the groups that the given member belongs to
@ -1271,15 +1261,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
);
if($potentiallyInherited) {
// Group $potentiallyInherited by ParentID; we'll look at the permission of all those
// parents and then see which ones the user has permission on
// Group $potentiallyInherited by ParentID; we'll look at the permission of all those parents and
// then see which ones the user has permission on
$groupedByParent = array();
foreach($potentiallyInherited as $item) {
if($item->ParentID) {
if(!isset($groupedByParent[$item->ParentID])) $groupedByParent[$item->ParentID] = array();
$groupedByParent[$item->ParentID][] = $item->ID;
} else {
// Might return different site config based on record context, e.g. when subsites module is used
// Might return different site config based on record context, e.g. when subsites module
// is used
$siteConfig = $item->getSiteConfig();
$result[$item->ID] = $siteConfig->{$siteConfigMethod}($memberID);
}
@ -1312,15 +1303,15 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return array();
}
}
/**
* Get the 'can edit' information for a number of SiteTree pages.
*
* @param array $ids An array of IDs of the SiteTree pages to look up.
* @param int $memberID ID of member.
* @param bool $useCached Return values from the permission cache if they exist.
* @return array A map where the IDs are keys and the values are booleans stating whether the given
* page can be edited.
*
* @param array $ids An array of IDs of the SiteTree pages to look up
* @param int $memberID ID of member
* @param bool $useCached Return values from the permission cache if they exist
* @return array A map where the IDs are keys and the values are booleans stating whether the given page can be
* edited
*/
static public function can_edit_multiple($ids, $memberID, $useCached = true) {
return self::batch_permission_check($ids, $memberID, 'CanEditType', 'SiteTree_EditorGroups', 'canEditPages', null, $useCached);
@ -1328,9 +1319,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Get the 'can edit' information for a number of SiteTree pages.
* @param array $ids An array of IDs of the SiteTree pages to look up.
* @param int $memberID ID of member.
* @param bool $useCached Return values from the permission cache if they exist.
*
* @param array $ids An array of IDs of the SiteTree pages to look up
* @param int $memberID ID of member
* @param bool $useCached Return values from the permission cache if they exist
* @return array
*/
static public function can_delete_multiple($ids, $memberID, $useCached = true) {
@ -1389,23 +1381,19 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$deletable = array();
}
// Convert the array of deletable IDs into a map of the original IDs with true/false as the
// value
// Convert the array of deletable IDs into a map of the original IDs with true/false as the value
return array_fill_keys($deletable, true) + array_fill_keys($ids, false);
}
/**
* Collate selected descendants of this page.
*
* {@link $condition} will be evaluated on each descendant, and if it is
* succeeds, that item will be added to the $collator array.
* {@link $condition} will be evaluated on each descendant, and if it is succeeds, that item will be added to the
* $collator array.
*
* @param string $condition The PHP condition to be evaluated. The page
* will be called $item
* @param array $collator An array, passed by reference, to collect all
* of the matching descendants.
* @return true|void
* @param string $condition The PHP condition to be evaluated. The page will be called $item
* @param array $collator An array, passed by reference, to collect all of the matching descendants.
* @return bool
*/
public function collateDescendants($condition, &$collator) {
if($children = $this->Children()) {
@ -1417,13 +1405,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
/**
* Return the title, description, keywords and language metatags.
*
*
* @todo Move <title> tag in separate getter for easier customization and more obvious usage
*
* @param boolean|string $includeTitle Show default <title>-tag, set to false for custom templating
*
* @param bool $includeTitle Show default <title>-tag, set to false for custom templating
* @return string The XHTML metatags
*/
public function MetaTags($includeTitle = true) {
@ -1460,29 +1447,23 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $tags;
}
/**
* Returns the object that contains the content that a user would
* associate with this page.
* Returns the object that contains the content that a user would associate with this page.
*
* Ordinarily, this is just the page itself, but for example on
* RedirectorPages or VirtualPages ContentSource() will return the page
* that is linked to.
* Ordinarily, this is just the page itself, but for example on RedirectorPages or VirtualPages ContentSource() will
* return the page that is linked to.
*
* @return SiteTree The content source.
* @return $this
*/
public function ContentSource() {
return $this;
}
/**
* Add default records to database.
*
* This function is called whenever the database is built, after the
* database tables have all been created. Overload this to add default
* records when the database is built, but make sure you call
* parent::requireDefaultRecords().
* This function is called whenever the database is built, after the database tables have all been created. Overload
* this to add default records when the database is built, but make sure you call parent::requireDefaultRecords().
*/
public function requireDefaultRecords() {
parent::requireDefaultRecords();
@ -1534,9 +1515,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
//------------------------------------------------------------------------------------//
protected function onBeforeWrite() {
parent::onBeforeWrite();
@ -1574,10 +1552,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$fieldsIgnoredByVersioning = array('HasBrokenLink', 'Status', 'HasBrokenFile', 'ToDo', 'VersionID', 'SaveCount');
$changedFields = array_keys($this->getChangedFields(true, 2));
// This more rigorous check is inline with the test that write()
// does to dedcide whether or not to write to the DB. We use that
// to avoid cluttering the system with a migrateVersion() call
// that doesn't get used
// This more rigorous check is inline with the test that write() does to dedcide whether or not to write to the
// DB. We use that to avoid cluttering the system with a migrateVersion() call that doesn't get used
$oneChangedFields = array_keys($this->getChangedFields(true, 1));
if($oneChangedFields && !array_diff($changedFields, $fieldsIgnoredByVersioning)) {
@ -1621,7 +1597,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
public function onAfterDelete() {
// Need to flush cache to avoid outdated versionnumber references
$this->flushCache();
@ -1680,11 +1655,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Returns TRUE if this object has a URLSegment value that does not conflict with any other objects. This methods
* Returns true if this object has a URLSegment value that does not conflict with any other objects. This method
* checks for:
* - A page with the same URLSegment that has a conflict.
* - Conflicts with actions on the parent page.
* - A conflict caused by a root page having the same URLSegment as a class name.
* - A page with the same URLSegment that has a conflict
* - Conflicts with actions on the parent page
* - A conflict caused by a root page having the same URLSegment as a class name
*
* @return bool
*/
@ -1725,13 +1700,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Generate a URL segment based on the title provided.
*
*
* If {@link Extension}s wish to alter URL segment generation, they can do so by defining
* updateURLSegment(&$url, $title). $url will be passed by reference and should be modified.
* $title will contain the title that was originally used as the source of this generated URL.
* This lets extensions either start from scratch, or incrementally modify the generated URL.
* updateURLSegment(&$url, $title). $url will be passed by reference and should be modified. $title will contain
* the title that was originally used as the source of this generated URL. This lets extensions either start from
* scratch, or incrementally modify the generated URL.
*
* @param string $title Page title.
* @param string $title Page title
* @return string Generated url segment
*/
public function generateURLSegment($title){
@ -1748,6 +1723,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Gets the URL segment for the latest draft version of this page.
*
* @return string
*/
public function getStageURLSegment() {
@ -1758,6 +1735,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Gets the URL segment for the currently published version of this page.
*
* @return string
*/
public function getLiveURLSegment() {
@ -1768,8 +1747,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Rewrite a file URL on this page, after its been renamed.
* Triggers the onRenameLinkedAsset action on extensions.
* Rewrite a file URL on this page, after its been renamed. Triggers the onRenameLinkedAsset action on extensions.
*/
public function rewriteFileURL($old, $new) {
$fields = $this->inheritedDatabaseFields();
@ -1805,8 +1783,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Returns the pages that depend on this page.
* This includes virtual pages, pages that link to it, etc.
* Returns the pages that depend on this page. This includes virtual pages, pages that link to it, etc.
*
* @param bool $includeVirtuals Set to false to exlcude virtual pages.
* @return ArrayList
@ -1863,7 +1840,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return all virtual pages that link to this page
* Return all virtual pages that link to this page.
*
* @return DataList
*/
public function VirtualPages() {
@ -1891,14 +1870,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Returns a FieldList with which to create the main editing form.
*
* You can override this in your child classes to add extra fields - first
* get the parent fields using parent::getCMSFields(), then use
* addFieldToTab() on the FieldList.
*
* See {@link getSettingsFields()} for a different set of fields
* concerned with configuration aspects on the record, e.g. access control
* You can override this in your child classes to add extra fields - first get the parent fields using
* parent::getCMSFields(), then use addFieldToTab() on the FieldList.
*
* @return FieldList The fields to be displayed in the CMS.
* See {@link getSettingsFields()} for a different set of fields concerned with configuration aspects on the record,
* e.g. access control.
*
* @return FieldList The fields to be displayed in the CMS
*/
public function getCMSFields() {
require_once("forms/Form.php");
@ -2079,8 +2057,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Returns fields related to configuration aspects on this record, e.g. access control.
* See {@link getCMSFields()} for content-related fields.
* Returns fields related to configuration aspects on this record, e.g. access control. See {@link getCMSFields()}
* for content-related fields.
*
* @return FieldList
*/
@ -2139,10 +2117,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$visibility->setTitle($this->fieldLabel('Visibility'));
/*
* This filter ensures that the ParentID dropdown selection does not show this node,
* or its descendents, as this causes vanishing bugs.
*/
// This filter ensures that the ParentID dropdown selection does not show this node,
// or its descendents, as this causes vanishing bugs
$parentIDField->setFilterFunction(create_function('$node', "return \$node->ID != {$this->ID};"));
$parentTypeSelector->addExtraClass('parentTypeSelector');
@ -2195,9 +2172,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
*
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
* @return array|string
* @param bool $includerelations A boolean value to indicate if the labels returned should include relation fields
* @return array
*/
public function fieldLabels($includerelations = true) {
$cacheKey = $this->class . '_' . $includerelations;
@ -2238,17 +2214,15 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return self::$_cache_field_labels[$cacheKey];
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Get the actions available in the CMS for this page - eg Save, Publish.
*
* Frontend scripts and styles know how to handle the following FormFields:
* * top-level FormActions appear as standalone buttons
* * top-level CompositeField with FormActions within appear as grouped buttons
* * TabSet & Tabs appear as a drop ups
* * FormActions within the Tab are restyled as links
* * major actions can provide alternate states for richer presentation (see ssui.button widget extension).
* - top-level FormActions appear as standalone buttons
* - top-level CompositeField with FormActions within appear as grouped buttons
* - TabSet & Tabs appear as a drop ups
* - FormActions within the Tab are restyled as links
* - major actions can provide alternate states for richer presentation (see ssui.button widget extension)
*
* @return FieldList The available actions for this page.
*/
@ -2491,7 +2465,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Restore the content in the active copy of this SiteTree page to the stage site.
* @return The SiteTree object.
*
* @return self
*/
public function doRestoreToStage() {
// if no record can be found on draft stage (meaning it has been "deleted from draft" before),
@ -2529,17 +2504,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Check if this page is new - that is, if it has yet to have been written
* to the database.
* Check if this page is new - that is, if it has yet to have been written to the database.
*
* @return boolean True if this page is new.
* @return bool
*/
public function isNew() {
/**
* This check was a problem for a self-hosted site, and may indicate a
* bug in the interpreter on their server, or a bug here
* Changing the condition from empty($this->ID) to
* !$this->ID && !$this->record['ID'] fixed this.
* This check was a problem for a self-hosted site, and may indicate a bug in the interpreter on their server,
* or a bug here. Changing the condition from empty($this->ID) to !$this->ID && !$this->record['ID'] fixed this.
*/
if(empty($this->ID)) return true;
@ -2552,7 +2524,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
/**
* Check if this page has been published.
*
* @return boolean True if this page has been published.
* @return bool
*/
public function isPublished() {
if($this->isNew())
@ -2564,10 +2536,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Get the class dropdown used in the CMS to change the class of a page.
* This returns the list of options in the drop as a Map from class name
* to text in dropdown. Filters by {@link SiteTree->canCreate()},
* as well as {@link SiteTree::$needs_permission}.
* Get the class dropdown used in the CMS to change the class of a page. This returns the list of options in the
* dropdown as a Map from class name to singular name. Filters by {@link SiteTree->canCreate()}, as well as
* {@link SiteTree::$needs_permission}.
*
* @return array
*/
@ -2580,7 +2551,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
foreach($classes as $class) {
$instance = singleton($class);
// if the current page type is this the same as the class type always show the page type in the list see open ticket 5880 for why
// if the current page type is this the same as the class type always show the page type in the list
if ($this->ClassName != $instance->ClassName) {
if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
}
@ -2594,10 +2565,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$currentClass = $class;
$result[$class] = $pageTypeName;
// if we're in translation mode, the link between the translated pagetype
// title and the actual classname might not be obvious, so we add it in parantheses
// Example: class "RedirectorPage" has the title "Weiterleitung" in German,
// so it shows up as "Weiterleitung (RedirectorPage)"
// If we're in translation mode, the link between the translated pagetype title and the actual classname
// might not be obvious, so we add it in parantheses. Example: class "RedirectorPage" has the title
// "Weiterleitung" in German, so it shows up as "Weiterleitung (RedirectorPage)"
if(i18n::get_lang_from_locale(i18n::get_locale()) != 'en') {
$result[$class] = $result[$class] . " ({$class})";
}
@ -2616,20 +2586,18 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $result;
}
/**
* Returns an array of the class names of classes that are allowed
* to be children of this class.
* Returns an array of the class names of classes that are allowed to be children of this class.
*
* @return array
* @return string[]
*/
public function allowedChildren() {
$allowedChildren = array();
$candidates = $this->stat('allowed_children');
if($candidates && $candidates != "none" && $candidates != "SiteTree_root") {
foreach($candidates as $candidate) {
// If a classname is prefixed by "*", such as "*Page", then only that
// class is allowed - no subclasses. Otherwise, the class and all its subclasses are allowed.
// If a classname is prefixed by "*", such as "*Page", then only that class is allowed - no subclasses.
// Otherwise, the class and all its subclasses are allowed.
if(substr($candidate,0,1) == '*') {
$allowedChildren[] = substr($candidate,1);
} else {
@ -2644,7 +2612,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $allowedChildren;
}
/**
* Returns the class name of the default class for children of this page.
*
@ -2660,10 +2627,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
/**
* Returns the class name of the default class for the parent of this
* page.
* Returns the class name of the default class for the parent of this page.
*
* @return string
*/
@ -2672,8 +2637,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Get the title for use in menus for this page. If the MenuTitle
* field is set it returns that, else it returns the Title field.
* Get the title for use in menus for this page. If the MenuTitle field is set it returns that, else it returns the
* Title field.
*
* @return string
*/
@ -2700,19 +2665,18 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* A flag provides the user with additional data about the current page status,
* for example a "removed from draft" status. Each page can have more than one status flag.
* Returns a map of a unique key to a (localized) title for the flag.
* The unique key can be reused as a CSS class.
* Use the 'updateStatusFlags' extension point to customize the flags.
* A flag provides the user with additional data about the current page status, for example a "removed from draft"
* status. Each page can have more than one status flag. Returns a map of a unique key to a (localized) title for
* the flag. The unique key can be reused as a CSS class. Use the 'updateStatusFlags' extension point to customize
* the flags.
*
* Example (simple):
* "deletedonlive" => "Deleted"
* "deletedonlive" => "Deleted"
*
* Example (with optional title attribute):
* "deletedonlive" => array('text' => "Deleted", 'title' => 'This page has been deleted')
* "deletedonlive" => array('text' => "Deleted", 'title' => 'This page has been deleted')
*
* @param Boolean $cached
* @param bool $cached Whether to serve the fields from cache; false regenerate them
* @return array
*/
public function getStatusFlags($cached = true) {
@ -2751,11 +2715,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* getTreeTitle will return three <span> html DOM elements, an empty <span> with
* the class 'jstree-pageicon' in front, following by a <span> wrapping around its
* MenutTitle, then following by a <span> indicating its publication status.
* getTreeTitle will return three <span> html DOM elements, an empty <span> with the class 'jstree-pageicon' in
* front, following by a <span> wrapping around its MenutTitle, then following by a <span> indicating its
* publication status.
*
* @return string a html string ready to be directly used in a template
* @return string An HTML string ready to be directly used in a template
*/
public function getTreeTitle() {
// Build the list of candidate children
@ -2788,8 +2752,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Returns the page in the current page stack of the given level.
* Level(1) will return the main menu item that we're currently inside, etc.
* Returns the page in the current page stack of the given level. Level(1) will return the main menu item that
* we're currently inside, etc.
*
* @param int $level
* @return SiteTree
*/
public function Level($level) {
$parent = $this;
@ -2802,7 +2769,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return the CSS classes to apply to this node in the CMS tree
* Return the CSS classes to apply to this node in the CMS tree.
*
* @param string $numChildrenMethod
* @return string
@ -2840,11 +2807,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Compares current draft with live version,
* and returns TRUE if no draft version of this page exists,
* but the page is still published (after triggering "Delete from draft site" in the CMS).
* Compares current draft with live version, and returns true if no draft version of this page exists but the page
* is still published (eg, after triggering "Delete from draft site" in the CMS).
*
* @return boolean
* @return bool
*/
public function getIsDeletedFromStage() {
if(!$this->ID) return true;
@ -2852,26 +2818,27 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
// Return true for both completely deleted pages and for pages just deleted from stage.
// Return true for both completely deleted pages and for pages just deleted from stage
return !($stageVersion);
}
/**
* Return true if this page exists on the live site
*
* @return bool
*/
public function getExistsOnLive() {
return (bool)Versioned::get_versionnumber_by_stage('SiteTree', 'Live', $this->ID);
}
/**
* Compares current draft with live version,
* and returns TRUE if these versions differ,
* meaning there have been unpublished changes to the draft site.
* Compares current draft with live version, and returns true if these versions differ, meaning there have been
* unpublished changes to the draft site.
*
* @return boolean
* @return bool
*/
public function getIsModifiedOnStage() {
// new unsaved pages could be never be published
// New unsaved pages could be never be published
if($this->isNew()) return false;
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
@ -2884,14 +2851,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Compares current draft with live version,
* and returns true if no live version exists,
* meaning the page was never published.
* Compares current draft with live version, and returns true if no live version exists, meaning the page was never
* published.
*
* @return boolean
* @return bool
*/
public function getIsAddedToStage() {
// new unsaved pages could be never be published
// New unsaved pages could be never be published
if($this->isNew()) return false;
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
@ -2901,18 +2867,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Stops extendCMSFields() being called on getCMSFields().
* This is useful when you need access to fields added by subclasses
* of SiteTree in a extension. Call before calling parent::getCMSFields(),
* and reenable afterwards.
* Stops extendCMSFields() being called on getCMSFields(). This is useful when you need access to fields added by
* subclasses of SiteTree in a extension. Call before calling parent::getCMSFields(), and reenable afterwards.
*/
static public function disableCMSFieldsExtensions() {
self::$runCMSFieldsExtensions = false;
}
/**
* Reenables extendCMSFields() being called on getCMSFields() after
* it has been disabled by disableCMSFieldsExtensions().
* Reenables extendCMSFields() being called on getCMSFields() after it has been disabled by
* disableCMSFieldsExtensions().
*/
static public function enableCMSFieldsExtensions() {
self::$runCMSFieldsExtensions = true;
@ -2954,9 +2918,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Return the translated Singular name
* Return the translated Singular name.
*
* @return String
* @return string
*/
public function i18n_singular_name() {
// Convert 'Page' to 'SiteTree' for correct localization lookups
@ -2965,8 +2929,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
/**
* Overloaded to also provide entities for 'Page' class which is usually
* located in custom code, hence textcollector picks it up for the wrong folder.
* Overloaded to also provide entities for 'Page' class which is usually located in custom code, hence textcollector
* picks it up for the wrong folder.
*
* @return array
*/
public function provideI18nEntities() {
$entities = parent::provideI18nEntities();
@ -2984,12 +2950,20 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $entities;
}
/**
* Returns 'root' if the current page has no parent, or 'subpage' otherwise
*
* @return string
*/
public function getParentType() {
return $this->ParentID == 0 ? 'root' : 'subpage';
}
static public function reset() {
/**
* Clear the permissions cache for SiteTree
*/
public static function reset() {
self::$cache_permissions = array();
}

View File

@ -1,18 +1,18 @@
<?php
/**
* Adds tracking of links in any HTMLText fields which reference SiteTree or File items. Attaching this to any
* DataObject will add four fields which contain all links to SiteTree and File items referenced in any HTMLText fields,
* and two booleans to indicate if there are any broken links.
* Adds tracking of links in any HTMLText fields which reference SiteTree or File items.
*
* SiteTreeLinkTracking provides augmentSyncLinkTracking as an entry point for the tracking updater.
* Attaching this to any DataObject will add four fields which contain all links to SiteTree and File items
* referenced in any HTMLText fields, and two booleans to indicate if there are any broken links. Call
* augmentSyncLinkTracking to update those fields with any changes to those fields.
*
* Additionally, a SiteTreeLinkTracking_Highlighter extension is provided which, when applied to HtmlEditorField,
* will reuse the link SiteTreeLinkTracking's parser to add "ss-broken" classes to all broken links found this way.
* The resulting class will be saved to the Content on the subsequent write operation. If links are found to be
* no longer broken, the class will be removed on the next write.
* @property SiteTree owner
*
* The underlying SiteTreeLinkTracking_Parser can recognise broken internal links, broken internal anchors, and some
* typical broken links such as empty href, or a link starting with a slash.
* @property bool HasBrokenFile
* @property bool HasBrokenLink
*
* @method ManyManyList LinkTracking List of site pages linked on this page.
* @method ManyManyList ImageTracking List of Images linked on this page.
*/
class SiteTreeLinkTracking extends DataExtension {
@ -37,6 +37,11 @@ class SiteTreeLinkTracking extends DataExtension {
"ImageTracking" => array("FieldName" => "Varchar")
);
/**
* Scrape the content of a field to detect anly links to local SiteTree pages or files
*
* @param string $fieldName The name of the field on {@link @owner} to scrape
*/
public function trackLinksInField($fieldName) {
$record = $this->owner;
@ -137,6 +142,9 @@ class SiteTreeLinkTracking extends DataExtension {
}
}
/**
* Find HTMLText fields on {@link owner} to scrape for links that need tracking
*/
public function augmentSyncLinkTracking() {
// Reset boolean broken flags
$this->owner->HasBrokenLink = false;

View File

@ -86,14 +86,17 @@ class BrokenLinksReport extends SS_Report {
$dateTitle = _t('BrokenLinksReport.ColumnDateLastPublished', 'Date last published');
}
$linkBase = singleton('CMSPageEditController')->Link('show') . '/';
$linkBase = singleton('CMSPageEditController')->Link('show');
$fields = array(
"Title" => array(
"title" => _t('BrokenLinksReport.PageName', 'Page name'),
'formatting' => sprintf(
'<a href=\"' . $linkBase . '$ID\" title=\"%s\">$value</a>',
_t('BrokenLinksReport.HoverTitleEditPage', 'Edit page')
)
'formatting' => function($value, $item) use ($linkBase) {
return sprintf('<a href=\"%s\" title=\"%s\">%s</a>',
Controller::join_links($linkBase, $item->ID),
_t('BrokenLinksReport.HoverTitleEditPage', 'Edit page'),
$value
);
}
),
"LastEdited" => array(
"title" => $dateTitle,

View File

@ -27,7 +27,7 @@ class ContentControllerSearchExtension extends Extension {
$actions = new FieldList(
new FormAction('results', _t('SearchForm.GO', 'Go'))
);
$form = new SearchForm($this->owner, 'SearchForm', $fields, $actions);
$form = SearchForm::create($this->owner, 'SearchForm', $fields, $actions);
$form->classesToSearch(FulltextSearchable::get_searchable_classes());
return $form;
}

View File

@ -4,42 +4,42 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
} else {
ss.i18n.addDictionary('id', {
"CMSMAIN.WARNINGSAVEPAGESBEFOREADDING": "You have to save a page before adding children underneath it",
"CMSMAIN.CANTADDCHILDREN": "You can't add children to the selected node",
"CMSMAIN.ERRORADDINGPAGE": "Error adding page",
"CMSMAIN.FILTEREDTREE": "Filtered tree to only show changed pages",
"CMSMAIN.ERRORFILTERPAGES": "Could not filter tree to only show changed pages<br />%s",
"CMSMAIN.ERRORUNFILTER": "Unfiltered tree",
"CMSMAIN.PUBLISHINGPAGES": "Publishing pages...",
"CMSMAIN.SELECTONEPAGE": "Mohon pilih minimal 1 halaman.",
"CMSMAIN.ERRORPUBLISHING": "Error publishing pages",
"CMSMAIN.REALLYDELETEPAGES": "Do you really want to delete the %s marked pages?",
"CMSMAIN.DELETINGPAGES": "Sedang menghapus halaman...",
"CMSMAIN.ERRORDELETINGPAGES": "Error deleting pages",
"CMSMAIN.PUBLISHING": "Publishing...",
"CMSMAIN.RESTORING": "Sedang pemulihan",
"CMSMAIN.ERRORREVERTING": "Error reverting to live content",
"CMSMAIN.SAVING": "Sedang menyimpan...",
"CMSMAIN.SELECTMOREPAGES": "You have %s pages selected.\n\nDo you really want to perform this action?",
"CMSMAIN.ALERTCLASSNAME": "The page type will be updated after the page is saved",
"CMSMAIN.URLSEGMENTVALIDATION": "URLs can only be made up of letters, digits and hyphens.",
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Apakah kamu yakin akan menghapus %s map?",
"AssetTableField.REALLYDELETE": "Do you really want to delete the marked files?",
"AssetTableField.MOVING": "Memindahkan %s berkas(s)",
"CMSMAIN.AddSearchCriteria": "Tambah kriteria",
"WidgetAreaEditor.TOOMANY": "Sorry, you have reached the maximum number of widgets in this area",
"AssetAdmin.ConfirmDelete": "Do you really want to delete this folder and all contained files?",
"Folder.Name": "Nama map",
"Tree.AddSubPage": "Tambah halaman baru di sini",
"Tree.Duplicate": "Duplikasi",
"Tree.EditPage": "Ubah",
"Tree.ThisPageOnly": "Hanya halaman ini",
"Tree.ThisPageAndSubpages": "This page and subpages",
"Tree.ShowAsList": "Show children as list",
"CMSMain.ConfirmRestoreFromLive": "Do you really want to copy the published content to the draft site?",
"CMSMain.RollbackToVersion": "Do you really want to roll back to version #%s of this page?",
"URLSEGMENT.Edit": "Ubah",
"URLSEGMENT.OK": "Oke",
"CMSMAIN.WARNINGSAVEPAGESBEFOREADDING": "Anda harus menyimpan laman sebelum menambahkan laman turunan.",
"CMSMAIN.CANTADDCHILDREN": "Anda tidak dapat menambahkan turunan pada simpul terpilih",
"CMSMAIN.ERRORADDINGPAGE": "Ada kesalahan menambahkan laman",
"CMSMAIN.FILTEREDTREE": "Hanya menampilkan laman yang berubah",
"CMSMAIN.ERRORFILTERPAGES": "Tidak dapat menyaring laman<br />%s",
"CMSMAIN.ERRORUNFILTER": "Tak tersaring",
"CMSMAIN.PUBLISHINGPAGES": "Menerbitkan laman...",
"CMSMAIN.SELECTONEPAGE": "Mohon pilih minimal 1 laman.",
"CMSMAIN.ERRORPUBLISHING": "Ada kesalahan menerbitkan laman",
"CMSMAIN.REALLYDELETEPAGES": "Anda ingin menghapus laman %s yang ditandai?",
"CMSMAIN.DELETINGPAGES": "Menghapus laman...",
"CMSMAIN.ERRORDELETINGPAGES": "Ada kesalahan menghapus laman",
"CMSMAIN.PUBLISHING": "Menerbitkan...",
"CMSMAIN.RESTORING": "Memulihkan...",
"CMSMAIN.ERRORREVERTING": "Ada kesalahan mengembalikan konten",
"CMSMAIN.SAVING": "Menyimpan...",
"CMSMAIN.SELECTMOREPAGES": "Anda memilih %s laman.\n\nAnda ingin melanjutkan?",
"CMSMAIN.ALERTCLASSNAME": "Jenis laman akan diperbarui setelah laman disimpan",
"CMSMAIN.URLSEGMENTVALIDATION": "URL hanya boleh terdiri dari huruf, angka dan tanda sambung.",
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Anda ingin menghapus folder %s?",
"AssetTableField.REALLYDELETE": "Anda ingin menghapus berkas yang ditandai?",
"AssetTableField.MOVING": "Memindahkan %s berkas",
"CMSMAIN.AddSearchCriteria": "Tambah Kriteria",
"WidgetAreaEditor.TOOMANY": "Maaf, Anda mencapai jumlah maksimal widget di area ini",
"AssetAdmin.ConfirmDelete": "Anda ingin menghapus folder dan berkas di dalamnya?",
"Folder.Name": "Nama folder",
"Tree.AddSubPage": "Tambah laman baru di sini",
"Tree.Duplicate": "Gandakan",
"Tree.EditPage": "Edit",
"Tree.ThisPageOnly": "Hanya laman ini",
"Tree.ThisPageAndSubpages": "Laman dan sublaman ini",
"Tree.ShowAsList": "Tampilkan turunan sebagai daftar",
"CMSMain.ConfirmRestoreFromLive": "Apakah Anda ingin menyalin konten yang sudah terbit ke draf?",
"CMSMain.RollbackToVersion": "Apakah Anda ingin kembali ke versi #%s dari laman ini?",
"URLSEGMENT.Edit": "Edit",
"URLSEGMENT.OK": "OK",
"URLSEGMENT.Cancel": "Batal"
});
}

View File

@ -1,39 +1,39 @@
{
"CMSMAIN.WARNINGSAVEPAGESBEFOREADDING": "You have to save a page before adding children underneath it",
"CMSMAIN.CANTADDCHILDREN": "You can't add children to the selected node",
"CMSMAIN.ERRORADDINGPAGE": "Error adding page",
"CMSMAIN.FILTEREDTREE": "Filtered tree to only show changed pages",
"CMSMAIN.ERRORFILTERPAGES": "Could not filter tree to only show changed pages<br />%s",
"CMSMAIN.ERRORUNFILTER": "Unfiltered tree",
"CMSMAIN.PUBLISHINGPAGES": "Publishing pages...",
"CMSMAIN.SELECTONEPAGE": "Mohon pilih minimal 1 halaman.",
"CMSMAIN.ERRORPUBLISHING": "Error publishing pages",
"CMSMAIN.REALLYDELETEPAGES": "Do you really want to delete the %s marked pages?",
"CMSMAIN.DELETINGPAGES": "Sedang menghapus halaman...",
"CMSMAIN.ERRORDELETINGPAGES": "Error deleting pages",
"CMSMAIN.PUBLISHING": "Publishing...",
"CMSMAIN.RESTORING": "Sedang pemulihan",
"CMSMAIN.ERRORREVERTING": "Error reverting to live content",
"CMSMAIN.SAVING": "Sedang menyimpan...",
"CMSMAIN.SELECTMOREPAGES": "You have %s pages selected.\n\nDo you really want to perform this action?",
"CMSMAIN.ALERTCLASSNAME": "The page type will be updated after the page is saved",
"CMSMAIN.URLSEGMENTVALIDATION": "URLs can only be made up of letters, digits and hyphens.",
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Apakah kamu yakin akan menghapus %s map?",
"AssetTableField.REALLYDELETE": "Do you really want to delete the marked files?",
"AssetTableField.MOVING": "Memindahkan %s berkas(s)",
"CMSMAIN.AddSearchCriteria": "Tambah kriteria",
"WidgetAreaEditor.TOOMANY": "Sorry, you have reached the maximum number of widgets in this area",
"AssetAdmin.ConfirmDelete": "Do you really want to delete this folder and all contained files?",
"Folder.Name": "Nama map",
"Tree.AddSubPage": "Tambah halaman baru di sini",
"Tree.Duplicate": "Duplikasi",
"Tree.EditPage": "Ubah",
"Tree.ThisPageOnly": "Hanya halaman ini",
"Tree.ThisPageAndSubpages": "This page and subpages",
"Tree.ShowAsList": "Show children as list",
"CMSMain.ConfirmRestoreFromLive": "Do you really want to copy the published content to the draft site?",
"CMSMain.RollbackToVersion": "Do you really want to roll back to version #%s of this page?",
"URLSEGMENT.Edit": "Ubah",
"URLSEGMENT.OK": "Oke",
"CMSMAIN.WARNINGSAVEPAGESBEFOREADDING": "Anda harus menyimpan laman sebelum menambahkan laman turunan.",
"CMSMAIN.CANTADDCHILDREN": "Anda tidak dapat menambahkan turunan pada simpul terpilih",
"CMSMAIN.ERRORADDINGPAGE": "Ada kesalahan menambahkan laman",
"CMSMAIN.FILTEREDTREE": "Hanya menampilkan laman yang berubah",
"CMSMAIN.ERRORFILTERPAGES": "Tidak dapat menyaring laman<br />%s",
"CMSMAIN.ERRORUNFILTER": "Tak tersaring",
"CMSMAIN.PUBLISHINGPAGES": "Menerbitkan laman...",
"CMSMAIN.SELECTONEPAGE": "Mohon pilih minimal 1 laman.",
"CMSMAIN.ERRORPUBLISHING": "Ada kesalahan menerbitkan laman",
"CMSMAIN.REALLYDELETEPAGES": "Anda ingin menghapus laman %s yang ditandai?",
"CMSMAIN.DELETINGPAGES": "Menghapus laman...",
"CMSMAIN.ERRORDELETINGPAGES": "Ada kesalahan menghapus laman",
"CMSMAIN.PUBLISHING": "Menerbitkan...",
"CMSMAIN.RESTORING": "Memulihkan...",
"CMSMAIN.ERRORREVERTING": "Ada kesalahan mengembalikan konten",
"CMSMAIN.SAVING": "Menyimpan...",
"CMSMAIN.SELECTMOREPAGES": "Anda memilih %s laman.\n\nAnda ingin melanjutkan?",
"CMSMAIN.ALERTCLASSNAME": "Jenis laman akan diperbarui setelah laman disimpan",
"CMSMAIN.URLSEGMENTVALIDATION": "URL hanya boleh terdiri dari huruf, angka dan tanda sambung.",
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Anda ingin menghapus folder %s?",
"AssetTableField.REALLYDELETE": "Anda ingin menghapus berkas yang ditandai?",
"AssetTableField.MOVING": "Memindahkan %s berkas",
"CMSMAIN.AddSearchCriteria": "Tambah Kriteria",
"WidgetAreaEditor.TOOMANY": "Maaf, Anda mencapai jumlah maksimal widget di area ini",
"AssetAdmin.ConfirmDelete": "Anda ingin menghapus folder dan berkas di dalamnya?",
"Folder.Name": "Nama folder",
"Tree.AddSubPage": "Tambah laman baru di sini",
"Tree.Duplicate": "Gandakan",
"Tree.EditPage": "Edit",
"Tree.ThisPageOnly": "Hanya laman ini",
"Tree.ThisPageAndSubpages": "Laman dan sublaman ini",
"Tree.ShowAsList": "Tampilkan turunan sebagai daftar",
"CMSMain.ConfirmRestoreFromLive": "Apakah Anda ingin menyalin konten yang sudah terbit ke draf?",
"CMSMain.RollbackToVersion": "Apakah Anda ingin kembali ke versi #%s dari laman ini?",
"URLSEGMENT.Edit": "Edit",
"URLSEGMENT.OK": "OK",
"URLSEGMENT.Cancel": "Batal"
}

View File

@ -6,7 +6,7 @@
"CMSMAIN.ERRORFILTERPAGES": "Kunde inte filtrera trädet för att visa enbart ändrade sidor<br />%s",
"CMSMAIN.ERRORUNFILTER": "Ofiltrerat träd",
"CMSMAIN.PUBLISHINGPAGES": "Publicerar sidor...",
"CMSMAIN.SELECTONEPAGE": "Vänligen välj åtminståne 1 sida.",
"CMSMAIN.SELECTONEPAGE": "Vänligen välj åtminstone 1 sida.",
"CMSMAIN.ERRORPUBLISHING": "Ett fel uppstod när sidorna skulle publiceras",
"CMSMAIN.REALLYDELETEPAGES": "Vill du verkligen radera de %s markerade sidorna?",
"CMSMAIN.DELETINGPAGES": "Raderar sidor...",
@ -21,7 +21,7 @@
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Vill du verkligen radera %s mappar?",
"AssetTableField.REALLYDELETE": "Vill du verkligen radera de markerade filerna?",
"AssetTableField.MOVING": "Flyttar %s fil(er)",
"CMSMAIN.AddSearchCriteria": "Lägg till kriterie",
"CMSMAIN.AddSearchCriteria": "Lägg till kriterium",
"WidgetAreaEditor.TOOMANY": "Du har tyvärr nått max antal widgetar i detta område.",
"AssetAdmin.ConfirmDelete": "Vill du verkligen radera denna mapp och alla filer i den?",
"Folder.Name": "Mappnamn",

View File

@ -11,7 +11,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
"CMSMAIN.ERRORFILTERPAGES": "Kunde inte filtrera trädet för att visa enbart ändrade sidor<br />%s",
"CMSMAIN.ERRORUNFILTER": "Ofiltrerat träd",
"CMSMAIN.PUBLISHINGPAGES": "Publicerar sidor...",
"CMSMAIN.SELECTONEPAGE": "Vänligen välj åtminståne 1 sida.",
"CMSMAIN.SELECTONEPAGE": "Vänligen välj åtminstone 1 sida.",
"CMSMAIN.ERRORPUBLISHING": "Ett fel uppstod när sidorna skulle publiceras",
"CMSMAIN.REALLYDELETEPAGES": "Vill du verkligen radera de %s markerade sidorna?",
"CMSMAIN.DELETINGPAGES": "Raderar sidor...",
@ -26,7 +26,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
"AssetAdmin.BATCHACTIONSDELETECONFIRM": "Vill du verkligen radera %s mappar?",
"AssetTableField.REALLYDELETE": "Vill du verkligen radera de markerade filerna?",
"AssetTableField.MOVING": "Flyttar %s fil(er)",
"CMSMAIN.AddSearchCriteria": "Lägg till kriterie",
"CMSMAIN.AddSearchCriteria": "Lägg till kriterium",
"WidgetAreaEditor.TOOMANY": "Du har tyvärr nått max antal widgetar i detta område.",
"AssetAdmin.ConfirmDelete": "Vill du verkligen radera denna mapp och alla filer i den?",
"Folder.Name": "Mappnamn",

View File

@ -238,7 +238,7 @@ cs:
HASBEENSETUP: 'Přesměrovací stránka byla nastavena bez cíle.'
HEADER: 'Tato stránka přesměruje uživatele na jinou stránku'
OTHERURL: 'Jiná web adresa'
PLURALNAME: 'Přesměrovací stránky'
PLURALNAME: 'Přesměrovací stránka'
REDIRECTTO: 'Přesměrovat na'
REDIRECTTOEXTERNAL: 'Jiná web stránka'
REDIRECTTOPAGE: 'Stránka na vašem webu'

View File

@ -200,6 +200,8 @@ de:
415: '415 - nicht-unterstützer Medientyp'
416: '416 - Anfragebereich nicht erfüllbar'
417: '417 - Erwartung nicht erfüllt'
422: '422 - Verarbeitung abgelehnt'
429: '429 - Zu viele Anfragen'
500: '500 - Interner Serverfehler'
501: '501 - nicht implementiert'
502: '502 - Fehlerhafter Gateway'
@ -236,7 +238,7 @@ de:
HASBEENSETUP: 'Eine Weiterleitungsseite wurde erstellt ohne das eine Weiterleitung definiert wurde.'
HEADER: 'Diese Seite wird Nutzer auf eine andere Seite weiterleiten'
OTHERURL: 'Andere Webseiten URL'
PLURALNAME: 'Umleitungsseite'
PLURALNAME: 'Weiterleitungsseiten'
REDIRECTTO: 'Weiterleiten zu'
REDIRECTTOEXTERNAL: 'Andere Website'
REDIRECTTOPAGE: 'Eine Seite auf Ihrer Website'

View File

@ -70,6 +70,7 @@ el:
DELETEFP: Διαγραφή
EMAIL: Email
EditTree: 'Επεξεργασία Δένδρου'
ListFiltered: 'Φιλτραρισμένη λίστα.'
NEWPAGE: 'Νέο {pagetype}'
PAGENOTEXISTS: 'Αυτή η σελίδα δεν υπάρχει'
PAGES: Σελίδες
@ -83,6 +84,7 @@ el:
TabContent: Περιεχόμενο
TabHistory: Ιστορικό
TabSettings: Ρυθμίσεις
TreeFiltered: 'Φιλτραρισμένο δένδρο.'
TreeFilteredClear: 'Καθαρισμός φίλτρου'
MENUTITLE: 'Επεξεργασία Σελίδας'
CMSMain_left_ss:
@ -133,7 +135,17 @@ el:
PUBLISHED: Δημοσιευμένο
Password: Κωδικός
VIEWPAGEIN: 'Προβολή Σελίδας σε:'
ErrorPage:
404: '404 - Δεν βρέθηκε'
CODE: 'Κωδικός σφάλματος'
DEFAULTERRORPAGETITLE: 'Η σελίδα δεν βρέθηκε'
DEFAULTSERVERERRORPAGETITLE: 'Σφάλμα διακομιστή'
PLURALNAME: 'Σελίδες Σφάλματος'
SINGULARNAME: 'Σελίδα Σφάλματος'
Folder:
AddFolderButton: 'Προσθήκη φακέλου'
DELETEUNUSEDTHUMBNAILS: 'Διαγραφή αχρησιμοποίητων εικονιδίων'
UNUSEDFILESTITLE: 'Αχρησιμοποίητα αρχεία'
UNUSEDTHUMBNAILSTITLE: 'Αχρησιμοποίητα εικονίδια'
UploadFilesButton: Μεταφόρτωση
LeftAndMain:
@ -149,8 +161,12 @@ el:
RedirectorPage:
DESCRIPTION: 'Κάνει ανακατεύθυνση σε μια διαφορετική εσωτερική σελίδα'
HEADER: 'Αυτή η σελίδα θα ανακατευθύνει τους χρήστες σε μια άλλη σελίδα'
REDIRECTTO: 'Ανακατεύθυνση σε'
ReportAdmin:
ReportTitle: Τίτλος
MENUTITLE: Αναφορές
ReportAdminForm:
FILTERBY: 'Φίλτρο κατά'
SearchForm:
GO: Μετάβαση
SEARCH: Αναζήτηση
@ -207,12 +223,14 @@ el:
MENUTITLE: 'Επίπεδο πλοίγησης'
METADESC: 'Μετα-Περιγραφή'
MODIFIEDONDRAFTHELP: 'Η σελίδα έχει μη δημοσιευμένες αλλαγές'
MODIFIEDONDRAFTSHORT: Τροποποιημένο
MetadataToggle: Μετα-δεδομένα
MoreOptions: 'Περισσότερες επιλογές'
NOTPUBLISHED: 'Δεν έχει δημοσιευθεί'
PAGELOCATION: 'Θέση σελίδας'
PAGETITLE: 'Όνομα σελίδας'
PAGETYPE: 'Τύπος σελίδας'
PARENTID: 'Γονική Σελίδα'
PARENTTYPE: 'Θέση σελίδας'
PLURALNAME: Σελίδες
REORGANISE_DESCRIPTION: 'Αλλαγή δομής του ιστοτόπου '
@ -240,6 +258,7 @@ el:
DESCRIPTION: 'Εμφανίζει το περιεχόμενο μιας άλλης σελίδας'
EditLink: επεξεργασία
HEADER: 'Αυτή είναι μια εικονική σελίδα'
PLURALNAME: 'Εικονικές Σελίδες'
SINGULARNAME: 'Εικονική Σελίδα'
CMSFileAddController:
MENUTITLE: Αρχεία

View File

@ -215,7 +215,7 @@ eo:
DEFAULTSERVERERRORPAGETITLE: 'Servila eraro'
DESCRIPTION: 'Propra enhavo por diversaj kazoj de eraro (ekzemple, "Ne trovis paĝon")'
ERRORFILEPROBLEM: 'Eraro okazis malfermante dosieron "{filename}" por skribi. Bonvolu kontroli permesojn.'
PLURALNAME: 'Prieraraj paĝoj'
PLURALNAME: 'Paĝoj pri eraroj'
SINGULARNAME: 'Prierara paĝo'
Folder:
AddFolderButton: 'Aldoni dosierujon'
@ -238,7 +238,7 @@ eo:
HASBEENSETUP: 'Alidirekta paĝo estis agordita sen ie al kie alidirekti.'
HEADER: 'Ĉi tiu paĝo redirektos uzantojn al alia paĝo'
OTHERURL: 'URL de alia retejo'
PLURALNAME: 'Alidirektaj paĝoj'
PLURALNAME: 'Paĝoj pri alidirekto'
REDIRECTTO: 'Alidirekti al'
REDIRECTTOEXTERNAL: 'Alia retejo'
REDIRECTTOPAGE: 'Paĝo en via retejo'

View File

@ -1,14 +1,40 @@
fa_IR:
AssetAdmin:
ADDFILES: 'اضافه کردن فایل'
ActionAdd: 'اضافه کردن پوشه'
AppCategoryAudio: صوتی
AppCategoryDocument: اسناد
AppCategoryImage: تصویر
AppCategoryVideo: ویدئو
BackToFolder: 'بازگشت به پوشه'
CREATED: تاریخ
DetailsView: جزییات
FILES: فایل ها
FROMTHEINTERNET: 'از اینترنت'
FROMYOURCOMPUTER: 'از کامپیوتر شما'
Filetype: 'نوع فایل'
NEWFOLDER: پوشه جديد
SIZE: حجم
TreeView: 'مشاهده درخت'
Upload: آپلود
AssetAdmin_DeleteBatchAction:
TITLE: 'حذف پوشه ها'
AssetAdmin_left_ss:
GO: برو
BrokenLinksReport:
ColumnURL: آدرس
HoverTitleEditPage: 'ویرایش صفحه'
PageName: 'نام صفحه'
ReasonDropdown: 'مشکل در بررسی'
CMSAddPageController:
Title: 'اضافه کردن صفحه'
CMSBatchActions:
DELETE_DRAFT_PAGES: 'حذف از پیش نویس سایت'
PUBLISH_PAGES: انتشار
CMSMain:
AddNewButton: 'جدید'
Cancel: لغو
Create: ایجاد
DELETE: 'حذف کردن از پیشنویس سایت'
DELETEFP: حذف کردن از منتشر شده های سایت
EMAIL: پست الکترونیک
@ -17,6 +43,10 @@ fa_IR:
SAVE: ذخیره
CMSPageHistoryController:
SHOWVERSION: 'نمایش ویرایش'
CMSPageHistoryController_versions_ss:
AUTHOR: ناشر
CMSPagesController:
MENUTITLE: صفحات
ContentController:
DRAFTSITE: 'تارگاه چرکنویس'
ErrorPage:

View File

@ -1,32 +1,39 @@
id:
AssetAdmin:
ADDFILES: 'Tambah Berkas'
ActionAdd: 'Tambah map'
ActionAdd: 'Tambah Folder'
AppCategoryArchive: Arsip
AppCategoryAudio: Suara
AppCategoryAudio: Audio
AppCategoryDocument: Dokumen
AppCategoryFlash: Flash
AppCategoryImage: Gambar
AppCategoryVideo: Video
BackToFolder: 'Kembali ke map'
BackToFolder: 'Kembali ke Folder'
CREATED: Tanggal
CurrentFolderOnly: 'Batas pada map sekarang?'
CurrentFolderOnly: 'Batasi sesuai folder ini?'
DetailsView: Perincian
FILES: Berkas-berkas
FILES: Berkas
FILESYSTEMSYNC: 'Selaraskan berkas'
FILESYSTEMSYNCTITLE: 'Perbarui entri database CMS untuk berkas-berkas pada sistem berkas (filesystem). Berguna saat berkas-berkas baru diunggah di luar sistem CMS, misalnya melalui FTP.'
FROMTHEINTERNET: 'Dari internet'
FROMYOURCOMPUTER: 'Dari komputer kamu'
FROMYOURCOMPUTER: 'Dari komputer Anda'
Filetype: 'Jenis berkas'
ListView: 'Tampilan daftar'
NEWFOLDER: Map baru
ListView: 'Tampilan Daftar'
NEWFOLDER: FolderBaru
SIZE: Ukuran
TreeView: 'Tampilan menurun'
MENUTITLE: Berkas-berkas
THUMBSDELETED: '{count} thumbnail tak terpakai telah dihapus'
TreeView: 'Tampilan Struktur'
Upload: Unggah
MENUTITLE: Berkas
AssetAdmin_DeleteBatchAction:
TITLE: 'Hapus map'
TITLE: 'Hapus Folder'
AssetAdmin_Tools:
FILTER: Saring
AssetAdmin_left_ss:
GO: Lanjut
AssetTableField:
BACKLINKCOUNT: 'Dipakai pada:'
PAGES: laman
BackLink_Button_ss:
Back: Kembali
BrokenLinksReport:
@ -34,83 +41,147 @@ id:
BROKENLINKS: 'Laporan tautan rusak'
CheckSite: 'Cek situs'
CheckSiteDropdownDraft: 'Draf situs'
CheckSiteDropdownPublished: 'Publikasi situs'
CheckSiteDropdownPublished: 'Situs Terbit'
ColumnDateLastModified: 'Tanggal terakhir modifikasi'
ColumnDateLastPublished: 'Tanggal terakhir terbit'
ColumnDateLastPublished: 'Tanggal terbit terakhir'
ColumnProblemType: 'Jenis masalah'
ColumnURL: URL
HoverTitleEditPage: 'Edit halaman '
PageName: 'Nama halaman'
HasBrokenFile: 'terdapat berkas yang rusak'
HasBrokenLink: 'terdapat tautan yang rusak'
HasBrokenLinkAndFile: 'terdapat berkas dan tautan yang rusak'
HoverTitleEditPage: 'Edit laman '
PageName: 'Nama laman'
ReasonDropdown: 'Masalah yang diperiksa'
ReasonDropdownBROKENFILE: 'Berkas rusak'
ReasonDropdownBROKENLINK: 'Tautan rusak'
ReasonDropdownRPBROKENLINK: 'Laman pengarah mengarah ke laman yang tidak ada'
ReasonDropdownVPBROKENLINK: 'Laman virtual mengarah ke laman yang tidak ada'
RedirectorNonExistent: 'laman pengarah mengarah ke laman yang tidak ada'
VirtualPageNonExistent: 'laman virtual mengarah ke laman yang tidak ada'
CMSAddPageController:
Title: 'Tambah halaman'
Title: 'Tambah laman'
CMSBatchActions:
DELETED_DRAFT_PAGES: '%d laman berhasil dihapus dari draft, %d laman gagal dihapus'
DELETED_PAGES: '%d laman berhasil dihapus dari situs terbit, %d gagal'
DELETE_DRAFT_PAGES: 'Hapus dari draf situs'
DELETE_PAGES: 'Hapus dari publikasi situs'
PUBLISHED_PAGES: 'Menerbitkan %d halaman, %d gagal'
DELETE_PAGES: 'Hapus dari situs terbit'
PUBLISHED_PAGES: 'Menerbitkan %d laman, %d gagal'
PUBLISH_PAGES: Terbitkan
UNPUBLISH_PAGES: Tidak terbit
UNPUBLISHED_PAGES: '%d laman dibatalterbitkan'
UNPUBLISH_PAGES: Batalterbitkan
CMSMain:
AddNew: 'Tambah halaman baru'
ACCESS: 'Akses ke bagian ''{title}'''
ACCESS_HELP: 'Perbolehkan menampilkan bagian dengan struktur laman dan konten. Perijinan menampilkan dan mengedit dapat diatur melalui pilihan terkait laman, sebagaimana "Perijinan Konten".'
AddNew: 'Tambah laman baru'
AddNewButton: 'Tambah baru'
AddPageRestriction: 'Catatan: Sebagian jenis laman tidak dapat dipilih'
Cancel: Batal
ChoosePageType: 'Pilih jenis halaman'
ChoosePageParentMode: 'Pilih lokasi untuk laman ini'
ChoosePageType: 'Pilih jenis laman'
Create: Buat
DELETE: 'Hapus dari situs draft'
DELETEFP: Hapus dari situs yang telah diterbitkan
DESCREMOVED: 'dan {count} turunannya'
DUPLICATED: '''{title}'' berhasil diduplikasi'
DUPLICATEDWITHCHILDREN: '''{title}'' dan turunannya berhasil diduplikasi'
EMAIL: Surel
NEWPAGE: 'Baru {pagetype}'
PAGENOTEXISTS: 'Halaman tidak ada'
PAGES: Halaman
EditTree: 'Edit Struktur'
ListFiltered: 'Daftar tersaring'
NEWPAGE: '{pagetype} baru'
PAGENOTEXISTS: 'Laman ini tidak ada'
PAGES: Laman
PAGETYPEANYOPT: Lain
PAGETYPEOPT: 'Jenis Halaman'
PUBPAGES: 'Selesai: Diterbitkan {count} halaman'
PageAdded: 'Berhasil buat halaman'
PAGETYPEOPT: 'Jenis Laman'
PUBALLCONFIRM: 'Mohon terbitkan semua laman pada situs'
PUBALLFUN: 'Fungsi "Terbitkan Semua"'
PUBALLFUN2: "Menekan tombol ini sama dengan membuka semua laman dan menerbitkannya. Hal ini \n\t\t\t\tditujukan untuk dilakukan setelah ada banyak pengeditan konten, misalnya saat situs pertama kali \n\t\t\t\tdiinstal."
PUBPAGES: 'Selesai: {count} laman terbit'
PageAdded: 'Laman berhasil dibuat'
REMOVED: 'Dihapus ''{title}''{description} dari situs langsung'
REMOVEDPAGE: 'Menghapus ''{title}'' dari terbitan situs '
REMOVEDPAGE: 'Menghapus ''{title}'' dari situs terbit'
REMOVEDPAGEFROMDRAFT: 'Menghapus ''%s'' dari draf situs'
RESTORE: Pulihkan
RESTORED: 'Pemulihan ''{title}'' sukses'
ROLLBACK: 'Kembali ke versi ini'
ROLLEDBACKPUBv2: 'Kembali ke versi terbit'
ROLLEDBACKVERSIONv2: 'Kembali ke versi #%d.'
SAVE: Simpan
SAVEDRAFT: 'Simpan draf'
TabContent: Konten
TabHistory: Sejarah
TabSettings: Pengaturan
TreeFiltered: 'Struktur tersaring.'
TreeFilteredClear: 'Bersihkan saring'
MENUTITLE: 'Edit Laman'
CMSMain_left_ss:
APPLY_FILTER: 'Terapkan Saring'
RESET: Reset
CMSPageAddController:
ParentMode_child: 'Di bawah laman lain'
ParentMode_top: 'Laman atas'
MENUTITLE: 'Tambah laman'
CMSPageHistoryController:
COMPAREMODE: 'Modus pembanding (pilih dua)'
COMPAREVERSIONS: 'Bandingkan Versi'
COMPARINGVERSION: 'Bandingkan versi {version1} dan {version2}.'
REVERTTOTHISVERSION: 'Kembali ke versi ini'
SHOWUNPUBLISHED: 'Tampilkan versi batalterbit'
SHOWVERSION: 'Tampilkan Versi'
VIEW: tampilkan
VIEWINGLATEST: 'Versi terakhir sedang ditampilkan.'
VIEWINGVERSION: 'Versi {version} sedang ditampilkan.'
MENUTITLE: Sejarah
CMSPageHistoryController_versions_ss:
AUTHOR: Penulis
NOTPUBLISHED: 'Batal terbit'
PUBLISHER: Penerbit
UNKNOWN: Tidak diketahui
WHEN: Ketika
CMSPagesController:
GalleryView: 'Tampilan Galeri'
ListView: 'Tampilan daftar'
MENUTITLE: Halaman
MENUTITLE: Laman
TreeView: 'Tampilan Struktur'
CMSPagesController_ContentToolbar_ss:
MULTISELECT: Multi-pilihan
CMSPagesController_Tools_ss:
FILTER: Saring
CMSSearch:
FILTERDATEFROM: Dari
FILTERDATEHEADING: Tanggal
FILTERDATETO: Ke
FILTERLABELTEXT: Isi
FILTERLABELTEXT: Konten
CMSSiteTreeFilter_ChangedPages:
Title: 'Perubahan halaman'
Title: 'Laman yang berubah'
CMSSiteTreeFilter_DeletedPages:
Title: 'Semua laman, termasuk yang terhapus'
CMSSiteTreeFilter_Search:
Title: 'Semua halaman'
Title: 'Semua laman'
ContentControl:
NOTEWONTBESHOWN: 'Catatan: pesan ini tidak akan ditampilkan kepada pengunjung'
ContentController:
ARCHIVEDSITE: 'Versi pratinjau'
ARCHIVEDSITEFROM: 'Arsip dari'
CMS: CMS
DRAFT: Draf
DRAFTSITE: 'Draf situs'
DRAFT_SITE_ACCESS_RESTRICTION: 'Anda harus login untuk menampilkan konten draft atau arsip. <a href="%s">Klik di sini untuk kembali ke situs terbit.</a>'
Email: Surel
INSTALL_SUCCESS: 'Pemasangan sukses'
InstallFilesDeleted: 'Berkas pemasangan telah berhasil dihapus'
InstallSuccessCongratulations: 'SilverStripe telah sukses dipasang!'
INSTALL_SUCCESS: 'Penginstalan berhasil!'
InstallFilesDeleted: 'Berkas penginstalan telah berhasil dihapus.'
InstallSecurityWarning: 'Untuk alasan keamanan, sekarang Anda perlu menghapus berkas-berkas penginstalan, kecuali Anda berencana untuk melakukan penginstalan ulang lagi (<em>memerlukan login admin, lihat di atas</em>). Selanjutnya server juga memerlukan akses tulis ke folder "assets", Anda dapat mencabut akses tulis dari folder lainnya. <a href="{link}" style="text-align: center;">Klik di sini untuk menghapus berkas-berkas penginstalan.</a>'
InstallSuccessCongratulations: 'SilverStripe telah berhasil diinstal!'
LOGGEDINAS: 'Masuk sebagai'
LOGIN: Masuk
LOGOUT: 'Keluar'
NOTLOGGEDIN: 'Tidak masuk'
PUBLISHED: Terbit
PUBLISHEDSITE: 'Situs Terbit'
Password: Kata kunci
PostInstallTutorialIntro: 'Situs ini adalah versi sederhana dari situs SilverStripe 3. Untuk meningkatkannya, mohon kunjungi {link}.'
StartEditing: 'Anda dapat mulai mengedit konten dengan membuka <a href="{link}">CMS</a>.'
UnableDeleteInstall: 'Gagal menghapus berkas-berkas penginstalan. Mohon lakukan penghapusan berkas-berkas berikut ini secara manual.'
VIEWPAGEIN: 'Tampikan Laman pada:'
ErrorPage:
400: '400 - Permintaan buruk'
401: '401 - Tidak ada otorisasi'
@ -129,103 +200,215 @@ id:
415: '425 - Tipe Media Tidak Disupport'
416: '416 - Lingkup Permintaan Tidak Dapat Dipuaskan'
417: '417 - Expectation Gagal'
422: '422 - Entitas Tidak Terproses'
429: '429 - Terlalu Banyak Permintaan'
500: '500 - Server Internal Error'
501: '501 - Tidak Diimplementasi'
502: '502 - Gateway Buruk'
503: '503 - Servis Tidak Tersedia'
505: '505 - Versi HTTP Tidak Disupport'
504: '504 - Masa Tunggu Terlewat'
505: '505 - Versi HTTP Tidak Didukung'
CODE: 'Kode yang salah'
DEFAULTERRORPAGECONTENT: '<p>Maaf, sepertinya anda berusha mengakses halaman yang tidak ada.</p><p>Mohon periksa ejaan URL yang ingin anda akses dan coba lagi.</p>'
DEFAULTERRORPAGETITLE: 'Halaman tidak ditemukan'
DEFAULTERRORPAGECONTENT: '<p>Maaf, sepertinya anda berusaha mengakses laman yang tidak ada.</p><p>Mohon periksa ejaan URL yang ingin anda akses dan coba lagi.</p>'
DEFAULTERRORPAGETITLE: 'Laman tidak ditemukan'
DEFAULTSERVERERRORPAGECONTENT: '<p>Maaf, ada masalah dalam penanganan permintaan Anda.</p>'
DEFAULTSERVERERRORPAGETITLE: 'Server mengalami kesalahan'
DESCRIPTION: 'Laman untuk berbagai kasus kesalahan (misalnya "Laman tidak ditemukan")'
ERRORFILEPROBLEM: 'Gagal membuka berkas "{filename}" untuk penulisan data. Mohon periksa pengaturan akses tulis.'
PLURALNAME: 'Laman Kesalahan'
SINGULARNAME: 'Laman Kesalahan'
Folder:
AddFolderButton: 'Tambah map'
DELETEUNUSEDTHUMBNAILS: 'Hapus thumbnail-thumbnail yang tidal dipakai'
UNUSEDFILESTITLE: 'File-file yang tidak dipakai'
UNUSEDFILESTITLE: 'Berkas tidak terpakai'
UNUSEDTHUMBNAILSTITLE: 'Thumbnail-thumbnail yang tidak dipakai'
UploadFilesButton: Unggah
LeftAndMain:
DELETED: Hapus
PreviewButton: Pratinjau
SAVEDUP: Disimpan
SearchResults: 'Hasil pencarian'
Permission:
CMS_ACCESS_CATEGORY: 'Akses CMS'
Permissions:
CONTENT_CATEGORY: 'Perijinan konten'
PERMISSIONS_CATEGORY: 'Peran dan akses perijinan'
RedirectorPage:
HASBEENSETUP: 'halaman yang mengirim user ke alamat lain dibuat tanpa tujuan dari pengiriman itu sendiri'
HEADER: 'Halaman ini akan mengarahkan user ke halaman lain'
DESCRIPTION: 'Mengarahkan ke laman internal berbeda'
HASBEENSETUP: 'Sebuah laman pengarah telah dibuat tanpa arah yang dituju.'
HEADER: 'Laman ini akan mengarahkan pengguna ke laman lain'
OTHERURL: 'URL situs web lain'
PLURALNAME: 'Laman Pengarah'
REDIRECTTO: 'Arahkan lagi ke'
REDIRECTTOEXTERNAL: 'Situs web yang lain'
REDIRECTTOPAGE: 'Sebuah halaman pada situs web Anda'
YOURPAGE: 'Halaman pada situs web Anda'
REDIRECTTOPAGE: 'Laman pada situs Anda'
SINGULARNAME: 'Laman Pengarah'
YOURPAGE: 'Laman pada situs Anda'
ReportAdmin:
ReportTitle: Judul
MENUTITLE: Laporan
ReportAdminForm:
FILTERBY: 'Saring dengan'
SITETREE:
VIRTUALPAGEDRAFTWARNING: 'Mohon terbitkan laman tertaut untuk menayangkan laman virtual'
VIRTUALPAGEWARNING: 'Mohon pilih laman tertaut dan simpan lebih dulu untuk menayangkan laman ini'
VIRTUALPAGEWARNINGSETTINGS: 'Mohon pilih laman tertaut pada konten utama untuk menayangkan'
SearchForm:
GO: Pergi
SEARCH: Cari
SearchResults: 'Hasil Pencarian'
SideReport:
ContentGroupTitle: 'Isi laporan'
BROKENFILES: 'Laman dengan berkas rusak'
BROKENLINKS: 'Laman dengan tautan rusak'
BROKENREDIRECTORPAGES: 'LamanPengarah mengarah pada laman terhapus'
BROKENVIRTUALPAGES: 'LamanVirtual mengarah pada laman terhapus'
BrokenLinksGroupTitle: 'Laporan tautan-tautan rusak'
ContentGroupTitle: 'Laporan konten'
EMPTYPAGES: 'Laman tanpa konten'
LAST2WEEKS: 'Laman diedit dalam 2 minggu terakhir'
OtherGroupTitle: Lainnya
ParameterLiveCheckbox: 'Periksa situs live'
REPEMPTY: 'Laporan {title} kosong.'
SilverStripeNavigator:
ARCHIVED: Terarsip
SilverStripeNavigatorLink:
ShareInstructions: 'Untuk membagi laman ini, salin dan tempel pada tautan berikut.'
ShareLink: 'Bagi tautan'
SilverStripeNavigatorLinkl:
CloseLink: Tutup
SiteConfig:
DEFAULTTHEME: '(Gunakan tema standar)'
EDITHEADER: 'Siapa yang boleh mengedit laman pada situs ini?'
EDIT_PERMISSION: 'Mengelola pengaturan situs'
EDIT_PERMISSION_HELP: 'Bolehkan mengedit pengaturan akses umum atau perijinan tingkat atas.'
PLURALNAME: 'Pengaturan Situs'
SINGULARNAME: 'Pengaturan Situs'
SITENAMEDEFAULT: 'Nama Situs'
SITETAGLINE: 'Slogan Situs'
SITETITLE: 'Judul Situs'
TABACCESS: Akses
TABMAIN: Tab Utama
TAGLINEDEFAULT: 'slogan situsmu disini'
THEME: Tema
TOPLEVELCREATE: 'Siapa yang dapat membuat laman utama yang baru?'
VIEWHEADER: 'Siapa yang dapat menampilkan laman pada situs ini?'
SiteTree:
ACCESSANYONE: Siapa saja
ACCESSHEADER: 'Siapa yang dapat melihat halaman ini pada situs saya?'
ACCESSHEADER: 'Siapa yang dapat melihat laman ini?'
ACCESSLOGGEDIN: 'User yang masuk'
ACCESSONLYTHESE: 'Hanya orang ini saja (pilih dari daftar)'
ALLOWCOMMENTS: 'Bolehkan komentar pada halaman ini?'
ADDEDTODRAFTHELP: 'Laman belum terbit'
ADDEDTODRAFTSHORT: Darft
ALLOWCOMMENTS: 'Bolehkan komentar pada laman ini?'
APPEARSVIRTUALPAGES: 'Konten ini akan tampil juga pada laman virtual di bagian {title}.'
BUTTONCANCELDRAFT: 'Batalkan perubahan draft'
BUTTONCANCELDRAFTDESC: 'Hapus draft dan kembalikan ke halaman yang sedang dipublikasikan'
BUTTONUNPUBLISH: Tidak Dipublikasi
BUTTONUNPUBLISHDESC: 'Pindahkan halaman ini dari situs yang dipublikasikan'
BUTTONCANCELDRAFTDESC: 'Hapus draft dan kembalikan ke laman terbit'
BUTTONPUBLISHED: Terbit
BUTTONSAVED: Tersimpan
BUTTONSAVEPUBLISH: 'Simpan dan terbitkan'
BUTTONUNPUBLISH: Batalterbitkan
BUTTONUNPUBLISHDESC: 'Hapus laman ini dari situs terbit'
Comments: Komen-komen
Content: Isi
DEFAULTABOUTCONTENT: '<p>Anda dapat mengisi halaman ini dengan isi anda sendiri, atau hapus dan buat halaman-halaman anda sendiri.<br /></p>'
Content: Konten
DEFAULTABOUTCONTENT: '<p>Anda dapat mengisi laman ini dengan konten Anda sendiri, atau menghapusnya dan membuat laman Anda sendiri.<br /></p>'
DEFAULTABOUTTITLE: 'Tentang Kami'
DEFAULTCONTACTCONTENT: '<p>Anda dapat mengisi halaman ini dengan isi anda sendiri, atau hapus dan buat halaman-halaman anda sendiri.<br /></p>'
DEFAULTCONTACTCONTENT: '<p>Anda dapat mengisi laman ini dengan konten Anda sendiri, atau menghapusnya dan membuat laman Anda sendiri.<br /></p>'
DEFAULTCONTACTTITLE: 'Hubungi Kami'
DEFAULTHOMECONTENT: '<p>Selamat datang di SilverStripe! Ini adalah homepage default anda. Anda dapat mengedit halaman ini dengan membuka <a href="admin/">CMS ini</a>. Sekarang anda dapat mengakses <a href="http://doc.silverstripe.com">dokumentasi developer</a>, atau memulai <a href="http://doc.silverstripe.com/doku.php?id=tutorials">tutorial-tutorial yang tersedia.</a></p>'
DEFAULTHOMECONTENT: '<p>Selamat datang di SilverStripe! Ini adalah halaman awal situs Anda. Anda dapat mengedit laman ini dengan membuka <a href="admin/">CMS ini</a>. Selanjutnya Anda dapat mengakses <a href="http://doc.silverstripe.com">dokumentasi pengembang</a>, atau mulai dengan <a href="http://doc.silverstripe.com/doku.php?id=tutorials">tutorial-tutorial yang tersedia.</a></p>'
DEFAULTHOMETITLE: Beranda
DELETEDPAGEHELP: 'Laman tidak lagi terbit'
DELETEDPAGESHORT: Hapus
DEPENDENT_NOTE: 'Laman-laman berikut ini bergantung pada laman ini. Termasuk laman virtual, laman pengarah, dan laman-laman dengan tautan konten.'
DESCRIPTION: 'Laman konten umum'
DependtPageColumnLinkType: 'Jenis tautan'
DependtPageColumnURL: URL
EDITANYONE: 'Siapa saja yang dapat masuk ke dalam CMS'
EDITHEADER: 'Siapa yang dapat mengedit ini dari dalam CMS?'
EDITHEADER: 'Siapa yang dapat mengedit laman ini?'
EDITONLYTHESE: 'Hanya orang ini saja (pilih dari daftar)'
EDITORGROUPS: 'Editor Grup'
HASBROKENLINKS: 'Halaman ini mempunyai link yang rusak'
EDITORGROUPS: 'Kelompok Editor'
EDIT_ALL_DESCRIPTION: 'Edit semua laman'
EDIT_ALL_HELP: 'Bolehkan mengedit semua laman pada situs, terlepas dari pengaturan Akses. Memerlukan perijinan "Akses ke bagian ''Laman''".'
Editors: 'Kelompok Editor'
GroupPlaceholder: 'Klik untuk memilih kelompok'
HASBROKENLINKS: 'Laman ini mempunyai tautan yang rusak.'
HTMLEDITORTITLE: Konten
INHERIT: 'Warisi dari laman induk'
LASTPUBLISHED: 'Terakhir terbit'
LASTSAVED: 'Terakhir tersimpan'
LASTUPDATED: 'Terakhir diperbarui'
LINKCHANGENOTE: 'Mengganti tautan laman ini akan mempengaruhi semua tautan pada laman terkait.'
MENUTITLE: 'Label navigasi'
METADESC: 'Deskripsi'
METADESCHELP: 'Mesin pencari menggunakan konten ini untuk menampilkan hasil pencarian (meskipun tidak mempengaruhi pemeringkatan situs).'
METAEXTRA: 'Penanda Meta'
METAEXTRAHELP: 'Penanda HTML untuk informasi meta tambahan. Contohnya &lt;meta name="namaMeta" content="konten Anda di sini" /&gt;'
MODIFIEDONDRAFTHELP: 'Laman memiliki perubahan yang tidak terbit'
MODIFIEDONDRAFTSHORT: Diubah
MetadataToggle: Metadata
MoreOptions: 'Pilihan lain'
PAGELOCATION: 'Lokasi halaman'
PAGETITLE: 'Nama Halaman'
PAGETYPE: 'Tipe halaman'
PARENTTYPE: 'Lokasi halaman'
NOTPUBLISHED: 'Tidak diterbitkan'
OBSOLETECLASS: 'Jenis laman {type} ini sudah usang. Menyimpannya akan memperbarui jenisnya dan Anda kemungkinan akan kehilangan data'
PAGELOCATION: 'Lokasi laman'
PAGETITLE: 'Nama laman'
PAGETYPE: 'Tipe laman'
PARENTID: 'Laman induk'
PARENTTYPE: 'Lokasi laman'
PARENTTYPE_ROOT: 'Laman atas'
PARENTTYPE_SUBPAGE: 'Sub-laman di bawah laman induk'
PERMISSION_GRANTACCESS_DESCRIPTION: 'Kelola hak akses untuk konten ini'
PERMISSION_GRANTACCESS_HELP: 'Perbolehkan pengaturan pencegahan akses ke laman tertentu di bagian "Laman".'
PLURALNAME: Laman
PageTypNotAllowedOnRoot: 'Jenis laman {type} tidak diperbolehkan di tingkat atas'
PageTypeNotAllowed: 'Jenis laman {type} tidak diperbolehkan menjadi turunan dari laman induk ini'
REMOVEDFROMDRAFTHELP: 'Laman sudah terbit, tapi telah dihapus dari draft'
REMOVEDFROMDRAFTSHORT: 'Dihapus dari draft'
REMOVE_INSTALL_WARNING: 'Peringatan: Anda perlu menghapus instal.php dari penginstalan SilverStripe ini untuk alasan keamanan.'
REORGANISE_DESCRIPTION: 'Ubah stuktur situs'
REORGANISE_HELP: 'Atur ulang laman pada struktur situs dengan drag&drop.'
SHOWINMENUS: 'Perlihatkan dalam menu?'
SHOWINSEARCH: 'Perlihatkan dalam pencarian'
SINGULARNAME: Laman
TABBEHAVIOUR: Perilaku
TABCONTENT: 'Kontain'
TOPLEVEL: 'Konten Situs (Level Atas)'
TABCONTENT: 'Konten Utama'
TABDEPENDENT: 'Laman terkait'
TOPLEVEL: 'Konten Situs (Tingkat Atas)'
TOPLEVELCREATORGROUPS: 'Pembuat tingkat atas'
URLSegment: 'Segmen URL'
has_one_Parent: 'Halaman Induk'
VIEWERGROUPS: 'Kelompok Penampil'
VIEW_ALL_DESCRIPTION: 'Tampilkan semua laman'
VIEW_ALL_HELP: 'Bolehkan menampilkan semua laman pada situs, terlepas dari pengaturan Akses. Memerlukan perijinan "Akses ke bagian ''Laman''".'
VIEW_DRAFT_CONTENT: 'Tampilkan konten draft'
VIEW_DRAFT_CONTENT_HELP: 'Untuk menampilkan laman di luar CMS pada modus draft. Berguna untuk kolaborasi eksternal tanpa akses CMS.'
Viewers: 'Kelompok Penampil'
Visibility: Visibilitas
has_one_Parent: 'Laman Induk'
many_many_BackLinkTracking: 'Jajaki Tautan Balik'
many_many_ImageTracking: 'Jajaki Gambar'
many_many_LinkTracking: 'Jajaki Tautan'
SiteTreeURLSegmentField:
EMPTY: 'Mohon isikan URL atau klik Batal'
HelpChars: 'Karakter khusus akan dikonversi secara otomatis atau dihapus.'
URLSegmentField:
Cancel: Batal
Edit: Edit
OK: OK
ViewArchivedEmail_ss:
CANACCESS: 'Anda dapat mengakses arsip situs pada tautan ini:'
HAVEASKED: 'Anda telah meminta menampilkan konten situs ini pada'
VirtualPage:
HEADER: 'Ini adalah halaman virtual'
PLURALNAME: 'Halaman-halaman Virtual'
SINGULARNAME: 'Halaman Virtual'
CHOOSE: 'Laman Tertaut'
DESCRIPTION: 'Tampilkan konten laman lain'
EditLink: edit
HEADER: 'Ini adalah laman virtual'
HEADERWITHLINK: 'Ini adalah laman virtual dengan konten salinan dari "{title}" ({link})'
PLURALNAME: 'Laman Virtual'
PageTypNotAllowedOnRoot: 'Laman asli jenis "{type}" tidak dibolehkan pada tingkat atas untuk laman virtual ini'
SINGULARNAME: 'Laman Virtual'
CMSFileAddController:
MENUTITLE: Berkas
CMSPageEditController:
MENUTITLE: 'Ubah halaman'
MENUTITLE: 'Edit Laman'
CMSPageSettingsController:
MENUTITLE: 'Ubah halaman'
MENUTITLE: 'Edit Laman'
CMSSettingsController:
MENUTITLE: Pengaturan
CMSSiteTreeFilter_StatusDeletedPages:
Title: 'Halaman yang dihapus'

View File

@ -215,7 +215,7 @@ sv:
DEFAULTSERVERERRORPAGETITLE: 'Serverfel'
DESCRIPTION: 'Anpassat innehåll för olika felärenden (t.ex. "Sidan kan inte hittas")'
ERRORFILEPROBLEM: 'Kunde inte skriva filen "{filename}". Var vänlig kontrollera skrivrättigheterna.'
PLURALNAME: 'Felmeddelandesidor'
PLURALNAME: 'Felsidor'
SINGULARNAME: 'Felsida'
Folder:
AddFolderButton: 'Skapa mapp'
@ -238,7 +238,7 @@ sv:
HASBEENSETUP: 'En omdirigeringssida har skapats utan att ha något mål.'
HEADER: 'Den här sidan omdirigerar användare till en annan sida'
OTHERURL: 'Andra sidans URL'
PLURALNAME: 'Omdirigerings sidor'
PLURALNAME: 'Omdirigeringssida'
REDIRECTTO: 'Omdirigera till'
REDIRECTTOEXTERNAL: 'En annan sajt'
REDIRECTTOPAGE: 'En sida på din sajt'

View File

@ -263,7 +263,15 @@ class CMSMainTest extends FunctionalTest {
$this->get('admin/pages/add');
$response = $this->post(
'admin/pages/add/AddForm',
array('ParentID' => '0', 'PageType' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1)
array(
'ParentID' => '0',
'PageType' => 'Page',
'Locale' => 'en_US',
'action_doAdd' => 1,
'ajax' => 1,
), array(
'X-Pjax' => 'CurrentForm,Breadcrumbs',
)
);
// should redirect, which is a permission error
$this->assertEquals(403, $response->getStatusCode(), 'Add TopLevel page must fail for normal user');
@ -274,11 +282,19 @@ class CMSMainTest extends FunctionalTest {
$response = $this->post(
'admin/pages/add/AddForm',
array('ParentID' => '0', 'PageType' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1)
array(
'ParentID' => '0',
'PageType' => 'Page',
'Locale' => 'en_US',
'action_doAdd' => 1,
'ajax' => 1,
), array(
'X-Pjax' => 'CurrentForm,Breadcrumbs',
)
);
$this->assertEquals(302, $response->getStatusCode(), 'Must be a redirect on success');
$location=$response->getHeader('Location');
$location = $response->getHeader('X-ControllerURL');
$this->assertNotEmpty($location, 'Must be a redirect on success');
$this->assertContains('/show/',$location, 'Must redirect to /show/ the new page');
// TODO Logout
$this->session()->inst_set('loggedInAs', NULL);