Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098729
D129.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
Thu, Aug 14, 4:52 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, Aug 15, 4:52 AM (1 h, 31 m)
Engine
blob
Format
Raw Data
Handle
710282
Attached To
D129: INP-1476 - Allow to customize "st_AdminEditButton" tag
D129.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