Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class ManiphestTaskSearchEngine extends PhabricatorApplicationSearchEngine { ..

Decoded Output download

<?php
 final class ManiphestTaskSearchEngine extends PhabricatorApplicationSearchEngine { private $showBatchControls; private $baseURI; private $isBoardView; public function setIsBoardView($is_board_view) { $this->isBoardView = $is_board_view; return $this; } public function getIsBoardView() { return $this->isBoardView; } public function setBaseURI($base_uri) { $this->baseURI = $base_uri; return $this; } public function getBaseURI() { return $this->baseURI; } public function setShowBatchControls($show_batch_controls) { $this->showBatchControls = $show_batch_controls; return $this; } public function getResultTypeDescription() { return pht("Maniphest Tasks"); } public function getApplicationClassName() { return "PhabricatorManiphestApplication"; } public function newQuery() { return id(new ManiphestTaskQuery())->needProjectPHIDs(true); } protected function buildCustomSearchFields() { $subtype_map = id(new ManiphestTask())->newEditEngineSubtypeMap(); $hide_subtypes = $subtype_map->getCount() == 1; return array(id(new PhabricatorOwnersSearchField())->setLabel(pht("Assigned To"))->setKey("assignedPHIDs")->setConduitKey("assigned")->setAliases(array("assigned"))->setDescription(pht("Search for tasks owned by a user from a list.")), id(new PhabricatorUsersSearchField())->setLabel(pht("Authors"))->setKey("authorPHIDs")->setAliases(array("author", "authors"))->setDescription(pht("Search for tasks with given authors.")), id(new PhabricatorSearchDatasourceField())->setLabel(pht("Statuses"))->setKey("statuses")->setAliases(array("status"))->setDescription(pht("Search for tasks with given statuses."))->setDatasource(new ManiphestTaskStatusFunctionDatasource()), id(new PhabricatorSearchDatasourceField())->setLabel(pht("Priorities"))->setKey("priorities")->setAliases(array("priority"))->setDescription(pht("Search for tasks with given priorities."))->setConduitParameterType(new ConduitIntListParameterType())->setDatasource(new ManiphestTaskPriorityDatasource()), id(new PhabricatorSearchDatasourceField())->setLabel(pht("Subtypes"))->setKey("subtypes")->setAliases(array("subtype"))->setDescription(pht("Search for tasks with given subtypes."))->setDatasource(new ManiphestTaskSubtypeDatasource())->setIsHidden($hide_subtypes), id(new PhabricatorPHIDsSearchField())->setLabel(pht("Columns"))->setKey("columnPHIDs")->setAliases(array("column", "columnPHID", "columns")), id(new PhabricatorSearchThreeStateField())->setLabel(pht("Open Parents"))->setKey("hasParents")->setAliases(array("blocking"))->setOptions(pht("(Show All)"), pht("Show Only Tasks With Open Parents"), pht("Show Only Tasks Without Open Parents")), id(new PhabricatorSearchThreeStateField())->setLabel(pht("Open Subtasks"))->setKey("hasSubtasks")->setAliases(array("blocked"))->setOptions(pht("(Show All)"), pht("Show Only Tasks With Open Subtasks"), pht("Show Only Tasks Without Open Subtasks")), id(new PhabricatorIDsSearchField())->setLabel(pht("Parent IDs"))->setKey("parentIDs")->setAliases(array("parentID")), id(new PhabricatorIDsSearchField())->setLabel(pht("Subtask IDs"))->setKey("subtaskIDs")->setAliases(array("subtaskID")), id(new PhabricatorSearchSelectField())->setLabel(pht("Group By"))->setKey("group")->setOptions($this->getGroupOptions()), id(new PhabricatorSearchDateField())->setLabel(pht("Created After"))->setKey("createdStart"), id(new PhabricatorSearchDateField())->setLabel(pht("Created Before"))->setKey("createdEnd"), id(new PhabricatorSearchDateField())->setLabel(pht("Updated After"))->setKey("modifiedStart"), id(new PhabricatorSearchDateField())->setLabel(pht("Updated Before"))->setKey("modifiedEnd"), id(new PhabricatorSearchDateField())->setLabel(pht("Closed After"))->setKey("closedStart"), id(new PhabricatorSearchDateField())->setLabel(pht("Closed Before"))->setKey("closedEnd"), id(new PhabricatorUsersSearchField())->setLabel(pht("Closed By"))->setKey("closerPHIDs")->setAliases(array("closer", "closerPHID", "closers"))->setDescription(pht("Search for tasks closed by certain users.")), id(new PhabricatorSearchTextField())->setLabel(pht("Page Size"))->setKey("limit")); } protected function getDefaultFieldOrder() { return array("assignedPHIDs", "projectPHIDs", "authorPHIDs", "subscriberPHIDs", "statuses", "priorities", "subtypes", "hasParents", "hasSubtasks", "parentIDs", "subtaskIDs", "group", "order", "ids", "...", "createdStart", "createdEnd", "modifiedStart", "modifiedEnd", "closedStart", "closedEnd", "closerPHIDs", "limit"); } protected function getHiddenFields() { $keys = array(); if ($this->getIsBoardView()) { $keys[] = "group"; $keys[] = "order"; $keys[] = "limit"; } return $keys; } protected function buildQueryFromParameters(array $map) { $query = $this->newQuery(); if ($map["assignedPHIDs"]) { $query->withOwners($map["assignedPHIDs"]); } if ($map["authorPHIDs"]) { $query->withAuthors($map["authorPHIDs"]); } if ($map["statuses"]) { $query->withStatuses($map["statuses"]); } if ($map["priorities"]) { $query->withPriorities($map["priorities"]); } if ($map["subtypes"]) { $query->withSubtypes($map["subtypes"]); } if ($map["createdStart"]) { $query->withDateCreatedAfter($map["createdStart"]); } if ($map["createdEnd"]) { $query->withDateCreatedBefore($map["createdEnd"]); } if ($map["modifiedStart"]) { $query->withDateModifiedAfter($map["modifiedStart"]); } if ($map["modifiedEnd"]) { $query->withDateModifiedBefore($map["modifiedEnd"]); } if ($map["closedStart"] || $map["closedEnd"]) { $query->withClosedEpochBetween($map["closedStart"], $map["closedEnd"]); } if ($map["closerPHIDs"]) { $query->withCloserPHIDs($map["closerPHIDs"]); } if ($map["hasParents"] !== null) { $query->withOpenParents($map["hasParents"]); } if ($map["hasSubtasks"] !== null) { $query->withOpenSubtasks($map["hasSubtasks"]); } if ($map["parentIDs"]) { $query->withParentTaskIDs($map["parentIDs"]); } if ($map["subtaskIDs"]) { $query->withSubtaskIDs($map["subtaskIDs"]); } if ($map["columnPHIDs"]) { $query->withColumnPHIDs($map["columnPHIDs"]); } $group = idx($map, "group"); $group = idx($this->getGroupValues(), $group); if ($group) { $query->setGroupBy($group); } if ($map["ids"]) { $ids = $map["ids"]; foreach ($ids as $key => $id) { $id = trim($id, " Tt"); if (!$id || !is_numeric($id)) { unset($ids[$key]); } else { $ids[$key] = $id; } } if ($ids) { $query->withIDs($ids); } } return $query; } protected function getURI($path) { if ($this->baseURI) { return $this->baseURI . $path; } return "/maniphest/" . $path; } protected function getBuiltinQueryNames() { $names = array(); if ($this->requireViewer()->isLoggedIn()) { $names["assigned"] = pht("Assigned"); $names["authored"] = pht("Authored"); $names["subscribed"] = pht("Subscribed"); } $names["open"] = pht("Open Tasks"); $names["all"] = pht("All Tasks"); return $names; } public function buildSavedQueryFromBuiltin($query_key) { $query = $this->newSavedQuery(); $query->setQueryKey($query_key); $viewer_phid = $this->requireViewer()->getPHID(); switch ($query_key) { case "all": return $query; case "assigned": return $query->setParameter("assignedPHIDs", array($viewer_phid))->setParameter("statuses", ManiphestTaskStatus::getOpenStatusConstants()); case "subscribed": return $query->setParameter("subscriberPHIDs", array($viewer_phid))->setParameter("statuses", ManiphestTaskStatus::getOpenStatusConstants()); case "open": return $query->setParameter("statuses", ManiphestTaskStatus::getOpenStatusConstants()); case "authored": return $query->setParameter("authorPHIDs", array($viewer_phid))->setParameter("order", "created")->setParameter("group", "none"); } return parent::buildSavedQueryFromBuiltin($query_key); } private function getGroupOptions() { return array("priority" => pht("Priority"), "assigned" => pht("Assigned"), "status" => pht("Status"), "project" => pht("Project"), "none" => pht("None")); } private function getGroupValues() { return array("priority" => ManiphestTaskQuery::GROUP_PRIORITY, "assigned" => ManiphestTaskQuery::GROUP_OWNER, "status" => ManiphestTaskQuery::GROUP_STATUS, "project" => ManiphestTaskQuery::GROUP_PROJECT, "none" => ManiphestTaskQuery::GROUP_NONE); } protected function renderResultList(array $tasks, PhabricatorSavedQuery $saved, array $handles) { $viewer = $this->requireViewer(); if ($this->isPanelContext()) { $can_bulk_edit = false; } else { $can_bulk_edit = PhabricatorPolicyFilter::hasCapability($viewer, $this->getApplication(), ManiphestBulkEditCapability::CAPABILITY); } $list = id(new ManiphestTaskResultListView())->setUser($viewer)->setTasks($tasks)->setSavedQuery($saved)->setCanBatchEdit($can_bulk_edit)->setShowBatchControls($this->showBatchControls); $result = new PhabricatorApplicationSearchResultView(); $result->setContent($list); return $result; } protected function willUseSavedQuery(PhabricatorSavedQuery $saved) { $assigned_phids = $saved->getParameter("assignedPHIDs", array()); if ($saved->getParameter("withUnassigned")) { $assigned_phids[] = PhabricatorPeopleNoOwnerDatasource::FUNCTION_TOKEN; } $saved->setParameter("assignedPHIDs", $assigned_phids); $project_phids = $saved->getParameter("projectPHIDs", array()); $old = $saved->getParameter("projects", array()); foreach ($old as $phid) { $project_phids[] = $phid; } $all = $saved->getParameter("allProjectPHIDs", array()); foreach ($all as $phid) { $project_phids[] = $phid; } $any = $saved->getParameter("anyProjectPHIDs", array()); foreach ($any as $phid) { $project_phids[] = "any(" . $phid . ")"; } $not = $saved->getParameter("excludeProjectPHIDs", array()); foreach ($not as $phid) { $project_phids[] = "not(" . $phid . ")"; } $users = $saved->getParameter("userProjectPHIDs", array()); foreach ($users as $phid) { $project_phids[] = "projects(" . $phid . ")"; } $no = $saved->getParameter("withNoProject"); if ($no) { $project_phids[] = "null()"; } $saved->setParameter("projectPHIDs", $project_phids); } protected function getNewUserBody() { $viewer = $this->requireViewer(); $create_button = id(new ManiphestEditEngine())->setViewer($viewer)->newNUXBUtton(pht("Create a Task")); $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView())->setIcon($icon)->setTitle(pht("Welcome to %s", $app_name))->setDescription(pht("Use Maniphest to track bugs, features, todos, or anything else " . "you need to get done. Tasks assigned to you will appear here."))->addAction($create_button); return $view; } protected function newExportFields() { $fields = array(id(new PhabricatorStringExportField())->setKey("monogram")->setLabel(pht("Monogram")), id(new PhabricatorPHIDExportField())->setKey("authorPHID")->setLabel(pht("Author PHID")), id(new PhabricatorStringExportField())->setKey("author")->setLabel(pht("Author")), id(new PhabricatorPHIDExportField())->setKey("ownerPHID")->setLabel(pht("Owner PHID")), id(new PhabricatorStringExportField())->setKey("owner")->setLabel(pht("Owner")), id(new PhabricatorStringExportField())->setKey("status")->setLabel(pht("Status")), id(new PhabricatorStringExportField())->setKey("statusName")->setLabel(pht("Status Name")), id(new PhabricatorEpochExportField())->setKey("dateClosed")->setLabel(pht("Date Closed")), id(new PhabricatorPHIDExportField())->setKey("closerPHID")->setLabel(pht("Closer PHID")), id(new PhabricatorStringExportField())->setKey("closer")->setLabel(pht("Closer")), id(new PhabricatorStringExportField())->setKey("priority")->setLabel(pht("Priority")), id(new PhabricatorStringExportField())->setKey("priorityName")->setLabel(pht("Priority Name")), id(new PhabricatorStringExportField())->setKey("subtype")->setLabel("Subtype"), id(new PhabricatorURIExportField())->setKey("uri")->setLabel(pht("URI")), id(new PhabricatorStringExportField())->setKey("title")->setLabel(pht("Title")), id(new PhabricatorStringExportField())->setKey("description")->setLabel(pht("Description"))); if (ManiphestTaskPoints::getIsEnabled()) { $fields[] = id(new PhabricatorDoubleExportField())->setKey("points")->setLabel("Points"); } return $fields; } protected function newExportData(array $tasks) { $viewer = $this->requireViewer(); $phids = array(); foreach ($tasks as $task) { $phids[] = $task->getAuthorPHID(); $phids[] = $task->getOwnerPHID(); $phids[] = $task->getCloserPHID(); } $handles = $viewer->loadHandles($phids); $export = array(); foreach ($tasks as $task) { $author_phid = $task->getAuthorPHID(); if ($author_phid) { $author_name = $handles[$author_phid]->getName(); } else { $author_name = null; } $owner_phid = $task->getOwnerPHID(); if ($owner_phid) { $owner_name = $handles[$owner_phid]->getName(); } else { $owner_name = null; } $closer_phid = $task->getCloserPHID(); if ($closer_phid) { $closer_name = $handles[$closer_phid]->getName(); } else { $closer_name = null; } $status_value = $task->getStatus(); $status_name = ManiphestTaskStatus::getTaskStatusName($status_value); $priority_value = $task->getPriority(); $priority_name = ManiphestTaskPriority::getTaskPriorityName($priority_value); $export[] = array("monogram" => $task->getMonogram(), "authorPHID" => $author_phid, "author" => $author_name, "ownerPHID" => $owner_phid, "owner" => $owner_name, "status" => $status_value, "statusName" => $status_name, "priority" => $priority_value, "priorityName" => $priority_name, "points" => $task->getPoints(), "subtype" => $task->getSubtype(), "title" => $task->getTitle(), "uri" => PhabricatorEnv::getProductionURI($task->getURI()), "description" => $task->getDescription(), "dateClosed" => $task->getClosedEpoch(), "closerPHID" => $closer_phid, "closer" => $closer_name); } return $export; } } ?>

Did this file decode correctly?

Original Code

<?php
 final class ManiphestTaskSearchEngine extends PhabricatorApplicationSearchEngine { private $showBatchControls; private $baseURI; private $isBoardView; public function setIsBoardView($is_board_view) { $this->isBoardView = $is_board_view; return $this; } public function getIsBoardView() { return $this->isBoardView; } public function setBaseURI($base_uri) { $this->baseURI = $base_uri; return $this; } public function getBaseURI() { return $this->baseURI; } public function setShowBatchControls($show_batch_controls) { $this->showBatchControls = $show_batch_controls; return $this; } public function getResultTypeDescription() { return pht("\115\x61\156\x69\x70\x68\145\x73\164\x20\124\x61\x73\x6b\163"); } public function getApplicationClassName() { return "\x50\150\141\x62\x72\151\x63\141\x74\x6f\x72\115\141\156\x69\160\x68\x65\163\164\x41\x70\160\x6c\151\143\141\x74\x69\157\156"; } public function newQuery() { return id(new ManiphestTaskQuery())->needProjectPHIDs(true); } protected function buildCustomSearchFields() { $subtype_map = id(new ManiphestTask())->newEditEngineSubtypeMap(); $hide_subtypes = $subtype_map->getCount() == 1; return array(id(new PhabricatorOwnersSearchField())->setLabel(pht("\x41\163\x73\x69\147\x6e\x65\x64\40\124\157"))->setKey("\141\x73\x73\151\x67\x6e\x65\x64\x50\x48\111\104\163")->setConduitKey("\141\163\x73\151\147\x6e\x65\x64")->setAliases(array("\141\x73\x73\x69\147\156\145\x64"))->setDescription(pht("\x53\145\x61\162\143\150\40\146\x6f\x72\x20\164\x61\x73\x6b\x73\40\157\x77\x6e\145\x64\40\x62\x79\40\x61\x20\x75\163\145\162\40\146\x72\x6f\155\x20\x61\x20\x6c\151\163\164\56")), id(new PhabricatorUsersSearchField())->setLabel(pht("\101\x75\x74\x68\x6f\162\x73"))->setKey("\141\165\x74\150\157\x72\x50\110\x49\x44\x73")->setAliases(array("\141\165\164\x68\x6f\x72", "\141\165\164\150\157\x72\163"))->setDescription(pht("\123\x65\141\162\x63\150\x20\146\157\x72\40\164\x61\x73\x6b\163\x20\167\x69\x74\x68\x20\147\x69\x76\x65\156\x20\x61\x75\164\150\x6f\x72\x73\x2e")), id(new PhabricatorSearchDatasourceField())->setLabel(pht("\x53\164\141\164\x75\x73\145\x73"))->setKey("\163\164\141\164\x75\163\145\x73")->setAliases(array("\163\164\141\164\165\163"))->setDescription(pht("\123\145\x61\162\x63\x68\40\146\157\162\x20\x74\x61\x73\153\163\x20\x77\151\164\150\40\x67\151\x76\x65\156\40\x73\x74\x61\x74\x75\163\x65\x73\x2e"))->setDatasource(new ManiphestTaskStatusFunctionDatasource()), id(new PhabricatorSearchDatasourceField())->setLabel(pht("\120\162\151\157\x72\x69\164\151\x65\163"))->setKey("\160\x72\151\157\x72\x69\x74\151\x65\x73")->setAliases(array("\x70\x72\151\157\162\x69\164\x79"))->setDescription(pht("\123\145\x61\162\143\x68\40\x66\157\162\x20\x74\x61\x73\x6b\x73\40\167\x69\164\150\40\147\151\166\145\x6e\x20\x70\x72\151\x6f\162\151\x74\151\x65\163\56"))->setConduitParameterType(new ConduitIntListParameterType())->setDatasource(new ManiphestTaskPriorityDatasource()), id(new PhabricatorSearchDatasourceField())->setLabel(pht("\123\165\142\164\x79\160\145\163"))->setKey("\x73\x75\x62\x74\171\160\x65\163")->setAliases(array("\163\x75\142\164\x79\x70\145"))->setDescription(pht("\123\145\x61\x72\143\150\x20\146\157\162\40\164\x61\163\x6b\163\40\x77\151\x74\x68\40\x67\x69\166\145\156\40\x73\165\142\164\171\160\145\163\56"))->setDatasource(new ManiphestTaskSubtypeDatasource())->setIsHidden($hide_subtypes), id(new PhabricatorPHIDsSearchField())->setLabel(pht("\x43\x6f\x6c\165\155\156\x73"))->setKey("\x63\x6f\x6c\x75\155\x6e\120\x48\111\x44\x73")->setAliases(array("\143\157\154\165\x6d\x6e", "\x63\157\x6c\165\155\156\x50\110\111\104", "\143\x6f\154\x75\x6d\x6e\163")), id(new PhabricatorSearchThreeStateField())->setLabel(pht("\117\x70\145\x6e\40\120\141\x72\145\x6e\164\163"))->setKey("\150\x61\x73\120\x61\x72\145\156\164\163")->setAliases(array("\x62\154\x6f\143\x6b\151\156\x67"))->setOptions(pht("\x28\x53\150\x6f\167\40\101\154\x6c\51"), pht("\x53\150\x6f\x77\40\x4f\x6e\x6c\171\40\124\x61\x73\x6b\x73\40\x57\x69\164\x68\40\117\x70\145\156\x20\120\141\162\x65\x6e\x74\163"), pht("\123\150\x6f\x77\x20\x4f\x6e\x6c\x79\40\124\x61\x73\153\163\40\x57\x69\x74\150\157\165\x74\40\x4f\160\145\x6e\40\x50\x61\x72\x65\156\x74\x73")), id(new PhabricatorSearchThreeStateField())->setLabel(pht("\117\160\x65\x6e\x20\123\x75\142\x74\x61\163\x6b\163"))->setKey("\150\x61\163\x53\165\142\x74\141\x73\153\x73")->setAliases(array("\142\x6c\x6f\x63\x6b\x65\x64"))->setOptions(pht("\50\123\150\x6f\x77\40\x41\x6c\x6c\x29"), pht("\x53\x68\157\167\x20\117\x6e\154\171\x20\x54\141\x73\153\x73\40\x57\151\164\x68\40\x4f\x70\145\x6e\x20\123\165\142\x74\141\163\x6b\x73"), pht("\123\x68\x6f\x77\40\x4f\156\154\x79\40\x54\141\163\153\163\x20\x57\x69\164\x68\157\x75\164\x20\x4f\x70\145\x6e\x20\x53\165\142\164\141\163\153\x73")), id(new PhabricatorIDsSearchField())->setLabel(pht("\x50\141\162\x65\x6e\x74\40\x49\104\163"))->setKey("\x70\x61\162\x65\x6e\x74\x49\104\163")->setAliases(array("\160\141\162\x65\156\x74\x49\104")), id(new PhabricatorIDsSearchField())->setLabel(pht("\x53\x75\x62\x74\x61\x73\x6b\40\111\x44\163"))->setKey("\163\x75\x62\x74\x61\x73\x6b\x49\x44\x73")->setAliases(array("\x73\165\x62\164\141\163\x6b\x49\x44")), id(new PhabricatorSearchSelectField())->setLabel(pht("\x47\x72\x6f\x75\160\40\x42\171"))->setKey("\x67\x72\157\165\x70")->setOptions($this->getGroupOptions()), id(new PhabricatorSearchDateField())->setLabel(pht("\x43\162\x65\x61\x74\x65\144\40\x41\x66\164\145\162"))->setKey("\x63\162\145\x61\x74\145\x64\x53\x74\141\x72\164"), id(new PhabricatorSearchDateField())->setLabel(pht("\103\162\145\141\x74\x65\x64\x20\102\145\x66\x6f\162\145"))->setKey("\x63\162\x65\x61\x74\x65\x64\x45\156\x64"), id(new PhabricatorSearchDateField())->setLabel(pht("\125\x70\144\141\x74\x65\x64\x20\x41\x66\164\145\162"))->setKey("\x6d\x6f\x64\151\146\x69\145\x64\x53\x74\x61\162\x74"), id(new PhabricatorSearchDateField())->setLabel(pht("\125\160\144\x61\x74\145\x64\40\x42\x65\x66\157\x72\145"))->setKey("\x6d\157\x64\151\146\x69\x65\x64\x45\156\x64"), id(new PhabricatorSearchDateField())->setLabel(pht("\103\x6c\157\x73\x65\x64\40\101\146\x74\x65\162"))->setKey("\x63\x6c\157\x73\145\144\x53\164\x61\162\164"), id(new PhabricatorSearchDateField())->setLabel(pht("\103\154\x6f\x73\145\144\x20\102\x65\146\x6f\162\145"))->setKey("\143\154\157\x73\x65\144\105\156\144"), id(new PhabricatorUsersSearchField())->setLabel(pht("\103\x6c\x6f\163\145\144\40\102\x79"))->setKey("\143\154\157\x73\x65\162\x50\x48\111\104\x73")->setAliases(array("\143\x6c\x6f\x73\x65\162", "\143\154\x6f\x73\145\162\120\x48\111\104", "\x63\154\157\163\x65\162\x73"))->setDescription(pht("\x53\145\141\x72\x63\150\40\146\x6f\x72\40\164\141\x73\153\163\x20\143\x6c\x6f\163\x65\x64\40\142\x79\40\x63\145\x72\164\141\151\x6e\x20\165\163\145\162\x73\56")), id(new PhabricatorSearchTextField())->setLabel(pht("\120\141\147\x65\40\123\x69\172\x65"))->setKey("\x6c\151\155\x69\164")); } protected function getDefaultFieldOrder() { return array("\141\x73\163\151\x67\156\x65\x64\x50\x48\x49\104\x73", "\160\162\x6f\x6a\x65\143\x74\x50\110\111\x44\163", "\141\x75\164\150\157\162\x50\110\x49\x44\x73", "\x73\165\x62\x73\143\x72\151\x62\145\x72\120\x48\x49\104\x73", "\163\164\141\164\165\x73\x65\163", "\x70\162\x69\x6f\x72\151\164\151\x65\x73", "\x73\165\142\164\171\x70\x65\x73", "\x68\x61\x73\120\141\162\145\156\164\163", "\150\x61\163\x53\165\x62\164\141\x73\x6b\x73", "\160\141\162\145\156\x74\111\104\x73", "\x73\x75\142\x74\141\x73\x6b\x49\104\163", "\147\162\x6f\x75\x70", "\157\x72\x64\145\x72", "\151\144\163", "\56\56\x2e", "\x63\162\145\x61\x74\145\144\123\x74\141\162\164", "\x63\x72\x65\141\164\145\x64\x45\156\x64", "\x6d\157\144\151\x66\151\145\x64\123\164\x61\x72\164", "\x6d\157\144\151\146\151\145\144\x45\x6e\144", "\143\154\x6f\x73\x65\144\123\164\x61\x72\164", "\x63\154\157\x73\x65\144\105\156\144", "\143\x6c\x6f\x73\145\162\120\x48\111\x44\163", "\154\x69\155\x69\x74"); } protected function getHiddenFields() { $keys = array(); if ($this->getIsBoardView()) { $keys[] = "\147\x72\157\165\160"; $keys[] = "\157\x72\x64\145\162"; $keys[] = "\154\151\155\x69\x74"; } return $keys; } protected function buildQueryFromParameters(array $map) { $query = $this->newQuery(); if ($map["\141\163\x73\x69\147\156\145\x64\120\x48\111\104\x73"]) { $query->withOwners($map["\141\x73\163\x69\147\x6e\145\144\120\x48\x49\104\163"]); } if ($map["\141\165\x74\x68\157\x72\120\110\111\104\x73"]) { $query->withAuthors($map["\141\x75\164\150\157\162\x50\110\x49\x44\163"]); } if ($map["\163\x74\141\x74\165\x73\145\x73"]) { $query->withStatuses($map["\163\164\x61\x74\x75\163\x65\x73"]); } if ($map["\x70\162\x69\157\162\x69\x74\x69\x65\163"]) { $query->withPriorities($map["\160\x72\x69\x6f\x72\151\164\151\x65\163"]); } if ($map["\x73\165\142\164\171\x70\x65\163"]) { $query->withSubtypes($map["\x73\165\x62\164\x79\160\x65\163"]); } if ($map["\143\x72\145\141\x74\x65\x64\x53\164\141\x72\164"]) { $query->withDateCreatedAfter($map["\x63\162\145\141\164\145\144\x53\164\141\162\164"]); } if ($map["\143\x72\145\x61\164\145\144\105\156\x64"]) { $query->withDateCreatedBefore($map["\143\162\x65\x61\x74\x65\x64\105\156\x64"]); } if ($map["\x6d\157\144\x69\146\x69\x65\144\x53\164\141\162\x74"]) { $query->withDateModifiedAfter($map["\x6d\157\x64\x69\x66\x69\x65\144\x53\x74\x61\162\164"]); } if ($map["\155\157\x64\151\x66\151\145\x64\105\x6e\x64"]) { $query->withDateModifiedBefore($map["\x6d\157\144\x69\146\151\145\x64\105\156\x64"]); } if ($map["\143\154\157\163\145\144\123\x74\x61\162\164"] || $map["\x63\154\x6f\163\x65\x64\105\156\x64"]) { $query->withClosedEpochBetween($map["\143\x6c\x6f\163\x65\x64\123\164\x61\x72\x74"], $map["\143\x6c\157\x73\x65\144\x45\156\x64"]); } if ($map["\x63\154\157\163\x65\x72\x50\x48\x49\104\163"]) { $query->withCloserPHIDs($map["\143\154\157\163\145\x72\120\110\x49\x44\x73"]); } if ($map["\x68\141\x73\x50\x61\x72\x65\x6e\x74\163"] !== null) { $query->withOpenParents($map["\150\x61\163\120\141\x72\x65\156\164\x73"]); } if ($map["\x68\x61\163\123\x75\142\x74\141\x73\153\x73"] !== null) { $query->withOpenSubtasks($map["\150\141\163\x53\x75\x62\164\141\x73\x6b\x73"]); } if ($map["\160\x61\x72\145\156\164\x49\104\163"]) { $query->withParentTaskIDs($map["\160\141\162\145\156\x74\111\x44\163"]); } if ($map["\163\165\x62\164\141\163\x6b\111\x44\x73"]) { $query->withSubtaskIDs($map["\x73\x75\142\x74\x61\x73\x6b\x49\x44\x73"]); } if ($map["\x63\x6f\154\x75\x6d\156\x50\110\x49\104\x73"]) { $query->withColumnPHIDs($map["\x63\x6f\x6c\165\155\x6e\x50\x48\x49\104\x73"]); } $group = idx($map, "\147\162\x6f\165\x70"); $group = idx($this->getGroupValues(), $group); if ($group) { $query->setGroupBy($group); } if ($map["\151\144\163"]) { $ids = $map["\151\144\x73"]; foreach ($ids as $key => $id) { $id = trim($id, "\x20\124\x74"); if (!$id || !is_numeric($id)) { unset($ids[$key]); } else { $ids[$key] = $id; } } if ($ids) { $query->withIDs($ids); } } return $query; } protected function getURI($path) { if ($this->baseURI) { return $this->baseURI . $path; } return "\57\x6d\x61\x6e\x69\x70\150\x65\163\164\x2f" . $path; } protected function getBuiltinQueryNames() { $names = array(); if ($this->requireViewer()->isLoggedIn()) { $names["\x61\163\163\x69\x67\x6e\145\144"] = pht("\x41\x73\x73\x69\147\x6e\x65\144"); $names["\141\165\x74\150\x6f\x72\145\144"] = pht("\101\165\x74\x68\x6f\x72\x65\144"); $names["\163\x75\x62\x73\x63\x72\151\142\x65\144"] = pht("\123\165\x62\x73\x63\x72\x69\142\145\x64"); } $names["\x6f\x70\x65\x6e"] = pht("\x4f\x70\145\156\x20\x54\141\163\153\163"); $names["\x61\x6c\154"] = pht("\x41\154\154\x20\x54\x61\163\x6b\163"); return $names; } public function buildSavedQueryFromBuiltin($query_key) { $query = $this->newSavedQuery(); $query->setQueryKey($query_key); $viewer_phid = $this->requireViewer()->getPHID(); switch ($query_key) { case "\141\x6c\154": return $query; case "\x61\x73\163\x69\147\x6e\x65\x64": return $query->setParameter("\141\163\x73\151\x67\x6e\145\144\120\x48\111\104\163", array($viewer_phid))->setParameter("\x73\x74\141\164\x75\x73\x65\x73", ManiphestTaskStatus::getOpenStatusConstants()); case "\x73\165\142\163\143\162\151\x62\145\144": return $query->setParameter("\x73\x75\x62\x73\143\162\x69\x62\145\162\x50\x48\111\104\163", array($viewer_phid))->setParameter("\x73\x74\141\164\x75\163\x65\x73", ManiphestTaskStatus::getOpenStatusConstants()); case "\x6f\160\x65\x6e": return $query->setParameter("\163\164\x61\x74\x75\x73\x65\163", ManiphestTaskStatus::getOpenStatusConstants()); case "\141\x75\x74\x68\x6f\x72\145\x64": return $query->setParameter("\x61\x75\164\150\157\162\120\x48\x49\x44\163", array($viewer_phid))->setParameter("\x6f\162\x64\x65\162", "\143\162\x65\141\164\x65\144")->setParameter("\x67\x72\x6f\x75\x70", "\156\157\156\x65"); } return parent::buildSavedQueryFromBuiltin($query_key); } private function getGroupOptions() { return array("\x70\162\151\157\x72\x69\x74\171" => pht("\120\x72\x69\157\x72\151\x74\171"), "\x61\163\163\151\x67\156\145\x64" => pht("\101\x73\x73\151\147\x6e\145\x64"), "\163\x74\x61\x74\165\x73" => pht("\x53\x74\141\x74\165\x73"), "\x70\162\157\x6a\x65\143\164" => pht("\120\x72\157\152\145\x63\164"), "\156\x6f\156\145" => pht("\116\x6f\x6e\x65")); } private function getGroupValues() { return array("\160\162\x69\x6f\162\x69\x74\171" => ManiphestTaskQuery::GROUP_PRIORITY, "\141\x73\163\151\x67\156\145\x64" => ManiphestTaskQuery::GROUP_OWNER, "\163\x74\141\x74\165\163" => ManiphestTaskQuery::GROUP_STATUS, "\160\x72\x6f\x6a\145\143\x74" => ManiphestTaskQuery::GROUP_PROJECT, "\x6e\x6f\156\x65" => ManiphestTaskQuery::GROUP_NONE); } protected function renderResultList(array $tasks, PhabricatorSavedQuery $saved, array $handles) { $viewer = $this->requireViewer(); if ($this->isPanelContext()) { $can_bulk_edit = false; } else { $can_bulk_edit = PhabricatorPolicyFilter::hasCapability($viewer, $this->getApplication(), ManiphestBulkEditCapability::CAPABILITY); } $list = id(new ManiphestTaskResultListView())->setUser($viewer)->setTasks($tasks)->setSavedQuery($saved)->setCanBatchEdit($can_bulk_edit)->setShowBatchControls($this->showBatchControls); $result = new PhabricatorApplicationSearchResultView(); $result->setContent($list); return $result; } protected function willUseSavedQuery(PhabricatorSavedQuery $saved) { $assigned_phids = $saved->getParameter("\x61\x73\x73\151\x67\156\145\x64\x50\110\111\104\163", array()); if ($saved->getParameter("\x77\x69\164\x68\x55\156\141\163\163\151\x67\156\x65\144")) { $assigned_phids[] = PhabricatorPeopleNoOwnerDatasource::FUNCTION_TOKEN; } $saved->setParameter("\141\163\163\151\x67\156\145\144\x50\110\111\104\163", $assigned_phids); $project_phids = $saved->getParameter("\x70\x72\x6f\x6a\x65\143\x74\x50\110\x49\x44\x73", array()); $old = $saved->getParameter("\x70\162\x6f\x6a\x65\x63\x74\163", array()); foreach ($old as $phid) { $project_phids[] = $phid; } $all = $saved->getParameter("\141\154\154\x50\162\x6f\152\x65\x63\164\120\110\111\104\x73", array()); foreach ($all as $phid) { $project_phids[] = $phid; } $any = $saved->getParameter("\x61\x6e\x79\x50\162\157\152\145\x63\164\120\x48\111\x44\163", array()); foreach ($any as $phid) { $project_phids[] = "\141\156\171\x28" . $phid . "\x29"; } $not = $saved->getParameter("\x65\x78\143\x6c\165\x64\145\120\x72\x6f\x6a\145\x63\x74\x50\x48\x49\104\163", array()); foreach ($not as $phid) { $project_phids[] = "\x6e\157\164\x28" . $phid . "\x29"; } $users = $saved->getParameter("\165\x73\145\162\x50\x72\157\152\x65\x63\x74\x50\110\111\x44\163", array()); foreach ($users as $phid) { $project_phids[] = "\160\162\157\152\x65\x63\164\x73\x28" . $phid . "\x29"; } $no = $saved->getParameter("\x77\151\x74\x68\116\x6f\x50\162\157\x6a\x65\x63\164"); if ($no) { $project_phids[] = "\156\165\x6c\x6c\50\x29"; } $saved->setParameter("\x70\x72\157\152\145\143\164\120\110\x49\x44\x73", $project_phids); } protected function getNewUserBody() { $viewer = $this->requireViewer(); $create_button = id(new ManiphestEditEngine())->setViewer($viewer)->newNUXBUtton(pht("\103\162\145\x61\x74\145\40\141\40\x54\141\x73\153")); $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView())->setIcon($icon)->setTitle(pht("\127\145\154\143\x6f\155\x65\40\164\x6f\x20\x25\163", $app_name))->setDescription(pht("\x55\163\145\40\x4d\141\x6e\151\x70\x68\x65\163\164\40\x74\x6f\x20\x74\x72\x61\x63\x6b\x20\142\x75\147\x73\x2c\x20\146\145\141\164\165\162\x65\x73\x2c\40\x74\157\144\x6f\x73\x2c\40\157\162\40\x61\156\171\164\150\151\156\x67\x20\x65\154\x73\x65\40" . "\171\157\165\40\x6e\145\145\144\x20\164\157\40\x67\145\x74\x20\144\157\x6e\x65\56\40\124\x61\163\x6b\x73\40\x61\x73\x73\x69\147\x6e\145\144\x20\x74\157\40\x79\x6f\x75\x20\167\151\154\154\x20\141\160\x70\145\141\162\40\150\x65\162\145\56"))->addAction($create_button); return $view; } protected function newExportFields() { $fields = array(id(new PhabricatorStringExportField())->setKey("\155\157\156\157\147\x72\x61\x6d")->setLabel(pht("\x4d\157\x6e\x6f\x67\x72\x61\x6d")), id(new PhabricatorPHIDExportField())->setKey("\141\165\x74\150\157\x72\120\110\x49\104")->setLabel(pht("\x41\165\x74\150\x6f\x72\40\120\110\111\104")), id(new PhabricatorStringExportField())->setKey("\141\165\164\x68\157\162")->setLabel(pht("\101\165\164\150\x6f\x72")), id(new PhabricatorPHIDExportField())->setKey("\157\x77\156\x65\x72\120\x48\x49\x44")->setLabel(pht("\x4f\x77\x6e\x65\162\40\x50\110\x49\x44")), id(new PhabricatorStringExportField())->setKey("\x6f\167\x6e\145\x72")->setLabel(pht("\x4f\x77\x6e\145\162")), id(new PhabricatorStringExportField())->setKey("\x73\164\x61\x74\x75\x73")->setLabel(pht("\x53\x74\141\164\165\x73")), id(new PhabricatorStringExportField())->setKey("\x73\x74\141\164\165\x73\116\x61\x6d\x65")->setLabel(pht("\x53\x74\141\164\x75\163\x20\116\141\x6d\145")), id(new PhabricatorEpochExportField())->setKey("\144\x61\x74\x65\103\154\157\163\x65\144")->setLabel(pht("\104\x61\x74\x65\x20\103\x6c\157\163\x65\144")), id(new PhabricatorPHIDExportField())->setKey("\143\x6c\x6f\163\145\x72\x50\110\111\x44")->setLabel(pht("\103\154\x6f\163\x65\x72\x20\120\110\111\x44")), id(new PhabricatorStringExportField())->setKey("\143\x6c\x6f\163\x65\162")->setLabel(pht("\103\x6c\157\163\x65\x72")), id(new PhabricatorStringExportField())->setKey("\x70\x72\151\157\x72\151\164\171")->setLabel(pht("\x50\162\x69\x6f\162\151\164\171")), id(new PhabricatorStringExportField())->setKey("\x70\x72\x69\157\162\x69\164\x79\116\x61\155\145")->setLabel(pht("\x50\x72\x69\x6f\162\x69\x74\171\x20\116\x61\155\x65")), id(new PhabricatorStringExportField())->setKey("\x73\165\142\164\171\x70\x65")->setLabel("\123\x75\x62\x74\171\x70\x65"), id(new PhabricatorURIExportField())->setKey("\x75\x72\x69")->setLabel(pht("\x55\x52\x49")), id(new PhabricatorStringExportField())->setKey("\164\x69\x74\x6c\x65")->setLabel(pht("\124\151\x74\x6c\145")), id(new PhabricatorStringExportField())->setKey("\144\x65\163\x63\x72\151\160\x74\x69\x6f\156")->setLabel(pht("\x44\145\x73\143\x72\x69\160\164\x69\x6f\156"))); if (ManiphestTaskPoints::getIsEnabled()) { $fields[] = id(new PhabricatorDoubleExportField())->setKey("\x70\157\x69\156\x74\163")->setLabel("\120\157\x69\x6e\164\163"); } return $fields; } protected function newExportData(array $tasks) { $viewer = $this->requireViewer(); $phids = array(); foreach ($tasks as $task) { $phids[] = $task->getAuthorPHID(); $phids[] = $task->getOwnerPHID(); $phids[] = $task->getCloserPHID(); } $handles = $viewer->loadHandles($phids); $export = array(); foreach ($tasks as $task) { $author_phid = $task->getAuthorPHID(); if ($author_phid) { $author_name = $handles[$author_phid]->getName(); } else { $author_name = null; } $owner_phid = $task->getOwnerPHID(); if ($owner_phid) { $owner_name = $handles[$owner_phid]->getName(); } else { $owner_name = null; } $closer_phid = $task->getCloserPHID(); if ($closer_phid) { $closer_name = $handles[$closer_phid]->getName(); } else { $closer_name = null; } $status_value = $task->getStatus(); $status_name = ManiphestTaskStatus::getTaskStatusName($status_value); $priority_value = $task->getPriority(); $priority_name = ManiphestTaskPriority::getTaskPriorityName($priority_value); $export[] = array("\x6d\x6f\156\x6f\x67\162\x61\155" => $task->getMonogram(), "\x61\165\164\x68\157\x72\x50\x48\x49\104" => $author_phid, "\141\165\164\x68\x6f\162" => $author_name, "\x6f\x77\156\145\x72\120\x48\x49\x44" => $owner_phid, "\x6f\x77\x6e\145\162" => $owner_name, "\x73\x74\141\x74\x75\163" => $status_value, "\163\x74\141\164\165\163\x4e\x61\155\145" => $status_name, "\x70\x72\x69\x6f\162\x69\164\x79" => $priority_value, "\x70\x72\x69\157\x72\151\x74\171\116\x61\x6d\x65" => $priority_name, "\x70\x6f\151\x6e\x74\163" => $task->getPoints(), "\163\x75\x62\x74\171\x70\145" => $task->getSubtype(), "\x74\151\164\154\145" => $task->getTitle(), "\x75\x72\151" => PhabricatorEnv::getProductionURI($task->getURI()), "\x64\145\x73\x63\x72\x69\x70\164\x69\157\156" => $task->getDescription(), "\x64\141\164\x65\103\x6c\157\163\145\x64" => $task->getClosedEpoch(), "\x63\x6c\x6f\163\145\x72\120\x48\111\x44" => $closer_phid, "\x63\x6c\x6f\x73\x65\162" => $closer_name); } return $export; } }

Function Calls

None

Variables

None

Stats

MD5 40930518c8b76ed5c7adcda8293089e9
Eval Count 0
Decode Time 128 ms