Attached Files |
direct_page_link_feature.patch [^] (10,758 bytes) 2011-07-13 04:18
[Show Content]
Index: admin/system_presets/simple/categories_c.php
===================================================================
--- admin/system_presets/simple/categories_c.php (revision 14467)
+++ admin/system_presets/simple/categories_c.php (working copy)
@@ -38,7 +38,7 @@
// fields to hide
$hidden_fields = Array (
'CategoryId', /*'Type', 'SymLinkCategoryId', 'ParentId', 'Name', 'Filename', 'AutomaticFilename',*/
- /*'Description',*/ 'CreatedOn', 'EditorsPick', 'Status', /*'Priority', 'MetaKeywords', 'CachedDescendantCatsQty',
+ /*'Description',*/ 'CreatedOn', 'EditorsPick', 'Status', 'DirectLinkEnabled', /*'Priority', 'MetaKeywords', 'CachedDescendantCatsQty',
'CachedNavbar',*/ 'CreatedById', /*'ResourceId', 'ParentPath', 'TreeLeft', 'TreeRight', 'NamedParentPath',
'MetaDescription', 'HotItem',*/ 'NewItem', /*'PopItem', 'Modified', 'ModifiedById', 'CachedTemplate',*/
'Template', /*'UseExternalUrl', 'ExternalUrl',*/ 'UseMenuIconUrl', 'MenuIconUrl', 'Title', 'MenuTitle',
Index: core/admin_templates/categories/categories_edit.tpl
===================================================================
--- core/admin_templates/categories/categories_edit.tpl (revision 14467)
+++ core/admin_templates/categories/categories_edit.tpl (working copy)
@@ -146,13 +146,30 @@
<inp2:m_RenderElement name="inp_label" prefix="c" field="Protected" title="la_fld_Protected"/>
</inp2:m_if>
- <inp2:m_RenderElement name="subsection" prefix="c" fields="Status,NewItem,EditorsPick,Priority,UseMenuIconUrl,MenuIconUrl,UseExternalUrl,ExternalUrl,CreatedOn,MetaKeywords,MetaDescription,IndexTools" title="la_section_Properties"/>
+ <inp2:m_RenderElement name="subsection" prefix="c" fields="Status,DirectLinkEnabled,NewItem,EditorsPick,Priority,UseMenuIconUrl,MenuIconUrl,UseExternalUrl,ExternalUrl,CreatedOn,MetaKeywords,MetaDescription,IndexTools" title="la_section_Properties"/>
<inp2:m_if check="c_PageEditable">
<inp2:m_RenderElement name="inp_edit_radio" prefix="c" field="Status" title="la_fld_Status"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="c" field="Status" title="la_fld_Status"/>
</inp2:m_if>
+ <inp2:m_ifnot check="c_IsNewItem">
+ <inp2:m_RenderElement design="form_row" prefix="c" field="DirectLinkEnabled" title="la_fld_DirectLinkEnabled">
+ <td class="control-cell">
+ <div style="float: left;">
+ <input type="hidden" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='db'/>">
+ <input tabindex="<inp2:m_Get name='tab_index'/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='$field'/>" name="_cb_<inp2:{$prefix}_InputName field='$field'/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='$field'/>'));" onclick="reflectDirectLink();"/>
+ </div>
+
+ <div style="float: left; margin-left: 3px; margin-top: 3px;">
+ <a href="<inp2:$prefix_DirectLink/>" id="direct_link" target="_blank"<inp2:m_ifnot check="{$prefix}_Field" name="$field" db="db"> style="display: none;"</inp2:m_ifnot>><inp2:$prefix_DirectLink/></a>
+ </div>
+
+ <div style="clear: both;"></div>
+ </td>
+ </inp2:m_RenderElement>
+ </inp2:m_ifnot>
+
<inp2:m_RenderElement name="inp_edit_radio" prefix="c" field="NewItem" title="la_fld_New"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="EditorsPick" title="la_fld_EditorsPick"/>
@@ -270,6 +287,25 @@
$(document).ready(reflectPageType);
</inp2:m_if>
+ <inp2:m_ifnot check="c_IsNewItem">
+ <inp2:m_if check="c_FieldsVisible" fields="DirectLinkEnabled">
+ function reflectDirectLink() {
+ $( get_control($field_mask, 'DirectLinkEnabled', undefined, '_cb') ).change(
+ function ($e) {
+ if ( $(this).attr('checked') ) {
+ $('#direct_link').show();
+ }
+ else {
+ $('#direct_link').hide();
+ }
+ }
+ );
+ }
+
+ $(document).ready(reflectDirectLink);
+ </inp2:m_if>
+ </inp2:m_ifnot>
+
Application.setHook(
'c:*',
function () {
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 14467)
+++ core/install/english.lang (working copy)
@@ -435,6 +435,7 @@
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
<PHRASE Label="la_fld_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
+ <PHRASE Label="la_fld_DirectLinkEnabled" Module="Core" Type="1">QWNjZXNzIHdpdGggTGluaw==</PHRASE>
<PHRASE Label="la_fld_Display" Module="Core" Type="1">RGlzcGxheQ==</PHRASE>
<PHRASE Label="la_fld_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
<PHRASE Label="la_fld_DisplayName" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 14467)
+++ core/install/install_schema.sql (working copy)
@@ -460,6 +460,8 @@
OverridePageCacheKey tinyint(4) NOT NULL DEFAULT '0',
PageCacheKey varchar(255) NOT NULL DEFAULT '',
PageExpiration int(11) DEFAULT NULL,
+ DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
+ DirectLinkAuthKey varchar(20) NOT NULL,
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 14467)
+++ core/install/upgrades.sql (working copy)
@@ -2025,4 +2025,11 @@
# ===== v 5.1.3-B2 =====
ALTER TABLE Modules ADD AppliedDBRevisions TEXT NULL;
-# ===== v 5.1.3-RC1 =====
\ No newline at end of file
+# ===== v 5.1.3-RC1 =====
+ALTER TABLE Category
+ ADD DirectLinkEnabled TINYINT NOT NULL DEFAULT '1',
+ ADD DirectLinkAuthKey VARCHAR(20) NOT NULL;
+
+UPDATE Category
+SET DirectLinkAuthKey = SUBSTRING( MD5( CONCAT(CategoryId, ':', ParentId, ':', l<%PRIMARY_LANGUAGE%>_Name, ':b38') ), 1, 20)
+WHERE DirectLinkAuthKey = '';
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 14467)
+++ core/units/categories/categories_config.php (working copy)
@@ -401,6 +401,12 @@
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array (
Index: core/units/categories/categories_event_handler.php
===================================================================
--- core/units/categories/categories_event_handler.php (revision 14467)
+++ core/units/categories/categories_event_handler.php (working copy)
@@ -1454,20 +1454,21 @@
*/
function checkItemStatus(&$event)
{
- $status_fields = $this->Application->getUnitOption($event->Prefix,'StatusField');
- if (!$status_fields) {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( !$object->isLoaded() ) {
return true;
}
- $status_field = array_shift($status_fields);
- if ($status_field == 'Status' || $status_field == 'Enabled') {
- $object =& $event->getObject();
- if (!$object->isLoaded()) {
- return true;
+ if ( $object->GetDBField('Status') != STATUS_ACTIVE && $object->GetDBField('Status') != 4 ) {
+ if ( !$object->GetDBField('DirectLinkEnabled') || !$object->GetDBField('DirectLinkAuthKey') ) {
+ return false;
}
- return $object->GetDBField($status_field) == STATUS_ACTIVE || $object->GetDBField($status_field) == 4;
+ return $this->Application->GetVar('authkey') == $object->GetDBField('DirectLinkAuthKey');
}
+
return true;
}
@@ -1612,6 +1613,17 @@
$object->SetError('cust_RssSource', 'not_allowed', 'la_error_OperationNotAllowed');
}
}
+
+ if ( !$object->GetDBField('DirectLinkAuthKey') ) {
+ $key_parts = Array (
+ $object->GetID(),
+ $object->GetDBField('ParentId'),
+ $object->GetField('Name'),
+ 'b38'
+ );
+
+ $object->SetDBField('DirectLinkAuthKey', substr( md5( implode(':', $key_parts) ), 0, 20 ));
+ }
}
/**
Index: core/units/categories/categories_tag_processor.php
===================================================================
--- core/units/categories/categories_tag_processor.php (revision 14467)
+++ core/units/categories/categories_tag_processor.php (working copy)
@@ -1665,6 +1665,28 @@
return $this->Application->HREF($object->GetDBField('NamedParentPath'), '_FRONT_END_', $url_params);
}
+ function DirectLink($params)
+ {
+ $object =& $this->getObject($params);
+
+ $themes_helper =& $this->Application->recallObject('ThemesHelper');
+ /* @var $themes_helper kThemesHelper */
+
+ $url_params = Array (
+ 'm_cat_id' => $object->GetID(),
+ 'm_theme' => $themes_helper->getCurrentThemeId(),
+ 'pass' => 'm',
+ 'index_file' => 'index.php',
+ 'authkey' => $object->GetDBField('DirectLinkAuthKey'),
+ );
+
+ if ($this->Application->ConfigValue('UseModRewrite')) {
+ $url_params['__MOD_REWRITE__'] = 1;
+ }
+
+ return $this->Application->HREF($object->GetDBField('NamedParentPath'), '_FRONT_END_', $url_params);
+ }
+
/**
* Builds link to cms page (used?)
*
Index: core/units/structure/structure_config.php
===================================================================
--- core/units/structure/structure_config.php (revision 14467)
+++ core/units/structure/structure_config.php (working copy)
@@ -205,6 +205,12 @@
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array(
direct_page_link_feature_for_520.patch [^] (10,838 bytes) 2011-07-13 12:28
[Show Content]
Index: admin/system_presets/simple/categories_c.php
===================================================================
--- admin/system_presets/simple/categories_c.php (revision 14446)
+++ admin/system_presets/simple/categories_c.php (working copy)
@@ -41,7 +41,7 @@
// fields to hide
$hidden_fields = Array (
'CategoryId', /*'Type', 'SymLinkCategoryId', 'ParentId', 'Name', 'Filename', 'AutomaticFilename',*/
- /*'Description',*/ 'CreatedOn', 'EditorsPick', 'Status', /*'Priority', 'MetaKeywords', 'CachedDescendantCatsQty',
+ /*'Description',*/ 'CreatedOn', 'EditorsPick', 'Status', 'DirectLinkEnabled', /*'Priority', 'MetaKeywords', 'CachedDescendantCatsQty',
'CachedNavbar',*/ 'CreatedById', /*'ResourceId', 'ParentPath', 'TreeLeft', 'TreeRight', 'NamedParentPath',
'MetaDescription', 'HotItem',*/ 'NewItem', /*'PopItem', 'Modified', 'ModifiedById', 'CachedTemplate',*/
'Template', /*'UseExternalUrl', 'ExternalUrl',*/ 'UseMenuIconUrl', 'MenuIconUrl', 'Title', 'MenuTitle',
Index: core/admin_templates/categories/categories_edit.tpl
===================================================================
--- core/admin_templates/categories/categories_edit.tpl (revision 14472)
+++ core/admin_templates/categories/categories_edit.tpl (working copy)
@@ -146,13 +146,30 @@
<inp2:m_RenderElement name="inp_label" prefix="c" field="Protected" title="la_fld_Protected"/>
</inp2:m_if>
- <inp2:m_RenderElement name="subsection" prefix="c" fields="Status,NewItem,EditorsPick,Priority,UseMenuIconUrl,MenuIconUrl,UseExternalUrl,ExternalUrl,CreatedOn,MetaKeywords,MetaDescription,IndexTools" title="la_section_Properties"/>
+ <inp2:m_RenderElement name="subsection" prefix="c" fields="Status,DirectLinkEnabled,NewItem,EditorsPick,Priority,UseMenuIconUrl,MenuIconUrl,UseExternalUrl,ExternalUrl,CreatedOn,MetaKeywords,MetaDescription,IndexTools" title="la_section_Properties"/>
<inp2:m_if check="c_PageEditable">
<inp2:m_RenderElement name="inp_edit_radio" prefix="c" field="Status" title="la_fld_Status"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="c" field="Status" title="la_fld_Status"/>
</inp2:m_if>
+ <inp2:m_ifnot check="c_IsNewItem">
+ <inp2:m_RenderElement design="form_row" prefix="c" field="DirectLinkEnabled" title="la_fld_DirectLinkEnabled">
+ <td class="control-cell">
+ <div style="float: left;">
+ <input type="hidden" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' db='db'/>">
+ <input tabindex="<inp2:m_Get name='tab_index'/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='$field'/>" name="_cb_<inp2:{$prefix}_InputName field='$field'/>" <inp2:{$prefix}_Field field="$field" checked="checked" db="db"/> onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='$field'/>'));" onclick="reflectDirectLink();"/>
+ </div>
+
+ <div style="float: left; margin-left: 3px; margin-top: 3px;">
+ <a href="<inp2:$prefix_DirectLink/>" id="direct_link" target="_blank"<inp2:m_ifnot check="{$prefix}_Field" name="$field" db="db"> style="display: none;"</inp2:m_ifnot>><inp2:$prefix_DirectLink/></a>
+ </div>
+
+ <div style="clear: both;"></div>
+ </td>
+ </inp2:m_RenderElement>
+ </inp2:m_ifnot>
+
<inp2:m_RenderElement name="inp_edit_radio" prefix="c" field="NewItem" title="la_fld_New"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="c" field="EditorsPick" title="la_fld_EditorsPick"/>
@@ -270,6 +287,25 @@
$(document).ready(reflectPageType);
</inp2:m_if>
+ <inp2:m_ifnot check="c_IsNewItem">
+ <inp2:m_if check="c_FieldsVisible" fields="DirectLinkEnabled">
+ function reflectDirectLink() {
+ $( get_control($field_mask, 'DirectLinkEnabled', undefined, '_cb') ).change(
+ function ($e) {
+ if ( $(this).attr('checked') ) {
+ $('#direct_link').show();
+ }
+ else {
+ $('#direct_link').hide();
+ }
+ }
+ );
+ }
+
+ $(document).ready(reflectDirectLink);
+ </inp2:m_if>
+ </inp2:m_ifnot>
+
Application.setHook(
'c:*',
function () {
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 14472)
+++ core/install/english.lang (working copy)
@@ -418,6 +418,7 @@
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
<PHRASE Label="la_fld_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
+ <PHRASE Label="la_fld_DirectLinkEnabled" Module="Core" Type="1">QWNjZXNzIHdpdGggTGluaw==</PHRASE>
<PHRASE Label="la_fld_Display" Module="Core" Type="1">RGlzcGxheQ==</PHRASE>
<PHRASE Label="la_fld_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
<PHRASE Label="la_fld_DisplayName" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 14472)
+++ core/install/install_schema.sql (working copy)
@@ -467,6 +467,8 @@
OverridePageCacheKey tinyint(4) NOT NULL DEFAULT '0',
PageCacheKey varchar(255) NOT NULL DEFAULT '',
PageExpiration int(11) DEFAULT NULL,
+ DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
+ DirectLinkAuthKey varchar(20) NOT NULL,
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 14472)
+++ core/install/upgrades.sql (working copy)
@@ -2039,4 +2039,12 @@
DROP PassResetTime,
CHANGE PwResetConfirm PwResetConfirm VARCHAR(255) NOT NULL;
-UPDATE PortalUser SET PwRequestTime = NULL WHERE PwRequestTime = 0;
\ No newline at end of file
+UPDATE PortalUser SET PwRequestTime = NULL WHERE PwRequestTime = 0;
+
+ALTER TABLE Category
+ ADD DirectLinkEnabled TINYINT NOT NULL DEFAULT '1',
+ ADD DirectLinkAuthKey VARCHAR(20) NOT NULL;
+
+UPDATE Category
+SET DirectLinkAuthKey = SUBSTRING( MD5( CONCAT(CategoryId, ':', ParentId, ':', l<%PRIMARY_LANGUAGE%>_Name, ':b38') ), 1, 20)
+WHERE DirectLinkAuthKey = '';
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 14472)
+++ core/units/categories/categories_config.php (working copy)
@@ -401,6 +401,12 @@
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array (
Index: core/units/categories/categories_event_handler.php
===================================================================
--- core/units/categories/categories_event_handler.php (revision 14472)
+++ core/units/categories/categories_event_handler.php (working copy)
@@ -1445,20 +1445,21 @@
*/
function checkItemStatus(&$event)
{
- $status_fields = $this->Application->getUnitOption($event->Prefix,'StatusField');
- if (!$status_fields) {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ( !$object->isLoaded() ) {
return true;
}
- $status_field = array_shift($status_fields);
- if ($status_field == 'Status' || $status_field == 'Enabled') {
- $object =& $event->getObject();
- if (!$object->isLoaded()) {
- return true;
+ if ( $object->GetDBField('Status') != STATUS_ACTIVE && $object->GetDBField('Status') != 4 ) {
+ if ( !$object->GetDBField('DirectLinkEnabled') || !$object->GetDBField('DirectLinkAuthKey') ) {
+ return false;
}
- return $object->GetDBField($status_field) == STATUS_ACTIVE || $object->GetDBField($status_field) == 4;
+ return $this->Application->GetVar('authkey') == $object->GetDBField('DirectLinkAuthKey');
}
+
return true;
}
@@ -1602,6 +1603,17 @@
$object->SetError('cust_RssSource', 'not_allowed', 'la_error_NotAllowed');
}
}
+
+ if ( !$object->GetDBField('DirectLinkAuthKey') ) {
+ $key_parts = Array (
+ $object->GetID(),
+ $object->GetDBField('ParentId'),
+ $object->GetField('Name'),
+ 'b38'
+ );
+
+ $object->SetDBField('DirectLinkAuthKey', substr( md5( implode(':', $key_parts) ), 0, 20 ));
+ }
}
/**
Index: core/units/categories/categories_tag_processor.php
===================================================================
--- core/units/categories/categories_tag_processor.php (revision 14472)
+++ core/units/categories/categories_tag_processor.php (working copy)
@@ -1655,6 +1655,28 @@
return $this->Application->HREF($object->GetDBField('NamedParentPath'), '_FRONT_END_', $url_params);
}
+ function DirectLink($params)
+ {
+ $object =& $this->getObject($params);
+
+ $themes_helper =& $this->Application->recallObject('ThemesHelper');
+ /* @var $themes_helper kThemesHelper */
+
+ $url_params = Array (
+ 'm_cat_id' => $object->GetID(),
+ 'm_theme' => $themes_helper->getCurrentThemeId(),
+ 'pass' => 'm',
+ 'index_file' => 'index.php',
+ 'authkey' => $object->GetDBField('DirectLinkAuthKey'),
+ );
+
+ if ($this->Application->ConfigValue('UseModRewrite')) {
+ $url_params['__MOD_REWRITE__'] = 1;
+ }
+
+ return $this->Application->HREF($object->GetDBField('NamedParentPath'), '_FRONT_END_', $url_params);
+ }
+
/**
* Builds link to cms page (used?)
*
Index: core/units/structure/structure_config.php
===================================================================
--- core/units/structure/structure_config.php (revision 14472)
+++ core/units/structure/structure_config.php (working copy)
@@ -207,6 +207,12 @@
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
+ 'DirectLinkEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1
+ ),
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array(
Access-WithLink-URL-2011-07-22_1441.png [^] (135,333 bytes) 2011-07-22 14:44

keep_section_properties_link_clean.patch [^] (576 bytes) 2011-07-25 08:01
[Show Content]
Index: categories_event_handler.php
===================================================================
--- categories_event_handler.php (revision 14472)
+++ categories_event_handler.php (working copy)
@@ -228,6 +228,11 @@
$this->Application->StoreVar('IsRootCategory_'.$this->Application->GetVar('m_wid'), ($category_id === '0') || ($category_id == $home_category));
parent::OnEdit($event);
+
+ if ($event->status == erSUCCESS) {
+ // keep "Section Properties" link (in browse modes) clean
+ $this->Application->DeleteVar('admin');
+ }
}
/**
|