コード例 #1
0
ファイル: dbobject.php プロジェクト: nemein/openpsa
 /**
  * This call wraps the original get_by_guid call to provide access control.
  * The calling sequence is as with the corresponding constructor.
  *
  * @param midcom_core_dbaobject $object The DBA object we're working on
  * @param string $path The path of the object to load from the database.
  * @return bool Indicating Success
  */
 public static function get_by_path(midcom_core_dbaobject $object, $path)
 {
     $object->__exec_get_by_path((string) $path);
     if ($object->id != 0 && $object->action != 'delete') {
         if (!$object->can_do('midgard:read')) {
             self::_clear_object($object);
             return false;
         }
         $object->_on_loaded();
         return true;
     } else {
         return false;
     }
 }