Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726944
D129.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 3:37 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 3:37 AM (3 d, 23 m ago)
Engine
blob
Format
Raw Data
Handle
536607
Attached To
D129: INP-1476 - Allow to customize "st_AdminEditButton" tag
D129.id.diff
View Options
Index: branches/5.2.x/core/units/categories/categories_tag_processor.php
===================================================================
--- branches/5.2.x/core/units/categories/categories_tag_processor.php
+++ branches/5.2.x/core/units/categories/categories_tag_processor.php
@@ -1598,6 +1598,14 @@
$item_prefix = isset($params['item_prefix']) ? $params['item_prefix'] : '';
unset($params['item_prefix']);
+ $default_params = array(
+ 'button_icon' => 'section_properties.png',
+ 'button_class' => 'cms-section-properties-btn',
+ 'button_title' => 'la_btn_SectionProperties',
+ );
+
+ $params = array_merge($default_params, $params);
+
if ( $item_prefix ) {
$params['button_class'] = 'cms-section-properties-btn';
$edit_btn = $this->Application->ProcessParsedTag($item_prefix, 'AdminEditButton', $params) . "\n";
@@ -1795,17 +1803,8 @@
return '';
}
- /** @var kDBItem $object */
- $object = $this->getObject($params);
-
$params['item_prefix'] = 'c';
- if ( $this->Prefix == 'st' ) {
- $params['button_icon'] = 'section_properties.png';
- $params['button_class'] = 'cms-section-properties-btn';
- $params['button_title'] = 'la_btn_SectionProperties';
- }
-
return parent::AdminEditButton($params);
}
Event Timeline
Log In to Comment