Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl
===================================================================
diff -u -r7027 -r7036
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (.../admins_list.tpl) (revision 7027)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (.../admins_list.tpl) (revision 7036)
@@ -17,36 +17,56 @@
{
std_edit_item('u', 'proj-base/users/admins_edit');
}
-
+
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('proj-base:new_user', '',
function() {
std_precreate_item('u', 'proj-base/users/admins_edit')
} ) );
-
+
a_toolbar.AddButton( new ToolBarButton('edit', '', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '',
function() {
std_delete_items('u')
} ) );
-
-
+
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
-
+
+
a_toolbar.AddButton( new ToolBarButton('view', '', function() {
show_viewmenu(a_toolbar,'view');
}
- ) );
-
- a_toolbar.Render();
+ ) );
+
+ a_toolbar.Render();
+
+
+
+
+ |
-
+
Index: branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php
===================================================================
diff -u -r7021 -r7036
--- branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7021)
+++ branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7036)
@@ -70,9 +70,9 @@
}
//for compatability with K3 tags
- function Base()
+ function Base($params)
{
- return $this->TemplatesBase().'/';
+ return $this->TemplatesBase($params).'/';
}
function ProjectBase($params)
@@ -450,7 +450,7 @@
$if_false=$params['false'];
}
- if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/", $this->Application->GetVar('t'))) {
+ if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/i", $this->Application->GetVar('t'))) {
return $if_true;
}
else {
Index: branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php
===================================================================
diff -u -r7001 -r7036
--- branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7001)
+++ branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7036)
@@ -217,7 +217,7 @@
// don't show section for debug mode only without debug mode turned on
continue;
}
-
+
if (isset($section_data['tabs_only']) && $section_data['tabs_only']) {
$perm_status = false;
$folder_label = $section_data['label'];
@@ -363,18 +363,18 @@
function FCKEditor($params)
{
- include_once(FULL_PATH.'/admin/editor/cmseditor/fckeditor.php');
+ include_once(FULL_PATH.'/core/cmseditor/fckeditor.php');
$oFCKeditor = new FCKeditor($params['name']);
- $oFCKeditor->BasePath = BASE_PATH.'/admin/editor/cmseditor/';
+ $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/';
$oFCKeditor->Width = $params['width'] ;
$oFCKeditor->Height = $params['height'] ;
$oFCKeditor->ToolbarSet = 'Advanced' ;
$oFCKeditor->Value = '' ;
$oFCKeditor->Config = Array(
//'UserFilesPath' => $pathtoroot.'kernel/user_files',
'ProjectPath' => BASE_PATH.'/',
- 'CustomConfigurationsPath' => $this->Application->BaseURL().'admin/editor/inp_fckconfig.js',
- 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(),
+ 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/cmseditor/inp_fckconfig.js',
+// 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(),
//'StylesXmlPath' => '../../inp_styles.xml',
// 'Debug' => 1,
'Admin' => 1,
@@ -544,12 +544,12 @@
{
$width = $params['width'];
$height = $params['height'];
-
+
if ($this->Application->GetVar('ajax') == 'yes') {
// during AJAX request just output size
die($width.'x'.$height);
}
-
+
$t = $this->Application->GetVar('t');
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'PopupSizes
@@ -594,7 +594,7 @@
}
return $popup_info['PopupWidth'].'x'.$popup_info['PopupHeight'];
}
-
+
function UsePopups($params)
{
return (int)$this->Application->ConfigValue('UsePopups');
Index: branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php
===================================================================
diff -u -r7018 -r7036
--- branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 7018)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 7036)
@@ -1,49 +1,49 @@
Application->getUnitOption('c', 'IDField');
- $table_name = $this->Application->getUnitOption('c', 'TableName');
-
+ $id_field = $this->Application->getUnitOption($prefix, 'IDField');
+ $table_name = $this->Application->getUnitOption($prefix, 'TableName');
+
$sql = 'SELECT '.$id_field.'
FROM '.$table_name.'
WHERE ParentId = '.$category_id;
-
+
$sub_categories = $this->Conn->GetCol($sql);
if ($sub_categories) {
foreach ($sub_categories as $sub_category_id) {
$this->DeleteCategory($sub_category_id);
}
}
-
+
$ci_table = $this->Application->getUnitOption('ci', 'TableName');
// 1. remove category items from this category if it is supplemental (non-primary) category to them
$sql = 'DELETE FROM '.$ci_table.'
WHERE ('.$id_field.' = '.$category_id.') AND (PrimaryCat = 0)';
$this->Conn->Query($sql);
-
- $temp_handler =& $this->Application->recallObject('c_TempHandler', 'kTempTablesHandler');
-
+
+ $temp_handler =& $this->Application->recallObject($prefix.'_TempHandler', 'kTempTablesHandler');
+
// 2. delete items this have this category as primary
$delete_ids = $this->getCategoryItems($category_id, true);
-
+
foreach ($delete_ids as $item_prefix => $resource_ids) {
if (!$item_prefix) {
// not ItemPrefix filled -> old categoryitem linking
continue;
}
$item_ids = $this->GetItemIDs($item_prefix, $resource_ids);
$temp_handler->BuildTables($item_prefix, $item_ids);
- $temp_handler->DeleteItems($item_prefix, '', $item_ids);
+ $temp_handler->DeleteItems($item_prefix, '', $item_ids);
}
-
+
// 3. delete this category
- $temp_handler->BuildTables('c', Array($category_id));
- $temp_handler->DeleteItems('c', '', Array($category_id));
+ $temp_handler->BuildTables($prefix, Array($category_id));
+ $temp_handler->DeleteItems($prefix, '', Array($category_id));
}
-
+
/**
* Converts resource ids list to id field list for given prefix
*
@@ -56,30 +56,30 @@
if (!$resource_ids) {
return Array();
}
-
+
$id_field = $this->Application->getUnitOption($prefix, 'IDField');
$table_name = $this->Application->getUnitOption($prefix, 'TableName');
-
+
$sql = 'SELECT '.$id_field.'
FROM '.$table_name.'
WHERE ResourceId IN ('.implode(',', $resource_ids).')';
return $this->Conn->GetCol($sql);
}
-
+
// moves selected categories to destination category
function MoveCategories($category_ids, $dest_category_id)
{
if (!$category_ids) return ;
-
+
$id_field = $this->Application->getUnitOption('c', 'IDField');
$table_name = $this->Application->getUnitOption('c', 'TableName');
-
+
$sql = 'UPDATE '.$table_name.'
SET ParentId = '.$dest_category_id.'
WHERE '.$id_field.' IN ('.implode(',', $category_ids).')';
$this->Conn->Query($sql);
}
-
+
/**
* Complete cloning or category with subcategories and subitems
*
@@ -88,62 +88,62 @@
function PasteCategory($category_id, $prefix = 'c')
{
$backup_category_id = $this->Application->GetVar('m_cat_id');
-
+
// 1. clone category
$temp_handler =& $this->Application->recallObject($prefix.'_TempHandler', 'kTempTablesHandler');
$temp_handler->BuildTables($prefix, Array($category_id));
$new_category_id = array_pop( $temp_handler->CloneItems($prefix, '', Array($category_id)) );
$this->Application->SetVar('m_cat_id', $new_category_id);
-
+
$id_field = $this->Application->getUnitOption($prefix, 'IDField');
$table_name = $this->Application->getUnitOption($prefix, 'TableName');
-
+
// 2. assign supplemental items to current category to new category
$paste_ids = $this->getCategoryItems($category_id, false);
-
+
foreach ($paste_ids as $item_prefix => $resource_ids) {
if (!$item_prefix) {
// not ItemPrefix filled -> old categoryitem linking
continue;
}
-
+
$item_object =& $this->Application->recallObject($item_prefix.'.-item', null, Array('skip_autoload' => true));
foreach ($resource_ids as $item_resource_id) {
$item_object->Load($item_resource_id, 'ResourceId');
$item_object->assignToCategory($new_category_id, false);
}
}
-
+
// 3. clone items that have current category as primary
$paste_ids = $this->getCategoryItems($category_id, true);
-
+
foreach ($paste_ids as $item_prefix => $resource_ids) {
if (!$item_prefix) {
// not ItemPrefix filled -> old categoryitem linking
continue;
}
-
+
// 2. clone items from current category (for each prefix separately)
$item_ids = $this->GetItemIDs($item_prefix, $resource_ids);
$temp_handler->BuildTables($item_prefix, $item_ids);
$temp_handler->CloneItems($item_prefix, '', $item_ids);
}
-
+
// 4. do same stuff for each subcategory
$sql = 'SELECT '.$id_field.'
FROM '.$table_name.'
WHERE ParentId = '.$category_id;
-
+
$sub_categories = $this->Conn->GetCol($sql);
if ($sub_categories) {
foreach ($sub_categories as $sub_category_id) {
$this->PasteCategory($sub_category_id, $prefix);
}
}
-
+
$this->Application->SetVar('m_cat_id', $backup_category_id);
}
-
+
/**
* Returns grouped category items
*
@@ -154,12 +154,12 @@
function getCategoryItems($category_id, $item_primary_category = true)
{
$ci_table = $this->Application->getUnitOption('ci', 'TableName');
-
+
$sql = 'SELECT ItemPrefix, ItemResourceId
FROM '.$ci_table.'
WHERE (CategoryId = '.$category_id.') AND (PrimaryCat = '.($item_primary_category ? 1 : 0).')';
$category_items = $this->Conn->GetCol($sql, 'ItemResourceId');
-
+
$item_ids = Array();
foreach ($category_items as $resource_id => $item_prefix) {
$item_ids[$item_prefix][] = $resource_id;
Index: branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php
===================================================================
diff -u -r6881 -r7036
--- branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 6881)
+++ branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 7036)
@@ -676,6 +676,17 @@
}*/
}
+ if ($this->isModuleEnabled('Proj-CMS')) {
+ $cms_handler =& $this->recallObject('st_EventHandler');
+ if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) {
+ $t = $cms_handler->GetDesignTemplate();
+ }
+ /*else {
+ $cms_handler->SetCatByTemplate();
+ }*/
+ }
+
+
if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application before Parsing:');
}
@@ -1077,21 +1088,21 @@
$wid = $this->Application->GetVar('m_wid');
$stack_name = rtrim('opener_stack_'.$wid, '_');
$opener_stack = $this->RecallVar($stack_name);
-
+
if ($opener_stack && $opener_stack != serialize(Array())) {
$opener_stack = unserialize($opener_stack);
list($index_file, $env) = explode('|', $opener_stack[count($opener_stack) - 1]);
$ret = $this->BaseURL($prefix, $ssl).$index_file.'?'.ENV_VAR_NAME.'='.$env;
if ( getArrayValue($params,'escape') ) $ret = addslashes($ret);
-
+
if (isset($params['m_opener']) && $params['m_opener'] == 'u') {
array_pop($opener_stack);
if (!$opener_stack) {
$this->RemoveVar($stack_name);
// remove popups last templates, because popup is closing now
$this->RemoveVar('last_template_'.$wid);
$this->RemoveVar('last_template_popup_'.$wid);
-
+
// don't save popups last templates again :)
$this->SetVar('skip_last_template', 1);
}
@@ -1226,7 +1237,7 @@
return $pass_info;
}
- function BuildEnv_NEW($t, $params, $pass = 'all', $pass_events = false)
+ function BuildEnv_NEW($t, $params, $pass='all', $pass_events = false)
{
// $session =& $this->recallObject('Session');
$force_admin = getArrayValue($params,'admin') || $this->GetVar('admin');
@@ -2108,7 +2119,7 @@
}
return $current_prefix;
}
-
+
function &EmailEventAdmin($email_event_name, $to_user_id = -1, $send_params = false)
{
return $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
@@ -2212,7 +2223,7 @@
$mode = $this->GetVar($top_prefix.'_mode');
return $mode != '' ? substr($mode, 1) : '';
}
-
+
/**
* Get temp table name
*
@@ -2225,7 +2236,7 @@
if (preg_match('/prefix:(.*)/', $wid, $regs)) {
$wid = $this->GetTopmostWid($regs[1]);
}
-
+
return TABLE_PREFIX.'ses_'.$this->GetSID().($wid ? '_'.$wid : '').'_edit_'.$table;
}
@@ -2234,7 +2245,7 @@
if (preg_match('/prefix:(.*)/', $wid, $regs)) {
$wid = $this->GetTopmostWid($regs[1]);
}
-
+
return TABLE_PREFIX.'ses_'.$this->GetSID().($wid ? '_'.$wid : '').'_edit_';
}
@@ -2253,7 +2264,7 @@
{
if( preg_match('/'.TABLE_PREFIX.'ses_'.$this->GetSID().'(_[\d]+){0,1}_edit_(.*)/',$temp_table, $rets) )
{
- // cut wid from table end if any
+ // cut wid from table end if any
return $rets[2];
}
else
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js
===================================================================
diff -u -r7029 -r7036
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7029)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7036)
@@ -181,7 +181,7 @@
for (var i=0; igetTotal($this->SelectParam($params, 'field,name'), $params['function']);
}
+
+
+ function FCKEditor($params) {
+ $params['no_special'] = 1;
+ $value = $this->Field($params);
+ $name = $this->InputName($params);
+
+ include_once(FULL_PATH.'/core/cmseditor/fckeditor.php');
+ $oFCKeditor = new FCKeditor($name);
+ $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/';
+ $oFCKeditor->Width = $params['width'] ;
+ $oFCKeditor->Height = $params['height'] ;
+ $oFCKeditor->ToolbarSet = 'Advanced' ;
+ $oFCKeditor->Value = $value ;
+ $oFCKeditor->Config = Array(
+ //'UserFilesPath' => $pathtoroot.'kernel/user_files',
+ 'ProjectPath' => BASE_PATH.'/',
+ 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/cmseditor/inp_fckconfig.js',
+// 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(),
+ //'StylesXmlPath' => '../../inp_styles.xml',
+// 'Debug' => 1,
+ 'Admin' => 1,
+ 'K4' => 1,
+ );
+ return $oFCKeditor->CreateHtml();
+ }
+
}
?>
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js
===================================================================
diff -u -r6935 -r7036
--- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 6935)
+++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 7036)
@@ -376,7 +376,7 @@
function openwin($url,$name,$width,$height)
{
// prevent window from opening larger, then screen resolution on user's computer (to Kostja)
-
+
// alert('openwin: name = ['+$name+']');
var left = Math.round((screen.width - $width)/2);
var top = Math.round((screen.height - $height)/2);
@@ -398,7 +398,7 @@
var $winW = window.document.body.offsetWidth;
var $winH = window.document.body.offsetHeight;
}
-
+
window.status = '[width: ' + $winW + '; height: ' + $winH + ']';
}
@@ -411,11 +411,11 @@
function open_popup($prefix_special, $event, $t, $window_size) {
if (!$window_size) {
- // if no size given, then query it from ajax
+ // if no size given, then query it from ajax
var $default_size = '750x400';
var $pm = getFrame('head').$popup_manager;
if ($pm) {
- // popup manager was found in head frame
+ // popup manager was found in head frame
$pm.ResponceFunction = function ($responce) {
if (!$responce.match(/([\d]+)x([\d]+)/)) {
// invalid responce was received, may be php fatal error during AJAX request
@@ -428,7 +428,6 @@
}
$window_size = $default_size;
}
-
var $kf = document.getElementById($form_name);
var $window_name = $t.replace(/(\/|-)/g, '_'); // replace "/" and "-" with "_"
@@ -448,20 +447,20 @@
var $regex = new RegExp('(.*)\?env=(' + document.getElementById('sid').value + ')?-(.*?):(m[^:]+)');
$regex = $regex.exec($url);
var $t = $regex[3];
-
+
// substitute form action with selector's url
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
$kf.action = $url;
-
+
// check parameter values
if (!isset($event)) $event = '';
-
+
// set variables need for selector to work
processHooks('openSelector', hBEFORE);
set_hidden_field('main_prefix', $prefix);
set_hidden_field('dst_field', $dst_field);
-
+
open_popup($prefix, $event, $t);
// restore form action back
@@ -583,23 +582,23 @@
function search_keydown($event, $prefix_special, $grid, $ajax)
{
$event = $event ? $event : event;
-
+
if (window.event) {// IE
var $key_code = $event.keyCode;
}
else if($event.which) { // Netscape/Firefox/Opera
var $key_code = $event.which;
}
-
+
switch ($key_code) {
case 13:
search($prefix_special, $grid, parseInt($ajax));
break;
-
+
case 27:
search_reset($prefix_special, $grid, parseInt($ajax));
break;
-
+
}
}
@@ -1168,7 +1167,7 @@
function getFrame($name)
{
var $main_window = window;
-
+
// 1. cycle through popups to get main window
try {
// will be error, when other site is opened in parent window
@@ -1181,7 +1180,7 @@
// alert('getFrame.Error: [' + err.description + ']');
return window;
}
-
+
var $frameset = $main_window.parent.frames;
for ($i = 0; $i < $frameset.length; $i++) {
if ($frameset[$i].name == $name) {
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl
===================================================================
diff -u -r7027 -r7036
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl (.../languages_edit_phrases.tpl) (revision 7027)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/regional/languages_edit_phrases.tpl (.../languages_edit_phrases.tpl) (revision 7036)
@@ -6,20 +6,20 @@
-
+
Index: branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/mod_rewrite_helper.php
===================================================================
diff -u -r6795 -r7036
--- branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 6795)
+++ branches/unlabeled/unlabeled-1.7.2/core/units/general/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 7036)
@@ -286,26 +286,55 @@
*/
function ProcessVirtualTemplate(&$url_parts, &$vars)
{
- if (!isset($url_parts[0]) || !$this->Application->isModuleEnabled('In-Edit')) return false;
+ if (!isset($url_parts[0])) return false;
- $template_path = implode('/', $url_parts);
- $sql = 'SELECT p.PageId, ci.CategoryId FROM '.TABLE_PREFIX.'Pages AS p
- LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
- ON ci.ItemResourceId = p.ResourceId
- WHERE
- Path = '.$this->Conn->qstr($template_path).'
- AND
- ci.PrimaryCat = 1
- AND
- p.Status = 1';
- $template_found = $this->Conn->GetRow($sql);
+ if ($this->Application->isModuleEnabled('Proj-CMS')) {
+ $friendly = $this->Conn->GetRow(
+ ' SELECT CategoryId, NamedParentPath FROM '.TABLE_PREFIX.'Category
+ WHERE FriendlyURL = '.$this->Conn->qstr(implode('/', $url_parts)));
+ if ($friendly) {
+ $vars['m_cat_id'] = $friendly['CategoryId'];
+ $vars['t'] = preg_replace('/^content\//i', '', $friendly['NamedParentPath']);
+ return true;
+ }
- if ($template_found) {
- $vars['m_cat_id'] = $template_found['CategoryId'];
- $vars['t'] = $template_path;
- return true;
+
+ $template_path = 'content/'.implode('/', $url_parts);
+
+ $sql = 'SELECT CategoryId FROM '.TABLE_PREFIX.'Category
+ WHERE
+ NamedParentPath = '.$this->Conn->qstr($template_path).'
+ AND
+ Status = 1';
+ $template_found = $this->Conn->GetRow($sql);
+
+ if ($template_found) {
+ $vars['m_cat_id'] = $template_found['CategoryId'];
+ $vars['t'] = implode('/', $url_parts);
+ return true;
+ }
}
+ if ($this->Application->isModuleEnabled('In-Edit')) {
+ $template_path = implode('/', $url_parts);
+ $sql = 'SELECT p.PageId, ci.CategoryId FROM '.TABLE_PREFIX.'Pages AS p
+ LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
+ ON ci.ItemResourceId = p.ResourceId
+ WHERE
+ Path = '.$this->Conn->qstr($template_path).'
+ AND
+ ci.PrimaryCat = 1
+ AND
+ p.Status = 1';
+ $template_found = $this->Conn->GetRow($sql);
+
+ if ($template_found) {
+ $vars['m_cat_id'] = $template_found['CategoryId'];
+ $vars['t'] = $template_path;
+ return true;
+ }
+ }
+
return false;
}
Index: branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php
===================================================================
diff -u -r6864 -r7036
--- branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php (.../event_manager.php) (revision 6864)
+++ branches/unlabeled/unlabeled-1.39.8/core/kernel/event_manager.php (.../event_manager.php) (revision 7036)
@@ -295,13 +295,13 @@
if ($event->redirect === true && !isset($event->redirect_params['pass_category']) && $this->Application->GetVar('m_cat_id')) {
$event->redirect_params['pass_category'] = 1;
}
-
+
$wid = $this->Application->GetVar('m_wid');
if ($wid && $event->redirect_params['opener'] == 'u') {
$event->redirect_params['opener'] = 's'; // because Application->HREF will react differently when 'opener' = 'u'
$event->redirect = 'incs/close_popup';
}
-
+
$this->Application->Redirect($event->redirect, $event->redirect_params, null, $event->redirect_script);
}
}
@@ -313,10 +313,10 @@
function processOpener()
{
$wid = $this->Application->GetVar('m_wid');
-
+
$opener_stack = $this->Application->RecallVar(rtrim('opener_stack_'.$wid, '_'));
$opener_stack = $opener_stack ? unserialize($opener_stack) : Array();
-
+
$opener_action = $this->Application->GetVar('m_opener');
switch ($opener_action) {
case 'r': // "reset" opener stack
@@ -342,8 +342,18 @@
$popup_wid = (int)$this->Application->RecallVar('last_wid') + 1;
$this->Application->StoreVar('last_wid', $popup_wid);
$this->Application->SetVar('m_wid', $popup_wid);
-
- $opener_stack = Array ( $this->Application->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_')) );
+
+ if ($this->Application->GetVar('front')) {
+ $front_session =& $this->Application->recallObject('Session.front');
+
+ $last_template = $front_session->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_'));
+ $last_template = '../'.$last_template;
+ }
+ else {
+ $last_template = $this->Application->RecallVar(rtrim('last_template_popup_'.$parent_wid, '_'));
+ }
+
+ $opener_stack = Array ( $last_template );
$this->Application->SetVar('m_opener', 's');
$wid = $popup_wid;
break;
@@ -352,7 +362,7 @@
break;
}
-
+
$this->Application->SetVar('m_opener', 's');
$this->Application->StoreVar(rtrim('opener_stack_'.$wid, '_'), serialize($opener_stack));
}
@@ -368,7 +378,7 @@
{
$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();
Index: branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php
===================================================================
diff -u -r7032 -r7036
--- branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7032)
+++ branches/unlabeled/unlabeled-1.25.2/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 7036)
@@ -402,7 +402,7 @@
/* @var $recursive_helper kRecursiveHelper */
foreach ($ids as $id) {
- $recursive_helper->DeleteCategory($id);
+ $recursive_helper->DeleteCategory($id, $event->Prefix);
}
}
$this->clearSelectedIDs($event);