Пример #1
0
 public static function hook_init($query)
 {
     $backend_query = BackendQuery::retrieve($query);
     if ($backend_query) {
         $_REQUEST['q'] = $backend_query['query'];
         return $backend_query['query'];
     }
     return $query;
 }
Пример #2
0
 public function post_create($id = false)
 {
     $result = parent::post_create();
     if ($result instanceof ContentObj) {
         /* TODO This can easily "overwrite" existing urls */
         if (is_post() && Component::isActive('BackendQuery')) {
             BackendQuery::add($result->array['name'], 'content/display/' . $result->array['id']);
         }
     }
     return $result;
 }