Index: branches/unlabeled/unlabeled-1.69.2/core/units/general/cat_event_handler.php =================================================================== diff -u -r7922 -r7944 --- branches/unlabeled/unlabeled-1.69.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 7922) +++ branches/unlabeled/unlabeled-1.69.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 7944) @@ -67,7 +67,7 @@ LEFT JOIN '.$this->Application->getUnitOption('ci', 'TableName').' ci ON ci.ItemResourceId = item_table.ResourceId WHERE '.$id_field.' IN ('.$selected_ids.') AND (ci.PrimaryCat = 1)'; $items = $this->Conn->Query($sql, $id_field); - + $perm_helper =& $this->Application->recallObject('PermissionsHelper'); foreach ($items as $item_id => $item_data) { if ($perm_helper->ModifyCheckPermission($item_data['CreatedById'], $item_data['CategoryId'], $event->Prefix) == 0) { @@ -76,7 +76,7 @@ break; } } - + if (!$perm_value) { $event->status = erPERM_FAIL; } @@ -597,6 +597,13 @@ } $object->Fields['Status']['options'] = $new_options; } + elseif (!$this->Application->IsAdmin() && $object->GetDBField('Status') != 1) { + header('HTTP/1.0 404 Not Found'); + while (ob_get_level()) { ob_end_clean(); } + $this->Application->HTML = $this->Application->ParseBlock(array('name'=>$this->Application->ConfigValue('ErrorTemplate'))); + $this->Application->Done(); + exit(); + } } @@ -1399,10 +1406,10 @@ $export_options = $export_object->loadOptions($event); echo $export_options['start_from'] * 100 / $export_options['total_records']; - + $event->status = erSTOP; } - + /** * Returns specific to each item type columns only *