Changeset 5676
- Timestamp:
- 04/10/07 11:59:25 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/midcom.helper.replicator/documentation/CHANGES
r5630 r5676 7 7 which might even break existing functionality. 8 8 - All items marked with "+" represent completely new features. 9 10 2007-04-10 bergie 11 + Added "object replication status" view 9 12 10 13 2007-03-30 rambo trunk/src/midcom.helper.replicator/manager.php
r4989 r5676 92 92 'handler' => array('midcom_helper_replicator_manager', 'edit'), 93 93 'fixed_args' => 'edit', 94 'variable_args' => 1, 95 ), 96 'object' => array 97 ( 98 'handler' => array('midcom_helper_replicator_manager', 'object'), 99 'fixed_args' => 'object', 94 100 'variable_args' => 1, 95 101 ), … … 334 340 } 335 341 336 $ this->_request_data['view_title'] = sprintf($this->_l10n_midcom->get('create %s'), $this->_schemadb[$this->_schema]->description);337 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$ this->_request_data['view_title']}");342 $data['view_title'] = sprintf($this->_l10n_midcom->get('create %s'), $this->_schemadb[$this->_schema]->description); 343 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['view_title']}"); 338 344 339 345 $this->_update_breadcrumb($handler_id); … … 347 353 midcom_show_style('midcom-helper-replicator-create'); 348 354 } 355 356 function _resolve_object_title($object) 357 { 358 $vars = get_object_vars($object); 359 360 if (array_key_exists('title', $vars)) 361 { 362 return $object->title; 363 } 364 elseif (array_key_exists('name', $vars)) 365 { 366 return $object->name; 367 } 368 else 369 { 370 return "#{$object->id}"; 371 } 372 } 373 374 /** 375 * Displays replication information for an object 376 */ 377 function _handler_object($handler_id, $args, &$data) 378 { 379 $_MIDCOM->auth->require_admin_user(); 380 381 $data['object'] = $_MIDCOM->dbfactory->get_object_by_guid($args[0]); 382 if (!$data['object']) 383 { 384 return false; 385 } 386 387 $data['view_title'] = sprintf($this->_l10n->get('replication information for %s'), $this->_resolve_object_title($data['object'])); 388 $_MIDCOM->set_pagetitle($data['view_title']); 389 390 return true; 391 } 392 393 function _show_object($handler_id, &$data) 394 { 395 midcom_show_style('midcom-helper-replicator-object'); 396 } 349 397 } 350 398 ?>
