/** * Redirect to category view * */ function view_category() { $category_id = (int) $this->request->get('object_id'); if ($category_id) { $category = Categories::findById($category_id); } else { $category = new Category(); } // if if ($category->isNew()) { $this->httpError(HTTP_ERR_NOT_FOUND); } // if $project = $category->getProject(); if (!instance_of($project, 'Project')) { $this->httpError(HTTP_ERR_NOT_FOUND); } // if $base_url = assemble_url('mobile_access_view_' . $category->getModule(), array('project_id' => $project->getId())); $this->redirectToUrl($base_url . '/?category_id=' . $category_id); }