Index: core/admin_templates/regional/email_messages_edit.tpl
===================================================================
RCS file: /www/cvs/kernel.X/core/admin_templates/regional/email_messages_edit.tpl,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 email_messages_edit.tpl
--- core/admin_templates/regional/email_messages_edit.tpl 26 Feb 2008 06:56:44 -0000 1.4.2.1
+++ core/admin_templates/regional/email_messages_edit.tpl 16 Mar 2011 11:15:14 -0000
@@ -40,7 +40,7 @@
<!-- <inp2:m_RenderElement name="inp_label" prefix="emailmessages" field="Type" title="!la_fld_EventType!"/> -->
<inp2:m_RenderElement name="inp_edit_box" prefix="emailmessages" field="Subject" title="!la_fld_Subject!" size="60"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="emailmessages" field="MessageType" title="!la_fld_MessageType!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" control_options="{min_height: 100}" rows="5" cols="60"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" allow_html="0" control_options="{min_height: 100}" rows="5" cols="60"/>
<inp2:m_RenderElement name="subsection" title="!la_section_Message!"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Body" title="!la_fld_MessageBody!" control_options="{min_height: 200}" rows="20" cols="85"/>
</table>
Index: core/admin_templates/regional/languages_edit.tpl
===================================================================
RCS file: /www/cvs/kernel.X/core/admin_templates/regional/languages_edit.tpl,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 languages_edit.tpl
--- core/admin_templates/regional/languages_edit.tpl 18 Oct 2008 23:08:06 -0000 1.5.2.5
+++ core/admin_templates/regional/languages_edit.tpl 16 Mar 2011 11:15:51 -0000
@@ -79,7 +79,7 @@
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="Enabled" title="!la_fld_Enabled!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="UnitSystem" title="!la_fld_UnitSystem!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="Locale" title="!la_fld_Locale!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" title="la_fld_FilenameReplacements" control_options="{min_height: 200}" cols="50" rows="10"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" title="la_fld_FilenameReplacements" allow_html="0" control_options="{min_height: 200}" cols="50" rows="10"/>
<inp2:m_if check="lang_IsNewMode">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_inc param="tab_index" by="1"/>
Index: core/install.php
===================================================================
RCS file: /www/cvs/kernel.X/core/install.php,v
retrieving revision 1.12.2.17
diff -u -r1.12.2.17 install.php
--- core/install.php 22 Oct 2008 09:44:22 -0000 1.12.2.17
+++ core/install.php 16 Mar 2011 10:13:03 -0000
@@ -1,6 +1,6 @@
<?php
ini_set('display_errors', 1);
- error_reporting(E_ALL);
+ error_reporting(E_ALL ^ E_DEPRECATED);
define('IS_INSTALL', 1);
define('ADMIN', 1);
Index: core/kernel/db/db_tag_processor.php
===================================================================
RCS file: /www/cvs/kernel4_dev/kernel4/db/db_tag_processor.php,v
retrieving revision 1.97.2.36.14.4
diff -u -r1.97.2.36.14.4 db_tag_processor.php
--- core/kernel/db/db_tag_processor.php 27 Mar 2009 19:24:19 -0000 1.97.2.36.14.4
+++ core/kernel/db/db_tag_processor.php 16 Mar 2011 11:17:33 -0000
@@ -2061,6 +2061,7 @@
function FCKEditor($params)
{
$params['no_special'] = 1;
+ $params['format'] = array_key_exists('format', $params) ? $params['format'] . ';fck_ready' : 'fck_ready';
$value = $this->Field($params);
$name = array_key_exists('name', $params) ? $params['name'] : $this->InputName($params);
Index: core/kernel/utility/debugger.php
===================================================================
RCS file: /www/cvs/kernel4_dev/kernel4/utility/debugger.php,v
retrieving revision 1.76.2.15.14.2
diff -u -r1.76.2.15.14.2 debugger.php
--- core/kernel/utility/debugger.php 31 Mar 2009 18:53:57 -0000 1.76.2.15.14.2
+++ core/kernel/utility/debugger.php 16 Mar 2011 10:13:03 -0000
@@ -945,13 +945,20 @@
);
if (defined('E_STRICT')) {
+ // since PHP 5
$error_map['PHP5 Strict'] = Array(E_STRICT);
}
if (defined('E_RECOVERABLE_ERROR')) {
+ // since PHP 5.2
$error_map['Fatal Error (recoverable)'] = Array(E_RECOVERABLE_ERROR);
}
+ if (defined('E_DEPRECATED')) {
+ // since PHP 5.3
+ $error_map['PHP5 Depricated'] = Array(E_DEPRECATED, E_USER_DEPRECATED);
+ }
+
foreach ($error_map as $error_name => $error_codes) {
if (in_array($error_code, $error_codes)) {
return $error_name;
@@ -1255,7 +1262,15 @@
return false;
}
- if ($this->constOn('DBG_IGNORE_STRICT_ERRORS') && defined('E_STRICT') && ($errno == E_STRICT)) return;
+ if ($this->constOn('DBG_IGNORE_STRICT_ERRORS')) {
+ if (defined('E_STRICT') && ($errno == E_STRICT)) {
+ return;
+ }
+
+ if (defined('E_DEPRECATED') && ($errno == E_DEPRECATED)) {
+ return;
+ }
+ }
if (preg_match('/(.*)#([\d]+)$/', $errstr, $rets) ) {
// replace short message with long one (due triger_error limitations on message size)
Index: core/kernel/utility/formatters/formatter.php
===================================================================
RCS file: /www/cvs/kernel4_dev/kernel4/utility/formatters/formatter.php,v
retrieving revision 1.5.2.2
diff -u -r1.5.2.2 formatter.php
--- core/kernel/utility/formatters/formatter.php 26 Aug 2008 17:07:56 -0000 1.5.2.2
+++ core/kernel/utility/formatters/formatter.php 16 Mar 2011 11:20:58 -0000
@@ -2,6 +2,37 @@
class kFormatter extends kBase {
+ /**
+ * Reference to category helper
+ *
+ * @var CategoryHelper
+ */
+ var $_categoryHelper = null;
+
+ function kFormatter()
+ {
+ parent::kBase();
+
+ $this->_categoryHelper =& $this->Application->recallObject('CategoryHelper');
+ }
+
+ /**
+ * Replace FCK links like "@@ID@@" to real page urls, when "using_fck" option is set.
+ *
+ * @param string $text
+ * @param Array $options
+ * @param string $format
+ * @return string
+ */
+ function _replaceFCKLinks(&$value, $options, $format = null)
+ {
+ if ((isset($format) && strpos($format, 'fck_ready') !== false) || (!array_key_exists('using_fck', $options) || !$options['using_fck'])) {
+ // in textarea, where fck will be used OR not using fck
+ return $value;
+ }
+
+ return $this->_categoryHelper->replacePageIds($value);
+ }
/**
* Convert's value to match type from config
@@ -72,23 +103,40 @@
//function Format($value, $options, &$errors)
function Format($value, $field_name, &$object, $format=null)
{
- if ( is_null($value) ) return '';
+ if ( is_null($value) ) {
+ return '';
+ }
$options = $object->GetFieldOptions($field_name);
- if ( isset($format) ) $options['format'] = $format;
- $tc_value = $value; // $this->TypeCast($value,$options);
- if( ($tc_value === false) || ("$tc_value" != "$value") ) return $value; // for leaving badly formatted date on the form
+ if (!isset($format) && array_key_exists('format', $options)) {
+ $format = $options['format'];
+ }
+
+ if ($value === false) {
+ // used ?
+ return $value; // for leaving badly formatted date on the form
+ }
+
+ $original_format = $format;
+ if (isset($format)) {
+ if (strpos($format, 'fck_ready') !== false) {
+ $format = trim(str_replace('fck_ready', '', $format), ';');
+ }
+ }
- if (isset($options['format'])) {
- $tc_value = sprintf($options['format'], $tc_value);
+ if (isset($format) && $format) {
+ $value = sprintf($format, $value);
}
if (preg_match('#int|integer|double|float|real|numeric#', $options['type'])) {
$lang =& $this->Application->recallObject('lang.current');
- return $lang->formatNumber($tc_value);
+ return $lang->formatNumber($value);
+ }
+ elseif ($options['type'] == 'string') {
+ $value = $this->_replaceFCKLinks($value, $options, $original_format);
}
- return $tc_value;
+ return $value;
}
/**
Index: core/kernel/utility/formatters/multilang_formatter.php
===================================================================
RCS file: /www/cvs/kernel4_dev/kernel4/utility/formatters/multilang_formatter.php,v
retrieving revision 1.7.2.2
diff -u -r1.7.2.2 multilang_formatter.php
--- core/kernel/utility/formatters/multilang_formatter.php 21 Aug 2008 14:19:12 -0000 1.7.2.2
+++ core/kernel/utility/formatters/multilang_formatter.php 16 Mar 2011 11:21:49 -0000
@@ -133,12 +133,17 @@
$options = $object->GetFieldOptions($field_name);
$format = isset($format) ? $format : ( isset($options['format']) ? $options['format'] : null);
- if ( $value == '' && $format != 'no_default') { // try to get default language value
+ // use strpos, becase 2 comma-separated formats could be specified
+ if ($value == '' && strpos($format, 'no_default') === false) { // try to get default language value
$def_lang_value = $object->GetDBField('l'.$this->Application->GetDefaultLanguageId().'_'.$master_field);
- if ($def_lang_value == '') return NULL;
- return $def_lang_value; //return value from default language
+ if ($def_lang_value == '') {
+ return NULL;
+ }
+
+ return $this->_replaceFCKLinks($def_lang_value, $options, $format); //return value from default language
}
- return $value;
+
+ return $this->_replaceFCKLinks($value, $options, $format);
}
/**
Index: core/units/categories/categories_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/categories/categories_config.php,v
retrieving revision 1.66.2.10
diff -u -r1.66.2.10 categories_config.php
--- core/units/categories/categories_config.php 15 Oct 2008 09:43:27 -0000 1.66.2.10
+++ core/units/categories/categories_config.php 16 Mar 2011 11:10:19 -0000
@@ -265,12 +265,12 @@
'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 0, 'default' => null),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'format' => 'no_default', 'using_fck' => 1, 'default' => null),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#', 'required' => 1, 'not_null' => 1),
'EditorsPick' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 2),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
+ 'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'CachedDescendantCatsQty' => Array('type' => 'int', 'default' => 0),
'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
@@ -279,7 +279,7 @@
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'NamedParentPath' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
Index: core/units/email_messages/email_messages_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/email_messages/email_messages_config.php,v
retrieving revision 1.10.2.3
diff -u -r1.10.2.3 email_messages_config.php
--- core/units/email_messages/email_messages_config.php 23 Sep 2008 12:33:16 -0000 1.10.2.3
+++ core/units/email_messages/email_messages_config.php 16 Mar 2011 11:27:58 -0000
@@ -57,8 +57,8 @@
),
'VirtualFields' => Array (
- 'Headers' => Array('type'=>'string'),
- 'Body' => Array('type'=>'string'),
+ 'Headers' => Array('type' => 'string', 'default' => ''),
+ 'Body' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => ''),
'ReplacementTags' => Array ('type' => 'string', 'default' => null),
'Description' => Array('type'=>'string', 'sql_filter_type'=>'having'),
'Module' => Array('type' => 'string','not_null' => '1','default' => ''),
@@ -67,8 +67,8 @@
// for mass mail sending
'MassSubject' => Array ('type' => 'string', 'default' => ''),
'MassAttachment' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'max_size' => 50000000, 'default' => ''),
- 'MassHtmlMessage' => Array ('type' => 'string', 'default' => 'Type your Message Here'),
- 'MassTextMessage' => Array ('type' => 'string', 'default' => 'Type your Message Here'),
+ 'MassHtmlMessage' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => 'Type your Message Here'),
+ 'MassTextMessage' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => 'Type your Message Here'),
),
'Grids' => Array(
Index: core/units/general/helpers/category_helper.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/general/helpers/category_helper.php,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 category_helper.php
--- core/units/general/helpers/category_helper.php 2 Oct 2007 15:07:11 -0000 1.3.2.1
+++ core/units/general/helpers/category_helper.php 16 Mar 2011 11:29:33 -0000
@@ -238,6 +238,42 @@
}
return false;
}
+
+ /**
+ * Replace links like "@@ID@@" to actual template names in given text
+ *
+ * @param string $text
+ * @return string
+ */
+ function replacePageIds($text)
+ {
+ if (!preg_match_all('/@@(\\d+)@@/', $text, $regs)) {
+ return $text;
+ }
+
+ $page_ids = $regs[1];
+
+ $sql = 'SELECT NamedParentPath, CategoryId
+ FROM ' . TABLE_PREFIX . 'Category
+ WHERE CategoryId IN (' . implode(',', $page_ids) . ')';
+ $templates = $this->Conn->GetCol($sql, 'CategoryId');
+
+ foreach ($page_ids as $page_id) {
+ if (!array_key_exists($page_id, $templates)) {
+ // internal page was deleted, but link to it was found in given content block data
+ continue;
+ }
+
+ $url_params = Array ('m_cat_id' => $page_id, 'pass' => 'm');
+ $page_url = $this->Application->HREF(strtolower($templates[$page_id]), '', $url_params);
+ /*if ($this->Application->IsAdmin()) {
+ $page_url = preg_replace('/&(admin|editing_mode)=[\d]/', '', $page_url);
+ }*/
+ $text = preg_replace('/@@' . $page_id . '@@/', $page_url, $text);
+ }
+
+ return $text;
+ }
}
Index: core/units/groups/groups_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/groups/groups_config.php,v
retrieving revision 1.21.2.4
diff -u -r1.21.2.4 groups_config.php
--- core/units/groups/groups_config.php 21 Sep 2008 17:13:21 -0000 1.21.2.4
+++ core/units/groups/groups_config.php 16 Mar 2011 11:30:04 -0000
@@ -70,7 +70,7 @@
'Fields' => Array (
'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
- 'Description' => Array ('type' => 'string', 'default' => null),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'System' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Personal' => Array ('type' => 'int','not_null' => 1, 'default' => 0),
Index: core/units/phrases/phrases_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/phrases/phrases_config.php,v
retrieving revision 1.14.2.1
diff -u -r1.14.2.1 phrases_config.php
--- core/units/phrases/phrases_config.php 15 Oct 2008 19:51:33 -0000 1.14.2.1
+++ core/units/phrases/phrases_config.php 16 Mar 2011 11:30:48 -0000
@@ -110,7 +110,7 @@
'not_null' => 1, 'default' => ''
),
- 'Translation' => Array ('type' => 'string', 'required'=>1,'not_null' => '1', 'default' => ''),
+ 'Translation' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'required' => 1, 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'PhraseType' => Array ('type' => 'int', 'required'=>1,'formatter' => 'kOptionsFormatter', 'options'=>Array (0=>'la_PhraseType_Front',1=>'la_PhraseType_Admin',2=>'la_PhraseType_Both'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'PhraseId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
Index: core/units/reviews/reviews_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/reviews/reviews_config.php,v
retrieving revision 1.14.2.2
diff -u -r1.14.2.2 reviews_config.php
--- core/units/reviews/reviews_config.php 8 Apr 2008 12:29:59 -0000 1.14.2.2
+++ core/units/reviews/reviews_config.php 16 Mar 2011 11:31:16 -0000
@@ -147,7 +147,7 @@
'Fields' => Array (
'ReviewId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default'=>'#NOW#'),
- 'ReviewText' => Array('type'=>'string','required'=>1,'not_null'=>1,'default'=>''),
+ 'ReviewText' => Array('type' => 'string', 'formatter' => 'kFormatter', 'required' => 1, 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'Rating' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_None', 1 => 'lu_Rating_1', 2 => 'lu_Rating_2', 3 => 'lu_Rating_3', 4 => 'lu_Rating_4', 5 => 'lu_Rating_5'), 'use_phrases' => 1, 'min_value_inc' => 0, 'max_value_inc' => 5, 'default' => 0),
'IPAddress' => Array('type'=>'string','max_value_inc'=>15,'not_null'=>1,'default'=>''),
'ItemId' => Array('type'=>'int','not_null'=>1,'default'=>0),
Index: core/units/selectors/selectors_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/selectors/selectors_config.php,v
retrieving revision 1.10
diff -u -r1.10 selectors_config.php
--- core/units/selectors/selectors_config.php 18 Apr 2007 15:12:31 -0000 1.10
+++ core/units/selectors/selectors_config.php 16 Mar 2011 11:31:54 -0000
@@ -7,14 +7,14 @@
'EventHandlerClass' => Array('class'=>'SelectorsEventHandler','file'=>'selectors_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'SelectorsTagProcessor','file'=>'selectors_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
-
+
'Clones' => Array(
'selectorsbase' => Array(
'Hooks' => Array(),
'Constrain' => 'Type = 1',
'SubItems' => Array('selectorsblock'),
),
-
+
'selectorsblock' => Array(
'Hooks' => Array(),
'Constrain' => 'Type = 2',
@@ -23,8 +23,8 @@
'ParentPrefix' => 'selectorsbase',
),
),
-
- 'Hooks' => Array(
+
+ 'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
@@ -35,7 +35,7 @@
'DoSpecial' => '',
'DoEvent' => 'OnPrepareBaseStyles',
),
-
+
Array(
'Mode' => hAFTER,
'Conditional' => false,
@@ -47,7 +47,7 @@
'DoEvent' => 'OnPrepareBaseStyles',
),
),
-
+
'MyHooks' => Array(
Array(
'Mode' => hAFTER,
@@ -58,43 +58,43 @@
'DoEvent' => 'OnMyEvent',
),
),
-
+
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'SelectorId',
-
+
'TitleField' => 'Name',
-
+
'TableName' => TABLE_PREFIX.'StylesheetSelectors',
-
+
'ForeignKey' => 'StylesheetId',
'ParentTableKey' => 'StylesheetId',
- 'ParentPrefix' => 'css',
+ 'ParentPrefix' => 'css',
'AutoDelete' => true,
'AutoClone' => true,
-
+
'ListSQLs' => Array( ''=>' SELECT %1$s.*
FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
- 'ListSortings' => Array(
+ 'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
- ),
+ ),
'Fields' => Array(
'SelectorId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'StylesheetId' => Array('type' => 'int', 'unique'=>Array('SelectorName'), 'current_table_only' => 1, 'not_null' => 1, 'default' => 0),
'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
'SelectorName' => Array('type' => 'string', 'unique'=>Array('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1','default' => '','required'=>1),
'SelectorData' => Array('type' => 'string', 'not_null' => '1','default' => ''),
- 'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'AdvancedCSS' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'required' => 1, 'not_null' => 1, 'default' => 0),
),
@@ -108,7 +108,7 @@
'StyleVisibility' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','visible'=>'visible','hidden'=>'hidden','collapse'=>'collapse') ),
'StylePosition' => Array('type'=>'string', 'formatter'=>'kOptionsFormatter', 'options'=>Array(''=>'','inherit'=>'inherit','static'=>'static','relative'=>'relative','absolute'=>'absolute','fixed'=>'fixed') ),
),
-
+
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_selector.gif'),
@@ -118,7 +118,7 @@
'Description' => Array( 'title'=>'la_col_Description', 'data_block' => 'grid_description_td' ),
),
),
-
+
'BlockStyles' => Array(
'Icons' => Array('default'=>'icon16_selector.gif'),
'Fields' => Array(
Index: core/units/stylesheets/stylesheets_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/stylesheets/stylesheets_config.php,v
retrieving revision 1.12.2.3
diff -u -r1.12.2.3 stylesheets_config.php
--- core/units/stylesheets/stylesheets_config.php 15 Oct 2008 08:13:30 -0000 1.12.2.3
+++ core/units/stylesheets/stylesheets_config.php 16 Mar 2011 11:32:26 -0000
@@ -91,8 +91,8 @@
'Fields' => Array(
'StylesheetId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1),
- 'Description' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
+ 'AdvancedCSS' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'LastCompiled' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => 0),
'Enabled' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => '1','default' => 0),
),
Index: core/units/themes/themes_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/themes/themes_config.php,v
retrieving revision 1.17.2.4
diff -u -r1.17.2.4 themes_config.php
--- core/units/themes/themes_config.php 2 Sep 2008 15:25:55 -0000 1.17.2.4
+++ core/units/themes/themes_config.php 16 Mar 2011 11:32:45 -0000
@@ -87,7 +87,7 @@
'ThemeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array('type' => 'string','not_null' => 1, 'required' => 1, 'default' => ''),
'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1=>'la_Enabled', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string','default' => null),
+ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'PrimaryTheme' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'CacheTimeout' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'StylesheetId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Stylesheets', 'option_key_field' => 'StylesheetId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0),
Index: core/units/translator/translator_config.php
===================================================================
RCS file: /www/cvs/kernel.X/core/units/translator/translator_config.php,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 translator_config.php
--- core/units/translator/translator_config.php 20 Aug 2008 06:29:46 -0000 1.5.2.1
+++ core/units/translator/translator_config.php 16 Mar 2011 11:33:08 -0000
@@ -38,7 +38,7 @@
'Original' => Array(),
'Language' => Array(),
'SwitchLanguage' => Array('formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Language', 'option_key_field' => 'LanguageId','option_title_field' => 'PackName'),
- 'Translation' => Array(),
+ 'Translation' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => ''),
),
'Grids' => Array(),
);
Index: custom/admin_templates/forms/form_field_edit.tpl
===================================================================
RCS file: /www/cvs/intechnic4/custom/admin_templates/forms/Attic/form_field_edit.tpl,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 form_field_edit.tpl
--- custom/admin_templates/forms/form_field_edit.tpl 13 Feb 2009 11:33:10 -0000 1.1.2.2
+++ custom/admin_templates/forms/form_field_edit.tpl 16 Mar 2011 11:14:09 -0000
@@ -41,7 +41,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="Prompt" title="!la_prompt_FieldPrompt!" size="40"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="formflds" field="ElementType" title="!la_prompt_InputType!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="formflds" field="Validation" title="!la_prompt_validation!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="formflds" field="ValueList" title="!la_prompt_ValueList!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="formflds" field="ValueList" title="!la_prompt_ValueList!" allow_html="0" cols="40" rows="5"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="DefaultValue" title="!la_prompt_DefaultValue!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="Priority" title="!la_field_Priority!" size="10"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="formflds" field="Required" title="!la_fld_Required!"/>
Index: custom/units/sections/custom_eh.php
===================================================================
RCS file: /www/cvs/intechnic4/custom/units/sections/custom_eh.php,v
retrieving revision 1.1.1.1.2.6
diff -u -r1.1.1.1.2.6 custom_eh.php
--- custom/units/sections/custom_eh.php 24 Aug 2009 10:59:29 -0000 1.1.1.1.2.6
+++ custom/units/sections/custom_eh.php 16 Mar 2011 10:13:03 -0000
@@ -13,7 +13,7 @@
function CustomEventHandler()
{
- parent::kEventHandler();
+ parent::kBase();
$this->Conn =& $this->Application->GetADODBConnection();
}
Index: proj-base/admin_templates/incs/form_blocks.tpl
===================================================================
RCS file: /www/cvs/proj-base/admin_templates/incs/form_blocks.tpl,v
retrieving revision 1.10.2.32.12.2
diff -u -r1.10.2.32.12.2 form_blocks.tpl
--- proj-base/admin_templates/incs/form_blocks.tpl 6 Feb 2009 20:53:30 -0000 1.10.2.32.12.2
+++ proj-base/admin_templates/incs/form_blocks.tpl 16 Mar 2011 11:13:06 -0000
@@ -330,7 +330,8 @@
<inp2:m_phrase label="$title"/><inp2:m_if check="{$prefix}_IsRequired" field="$field"><span class="field-required"> *</span></inp2:m_if>:</span><br>
<inp2:m_if check="m_ParamEquals" name="allow_html" value="allow_html">
<inp2:{$prefix}_InputName field="$field" result_to_var="input_name"/>
- <a href="<inp2:m_Link template='$edit_template' TargetField='$input_name' pass_through='TargetField' pass='m,$prefix'/>" onclick="openwin(this.href, 'html_edit', 800, 575); return false;">
+ <a href="<inp2:m_Link template='$edit_template' TargetField='$input_name' pass_through='TargetField' pass='m,$prefix'/>" onclick="openSelector('<inp2:m_Param name='prefix' js_escape='1'/>', this.href, '', '800x575'); return false;">
+
<img src="img/icons/icon24_link_editor.gif" style="cursor: hand;" border="0">
</a>
<!-- <a href="javascript:OpenEditor('§ion=in-link:editlink_general','kernel_form','<inp2:{$prefix}_InputName field="$field"/>');"><img src="img/icons/icon24_link_editor.gif" style="cursor:hand" border="0"></a> -->
@@ -344,7 +345,7 @@
fields['<inp2:m_Param name="prefix" js_escape="1"/>']['<inp2:m_Param name="field" js_escape="1"/>'] = '<inp2:m_phrase label="$title" js_escape="1"/>'
</script>
<td class="control-cell">
- <textarea style="<inp2:m_Param name="style"/>" tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" ><inp2:{$prefix}_Field field="$field" format="$format"/></textarea>
+ <textarea style="<inp2:m_Param name='style'/>" tabindex="<inp2:m_get param='tab_index'/>" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" ><inp2:{$prefix}_Field field="$field" format="fck_ready;{$format}"/></textarea>
<script type="text/javascript">
Form.addControl('<inp2:{$prefix}_InputName field="$field"/>', <inp2:m_param name="control_options"/>);
</script>
@@ -382,7 +383,7 @@
</td>
<td class="control-mid"> </td>
<td>
- <textarea tabindex="<inp2:m_get param="tab_index"/>" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" cols="<inp2:m_param name="cols"/>" rows="<inp2:m_param name="rows"/>" class="<inp2:m_param name="class"/>"><inp2:{$prefix}_Field field="$field"/></textarea>
+ <textarea tabindex="<inp2:m_get param='tab_index'/>" id="<inp2:{$prefix}_InputName field='$field'/>" name="<inp2:{$prefix}_InputName field='$field'/>" cols="<inp2:m_param name='cols'/>" rows="<inp2:m_param name='rows'/>" class="<inp2:m_param name='class'/>"><inp2:{$prefix}_Field field="$field" format="fck_ready,{$format}"/></textarea>
</td>
<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
<inp2:m_if check="{$prefix}_DisplayOriginal" pass_params="1">
Index: proj-base/units/sections/proj_base_event_handler.php
===================================================================
RCS file: /www/cvs/proj-base/units/sections/proj_base_event_handler.php,v
retrieving revision 1.7.2.9
diff -u -r1.7.2.9 proj_base_event_handler.php
--- proj-base/units/sections/proj_base_event_handler.php 16 Oct 2008 08:50:19 -0000 1.7.2.9
+++ proj-base/units/sections/proj_base_event_handler.php 16 Mar 2011 10:13:30 -0000
@@ -12,7 +12,7 @@
function ProjBaseEventHandler()
{
- parent::kEventHandler();
+ parent::kBase();
$this->Conn =& $this->Application->GetADODBConnection();
}
Index: proj-cms/admin_templates/config/email_messages_edit.tpl
===================================================================
RCS file: /www/cvs/proj-cms/admin_templates/config/email_messages_edit.tpl,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 email_messages_edit.tpl
--- proj-cms/admin_templates/config/email_messages_edit.tpl 26 Sep 2008 16:38:33 -0000 1.5.2.1
+++ proj-cms/admin_templates/config/email_messages_edit.tpl 16 Mar 2011 11:14:58 -0000
@@ -44,7 +44,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="emailmessages" field="Subject" title="!la_fld_Subject!" size="60"/>
<!--<inp2:m_RenderElement name="inp_edit_radio" prefix="emailmessages" field="MessageType" title="!la_fld_MessageType!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" rows="5" cols="60"/>-->
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" allow_html="0" rows="5" cols="60"/>-->
<inp2:m_RenderElement name="subsection" title="!la_section_Message!"/>
<inp2:m_RenderElement name="inp_edit_fck" prefix="emailmessages" field="Body" title="!la_fld_ExtraHeaders!" rows="5" cols="60" control_options="{min_height: 200}"/>
Index: proj-cms/admin_templates/forms/form_field_edit.tpl
===================================================================
RCS file: /www/cvs/proj-cms/admin_templates/forms/form_field_edit.tpl,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 form_field_edit.tpl
--- proj-cms/admin_templates/forms/form_field_edit.tpl 22 Jan 2008 09:55:11 -0000 1.4.2.1
+++ proj-cms/admin_templates/forms/form_field_edit.tpl 16 Mar 2011 11:13:58 -0000
@@ -41,7 +41,7 @@
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="Prompt" title="!la_prompt_FieldPrompt!" size="40"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="formflds" field="ElementType" title="!la_prompt_InputType!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="formflds" field="Validation" title="!la_prompt_validation!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="formflds" field="ValueList" title="!la_prompt_ValueList!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="formflds" field="ValueList" title="!la_prompt_ValueList!" allow_html="0" cols="40" rows="5"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="DefaultValue" title="!la_prompt_DefaultValue!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="formflds" field="Priority" title="!la_field_Priority!" size="10"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="formflds" field="Required" title="!la_fld_Required!"/>
Index: proj-cms/units/content/content_config.php
===================================================================
RCS file: /www/cvs/proj-cms/units/content/content_config.php,v
retrieving revision 1.5
diff -u -r1.5 content_config.php
--- proj-cms/units/content/content_config.php 19 Apr 2007 09:56:34 -0000 1.5
+++ proj-cms/units/content/content_config.php 16 Mar 2011 11:26:54 -0000
@@ -50,7 +50,7 @@
'PageContentId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ContentNum' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'PageId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'Content' => Array('type' => 'string','formatter'=>'kMultiLanguage', 'format'=>'no_default', 'default' => ''),
+ 'Content' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'format' => 'no_default', 'using_fck' => 1, 'default' => ''),
'Translated' => Array ('type' => 'int', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => 0, 'db_type' => 'tinyint', 'index_type' => 'int'),
),
Index: proj-cms/units/forms/forms_config.php
===================================================================
RCS file: /www/cvs/proj-cms/units/forms/forms_config.php,v
retrieving revision 1.6
diff -u -r1.6 forms_config.php
--- proj-cms/units/forms/forms_config.php 25 Apr 2007 13:55:52 -0000 1.6
+++ proj-cms/units/forms/forms_config.php 16 Mar 2011 11:28:42 -0000
@@ -88,7 +88,7 @@
'Fields' => Array(
'FormId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
'Title' => Array('type' => 'string','not_null' => 1, 'default' => '','required' => 1),
- 'Description' => Array('type' => 'string', 'default' => null,),
+ 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
),
'Grids' => Array(
'Default' => Array(
Index: proj-cms/units/structure/structure_config.php
===================================================================
RCS file: /www/cvs/proj-cms/units/structure/structure_config.php,v
retrieving revision 1.9.64.4
diff -u -r1.9.64.4 structure_config.php
--- proj-cms/units/structure/structure_config.php 4 Mar 2009 19:55:33 -0000 1.9.64.4
+++ proj-cms/units/structure/structure_config.php 16 Mar 2011 11:09:15 -0000
@@ -157,19 +157,19 @@
'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'format'=>'no_default', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1),
'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'format'=>'no_default', 'default' => null),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'format' => 'no_default', 'using_fck' => 1, 'default' => null),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#', 'required' => 1, 'not_null' => 1),
'EditorsPick' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (4 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 4), // invisible
'Priority' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => array(), 'required' => 1, 'default' => 0),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
+ 'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'CachedDescendantCatsQty' => Array('type' => 'int', 'default' => 0),
'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0),
'ResourceId' => Array('type' => 'int', 'default' => null),
'ParentPath' => Array('type' => 'string', 'default' => null),
'NamedParentPath' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
@@ -189,7 +189,7 @@
'Title' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'format'=>'no_default', 'default' => '', 'not_null'=>1),
'MenuTitle' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'format'=>'no_default', 'not_null' => 1, 'default' => ''),
'MetaTitle' => Array('type' => 'string', 'default' => null),
- 'IndexTools' => Array('type' => 'string','default' => null),
+ 'IndexTools' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'IsIndex' =>
Array(
'type' => 'int','not_null' => 1, 'default' => 0,
Index: proj-cms/units/structure/structure_event_handler.php
===================================================================
RCS file: /www/cvs/proj-cms/units/structure/structure_event_handler.php,v
retrieving revision 1.6.2.2.12.4
diff -u -r1.6.2.2.12.4 structure_event_handler.php
--- proj-cms/units/structure/structure_event_handler.php 11 Mar 2009 16:24:23 -0000 1.6.2.2.12.4
+++ proj-cms/units/structure/structure_event_handler.php 16 Mar 2011 11:22:41 -0000
@@ -54,13 +54,13 @@
$object->addFilter('parent_filter', '(%1$s.ParentPath LIKE "|'.$root_category.'|%") AND (%1$s.CategoryId <> '.$root_category.')');
}
-
+
if ($event->Special == 'xmlsitemap') {
$root_category = $this->Application->findModule('Name', 'Proj-CMS', 'RootCat');
$object->addFilter('parent_filter', '(%1$s.ParentPath LIKE "|'.$root_category.'|%") AND (%1$s.CategoryId <> '.$root_category.')');
$object->addFilter('status_filter', 'Status IN (1,4)');
$object->addFilter('exclude_fromsitemap', 'ExcludeFromSitemap != 1');
-
+
$object->ClearOrderFields();
$object->AddOrderField('CategoryId');
}
@@ -111,14 +111,14 @@
else {
$not_found = $this->Application->ConfigValue('ErrorTemplate');
$real_t = $not_found ? $not_found : 'error_notfound';
-
+
$this->Application->SetVar('t', $real_t);
$this->Application->removeObject('st.-virtual');
-
+
header('HTTP/1.0 404 Not Found');
-
+
return $this->GetDesignTemplate();
-
+
}
}
$this->Application->SetVar('t', $t);
@@ -167,7 +167,7 @@
if ($object->GetDBField('Filename') != $object->GetOriginalField('Filename') && $object->GetOriginalField('Filename') != '') {
$this->Application->SetVar('FilenameChanged', array('from' => $object->GetOriginalField('Filename'), 'to' => $object->GetDBField('Filename')));
}
-
+
$tmp = $this->Application->RecallVar('priority_changes'.$this->Application->GetVar('m_wid'));
$changes = $tmp ? unserialize($tmp) : array();
@@ -568,10 +568,10 @@
}
$this->Application->StoreVar('RefreshStructureTree',1);
$this->OnResetMenuCache($event);
-
+
$this->UpdateOpenerStack();
}
-
+
/**
* If current page was renamed and it was in the opener stack - update it
* otherwise redirect will go to non-existent page
@@ -585,19 +585,19 @@
if (!($filename_change = $this->Application->GetVar('FilenameChanged'))) {
return;
}
-
+
if (!isset($wid)) $wid = $this->Application->GetVar('m_wid');
$stack_name = rtrim('opener_stack_'.$wid, '_');
$opener_stack = $this->Application->RecallVar($stack_name);
$opener_stack = $opener_stack ? unserialize($opener_stack) : Array();
-
+
$last = array_pop($opener_stack);
if (!$last) return ;
-
+
list($file, $q_string) = explode('|', $last);
$q_string = str_replace('/'.$filename_change['from'], '/'.$filename_change['to'], $q_string);
-
+
array_push($opener_stack, $file.'|'.$q_string);
$this->Application->StoreVar($stack_name, serialize($opener_stack));
}
@@ -817,17 +817,22 @@
$priority_helper->recalculatePriorities($event, 'ParentId = '.$parent_id);
$this->OnResetMenuCache($event);
}
-
+
/**
* Update Preview Block
*
* @param kEvent $event
- */
+ */
function OnUpdatePreviewBlock(&$event)
{
$event->status = erSTOP;
$string = unhtmlentities($this->Application->GetVar('preview_content'));
-
+
+ $category_helper =& $this->Application->recallObject('CategoryHelper');
+ /* @var $category_helper CategoryHelper */
+
+ $string = $category_helper->replacePageIds($string);
+
$this->Application->StoreVar('_editor_preview_content_', $string);
}
Index: proj-cms/units/structure/structure_tag_processor.php
===================================================================
RCS file: /www/cvs/proj-cms/units/structure/structure_tag_processor.php,v
retrieving revision 1.8.2.7.12.5
diff -u -r1.8.2.7.12.5 structure_tag_processor.php
--- proj-cms/units/structure/structure_tag_processor.php 15 Feb 2009 19:39:25 -0000 1.8.2.7.12.5
+++ proj-cms/units/structure/structure_tag_processor.php 16 Mar 2011 11:25:58 -0000
@@ -166,15 +166,18 @@
$data = $content->GetField('Content');
}
- // Replacing ID links with real links
- if (preg_match_all('/@@(\\d+)@@/', $data, $links)) {
- $tpls = $this->Conn->GetCol('SELECT NamedParentPath, CategoryId FROM '.TABLE_PREFIX.'Category WHERE CategoryId IN ('.join(',', $links[1]).')', 'CategoryId');
- foreach ($links[1] as $id) {
- $data = preg_replace('/@@'.$id.'@@/', $this->Application->HREF($tpls[$id], '', array('pass'=>'m')), $data);
- }
- }
+ return $edit_code . $this->_transformContentBlockData($data, $params);
+ }
- return $edit_code.$data;
+ /**
+ * Apply all kinds of content block data transformations without rewriting ContentBlock tag
+ *
+ * @param string $data
+ * @return string
+ */
+ function _transformContentBlockData(&$data, $params)
+ {
+ return $data;
}
function PageName($params)
@@ -399,7 +402,7 @@
if ($page['ItemType'] == 'page') {
$active = $page['ItemPath'] == preg_replace('/^Content\//', '', $this->Application->GetVar('t'));
}
-
+
if ($ext_url = $page['ExternalURL']) {
$template = 'external:' . (preg_match('/^(http|ftp):\\/\\/.*/', $ext_url) ? $ext_url : $this->Application->BaseURL().$ext_url);
}