Exemplo n.º 1
0
 public function doExecute()
 {
     $strNormalizedSubject = $this->request->getProperty("subject");
     $strUsername = $this->request->getProperty("username");
     $strSubcatID = $this->request->getProperty("subcategory");
     // Make sure they are logged in as the user they are trying to save as.
     $this->ensureSpecifiedUser();
     $objData = new Xerxes_DataMap();
     $subcategory = null;
     // Find the category
     $category = $objData->getSubject($strNormalizedSubject, null, Xerxes_DataMap::userCreatedMode, $strUsername);
     $subcategory = $this->getSubcategory($category, $strSubcatID);
     $objData->deleteUserCreatedSubcategory($subcategory);
     // Send them back where they came from, with a message.
     $this->returnWithMessage($this->getLabel("text_collections_deleted_subcategory", $subcategory->name), array("base" => "collections", "action" => "edit_form", "subject" => $category->normalized, "username" => $strUsername));
     return 1;
 }