From eecc003a625aaec06468b220149c399a505cbaa4 Mon Sep 17 00:00:00 2001 From: Evan Priestley Date: Sat, 22 Jan 2011 17:48:55 -0800 Subject: [PATCH] More phabricator organizational stuff. --- src/__phutil_library_map__.php | 54 ++++++++++--------- src/aphront/controller/AphrontController.php | 8 --- src/aphront/controller/__init__.php | 3 -- ...AphrontDefaultApplicationConfiguration.php | 4 +- .../AphrontDefaultApplicationController.php | 2 +- .../controller/base/PhabricatorController.php | 29 ++++++++++ .../base/storage/lisk/PhabricatorLiskDAO.php} | 11 ++-- .../base}/storage/lisk/__init__.php | 2 +- ...php => PhabricatorDirectoryController.php} | 4 +- .../directory/controller/base/__init__.php | 4 +- ...atorDirectoryCategoryDeleteController.php} | 6 +-- .../controller/categorydelete/__init__.php | 2 +- ...icatorDirectoryCategoryEditController.php} | 10 ++-- .../controller/categoryedit/__init__.php | 2 +- ...icatorDirectoryCategoryListController.php} | 6 +-- .../controller/categorylist/__init__.php | 2 +- ...bricatorDirectoryItemDeleteController.php} | 5 +- .../controller/itemdelete/__init__.php | 2 +- ...habricatorDirectoryItemEditController.php} | 9 ++-- .../controller/itemedit/__init__.php | 2 +- ...habricatorDirectoryItemListController.php} | 7 +-- .../controller/itemlist/__init__.php | 2 +- ...=> PhabricatorDirectoryMainController.php} | 7 +-- .../directory/controller/main/__init__.php | 2 +- ...oryDAO.php => PhabricatorDirectoryDAO.php} | 2 +- .../directory/storage/base/__init__.php | 4 +- ...y.php => PhabricatorDirectoryCategory.php} | 2 +- .../directory/storage/category/__init__.php | 2 +- ...yItem.php => PhabricatorDirectoryItem.php} | 2 +- .../directory/storage/item/__init__.php | 2 +- ...ew.php => PhabricatorStandardPageView.php} | 2 +- src/view/page/standard/__init__.php | 2 +- 32 files changed, 115 insertions(+), 88 deletions(-) create mode 100644 src/applications/base/controller/base/PhabricatorController.php rename src/{aphront/storage/lisk/AphrontLiskDAO.php => applications/base/storage/lisk/PhabricatorLiskDAO.php} (82%) rename src/{aphront => applications/base}/storage/lisk/__init__.php (82%) rename src/applications/directory/controller/base/{AphrontDirectoryController.php => PhabricatorDirectoryController.php} (91%) rename src/applications/directory/controller/categorydelete/{AphrontDirectoryCategoryDeleteController.php => PhabricatorDirectoryCategoryDeleteController.php} (89%) rename src/applications/directory/controller/categoryedit/{AphrontDirectoryCategoryEditController.php => PhabricatorDirectoryCategoryEditController.php} (90%) rename src/applications/directory/controller/categorylist/{AphrontDirectoryCategoryListController.php => PhabricatorDirectoryCategoryListController.php} (91%) rename src/applications/directory/controller/itemdelete/{AphrontDirectoryItemDeleteController.php => PhabricatorDirectoryItemDeleteController.php} (89%) rename src/applications/directory/controller/itemedit/{AphrontDirectoryItemEditController.php => PhabricatorDirectoryItemEditController.php} (93%) rename src/applications/directory/controller/itemlist/{AphrontDirectoryItemListController.php => PhabricatorDirectoryItemListController.php} (89%) rename src/applications/directory/controller/main/{AphrontDirectoryMainController.php => PhabricatorDirectoryMainController.php} (90%) rename src/applications/directory/storage/base/{AphrontDirectoryDAO.php => PhabricatorDirectoryDAO.php} (90%) rename src/applications/directory/storage/category/{AphrontDirectoryCategory.php => PhabricatorDirectoryCategory.php} (90%) rename src/applications/directory/storage/item/{AphrontDirectoryItem.php => PhabricatorDirectoryItem.php} (93%) rename src/view/page/standard/{AphrontStandardPageView.php => PhabricatorStandardPageView.php} (97%) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ee56879f4d..1bb27137cc 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -16,17 +16,6 @@ phutil_register_library_map(array( 'AphrontDefaultApplicationController' => 'aphront/default/controller', 'AphrontDialogResponse' => 'aphront/response/dialog', 'AphrontDialogView' => 'view/dialog', - 'AphrontDirectoryCategory' => 'applications/directory/storage/category', - 'AphrontDirectoryCategoryDeleteController' => 'applications/directory/controller/categorydelete', - 'AphrontDirectoryCategoryEditController' => 'applications/directory/controller/categoryedit', - 'AphrontDirectoryCategoryListController' => 'applications/directory/controller/categorylist', - 'AphrontDirectoryController' => 'applications/directory/controller/base', - 'AphrontDirectoryDAO' => 'applications/directory/storage/base', - 'AphrontDirectoryItem' => 'applications/directory/storage/item', - 'AphrontDirectoryItemDeleteController' => 'applications/directory/controller/itemdelete', - 'AphrontDirectoryItemEditController' => 'applications/directory/controller/itemedit', - 'AphrontDirectoryItemListController' => 'applications/directory/controller/itemlist', - 'AphrontDirectoryMainController' => 'applications/directory/controller/main', 'AphrontErrorView' => 'view/form/error', 'AphrontFormControl' => 'view/form/control/base', 'AphrontFormSelectControl' => 'view/form/control/select', @@ -34,7 +23,6 @@ phutil_register_library_map(array( 'AphrontFormTextAreaControl' => 'view/form/control/textarea', 'AphrontFormTextControl' => 'view/form/control/text', 'AphrontFormView' => 'view/form/base', - 'AphrontLiskDAO' => 'aphront/storage/lisk', 'AphrontMySQLDatabaseConnection' => 'storage/connection/mysql', 'AphrontNullView' => 'view/null', 'AphrontPageView' => 'view/page/base', @@ -49,7 +37,6 @@ phutil_register_library_map(array( 'AphrontRedirectResponse' => 'aphront/response/redirect', 'AphrontRequest' => 'aphront/request', 'AphrontResponse' => 'aphront/response/base', - 'AphrontStandardPageView' => 'view/page/standard', 'AphrontTableView' => 'view/control/table', 'AphrontURIMapper' => 'aphront/mapper', 'AphrontView' => 'view/base', @@ -60,6 +47,20 @@ phutil_register_library_map(array( 'DifferentialRevisionStatus' => 'applications/review/constants/revisionstatus', 'DifferentialUnitStatus' => 'applications/review/constants/unitstatus', 'LiskDAO' => 'storage/lisk/dao', + 'PhabricatorController' => 'applications/base/controller/base', + 'PhabricatorDirectoryCategory' => 'applications/directory/storage/category', + 'PhabricatorDirectoryCategoryDeleteController' => 'applications/directory/controller/categorydelete', + 'PhabricatorDirectoryCategoryEditController' => 'applications/directory/controller/categoryedit', + 'PhabricatorDirectoryCategoryListController' => 'applications/directory/controller/categorylist', + 'PhabricatorDirectoryController' => 'applications/directory/controller/base', + 'PhabricatorDirectoryDAO' => 'applications/directory/storage/base', + 'PhabricatorDirectoryItem' => 'applications/directory/storage/item', + 'PhabricatorDirectoryItemDeleteController' => 'applications/directory/controller/itemdelete', + 'PhabricatorDirectoryItemEditController' => 'applications/directory/controller/itemedit', + 'PhabricatorDirectoryItemListController' => 'applications/directory/controller/itemlist', + 'PhabricatorDirectoryMainController' => 'applications/directory/controller/main', + 'PhabricatorLiskDAO' => 'applications/base/storage/lisk', + 'PhabricatorStandardPageView' => 'view/page/standard', ), 'function' => array( @@ -80,17 +81,6 @@ phutil_register_library_map(array( 'AphrontDefaultApplicationController' => 'AphrontController', 'AphrontDialogResponse' => 'AphrontResponse', 'AphrontDialogView' => 'AphrontView', - 'AphrontDirectoryCategory' => 'AphrontDirectoryDAO', - 'AphrontDirectoryCategoryDeleteController' => 'AphrontDirectoryController', - 'AphrontDirectoryCategoryEditController' => 'AphrontDirectoryController', - 'AphrontDirectoryCategoryListController' => 'AphrontDirectoryController', - 'AphrontDirectoryController' => 'AphrontController', - 'AphrontDirectoryDAO' => 'AphrontLiskDAO', - 'AphrontDirectoryItem' => 'AphrontDirectoryDAO', - 'AphrontDirectoryItemDeleteController' => 'AphrontDirectoryController', - 'AphrontDirectoryItemEditController' => 'AphrontDirectoryController', - 'AphrontDirectoryItemListController' => 'AphrontDirectoryController', - 'AphrontDirectoryMainController' => 'AphrontDirectoryController', 'AphrontErrorView' => 'AphrontView', 'AphrontFormControl' => 'AphrontView', 'AphrontFormSelectControl' => 'AphrontFormControl', @@ -98,7 +88,6 @@ phutil_register_library_map(array( 'AphrontFormTextAreaControl' => 'AphrontFormControl', 'AphrontFormTextControl' => 'AphrontFormControl', 'AphrontFormView' => 'AphrontView', - 'AphrontLiskDAO' => 'LiskDAO', 'AphrontMySQLDatabaseConnection' => 'AphrontDatabaseConnection', 'AphrontNullView' => 'AphrontView', 'AphrontPageView' => 'AphrontView', @@ -110,9 +99,22 @@ phutil_register_library_map(array( 'AphrontQueryParameterException' => 'AphrontQueryException', 'AphrontQueryRecoverableException' => 'AphrontQueryException', 'AphrontRedirectResponse' => 'AphrontResponse', - 'AphrontStandardPageView' => 'AphrontPageView', 'AphrontTableView' => 'AphrontView', 'AphrontWebpageResponse' => 'AphrontResponse', + 'PhabricatorController' => 'AphrontController', + 'PhabricatorDirectoryCategory' => 'PhabricatorDirectoryDAO', + 'PhabricatorDirectoryCategoryDeleteController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryCategoryEditController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryCategoryListController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryController' => 'PhabricatorController', + 'PhabricatorDirectoryDAO' => 'PhabricatorLiskDAO', + 'PhabricatorDirectoryItem' => 'PhabricatorDirectoryDAO', + 'PhabricatorDirectoryItemDeleteController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryItemEditController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryItemListController' => 'PhabricatorDirectoryController', + 'PhabricatorDirectoryMainController' => 'PhabricatorDirectoryController', + 'PhabricatorLiskDAO' => 'LiskDAO', + 'PhabricatorStandardPageView' => 'AphrontPageView', ), 'requires_interface' => array( diff --git a/src/aphront/controller/AphrontController.php b/src/aphront/controller/AphrontController.php index 8bae576d53..ea55eda1f8 100644 --- a/src/aphront/controller/AphrontController.php +++ b/src/aphront/controller/AphrontController.php @@ -37,12 +37,4 @@ abstract class AphrontController { return $this->request; } - public function buildStandardPageResponse($view) { - $page = new AphrontStandardPageView(); - $page->appendChild($view); - $response = new AphrontWebpageResponse(); - $response->setContent($page->render()); - return $response; - } - } diff --git a/src/aphront/controller/__init__.php b/src/aphront/controller/__init__.php index 033c699e5c..aab2bf13e8 100644 --- a/src/aphront/controller/__init__.php +++ b/src/aphront/controller/__init__.php @@ -6,8 +6,5 @@ -phutil_require_module('phabricator', 'aphront/response/webpage'); -phutil_require_module('phabricator', 'view/page/standard'); - phutil_require_source('AphrontController.php'); diff --git a/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php index a2129f40c3..f73dda95f0 100644 --- a/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php @@ -69,7 +69,7 @@ class AphrontDefaultApplicationConfiguration ''.phutil_escape_html((string)$ex).''. ''; - $view = new AphrontStandardPageView(); + $view = new PhabricatorStandardPageView(); $view->appendChild($content); $response = new AphrontWebpageResponse(); @@ -82,7 +82,7 @@ class AphrontDefaultApplicationConfiguration $request = $this->getRequest(); if ($response instanceof AphrontDialogResponse) { if (!$request->isAjax()) { - $view = new AphrontStandardPageView(); + $view = new PhabricatorStandardPageView(); $view->appendChild( '
'. $response->buildResponseString(). diff --git a/src/aphront/default/controller/AphrontDefaultApplicationController.php b/src/aphront/default/controller/AphrontDefaultApplicationController.php index c2b50f3826..905be29f74 100644 --- a/src/aphront/default/controller/AphrontDefaultApplicationController.php +++ b/src/aphront/default/controller/AphrontDefaultApplicationController.php @@ -28,7 +28,7 @@ class AphrontDefaultApplicationController extends AphrontController { $host = phutil_escape_html($request->getHost()); $controller_name = phutil_escape_html(get_class($this)); - $page = new AphrontStandardPageView(); + $page = new PhabricatorStandardPageView(); $response = new AphrontWebpageResponse(); $response->setContent($page->render()); diff --git a/src/applications/base/controller/base/PhabricatorController.php b/src/applications/base/controller/base/PhabricatorController.php new file mode 100644 index 0000000000..320c99788d --- /dev/null +++ b/src/applications/base/controller/base/PhabricatorController.php @@ -0,0 +1,29 @@ +appendChild($view); + $response = new AphrontWebpageResponse(); + $response->setContent($page->render()); + return $response; + } + +} diff --git a/src/aphront/storage/lisk/AphrontLiskDAO.php b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php similarity index 82% rename from src/aphront/storage/lisk/AphrontLiskDAO.php rename to src/applications/base/storage/lisk/PhabricatorLiskDAO.php index 729d91addd..069dca62a3 100644 --- a/src/aphront/storage/lisk/AphrontLiskDAO.php +++ b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php @@ -17,7 +17,7 @@ */ -abstract class AphrontLiskDAO extends LiskDAO { +abstract class PhabricatorLiskDAO extends LiskDAO { public function establishConnection($mode) { return new AphrontMySQLDatabaseConnection( @@ -25,15 +25,18 @@ abstract class AphrontLiskDAO extends LiskDAO { 'user' => 'root', 'pass' => '', 'host' => 'localhost', - 'database' => 'aphront_'.$this->getApplicationName(), + 'database' => 'phabricator_'.$this->getApplicationName(), )); } public function getTableName() { + $str = 'phabricator'; + $len = strlen($str); + $class = strtolower(get_class($this)); - if (!strncmp($class, 'aphront', 7)) { - $class = substr($class, 7); + if (!strncmp($class, $str, $len)) { + $class = substr($class, $len); } $app = $this->getApplicationName(); if (!strncmp($class, $app, strlen($app))) { diff --git a/src/aphront/storage/lisk/__init__.php b/src/applications/base/storage/lisk/__init__.php similarity index 82% rename from src/aphront/storage/lisk/__init__.php rename to src/applications/base/storage/lisk/__init__.php index 7b4ac1cce2..8b349ea6d1 100644 --- a/src/aphront/storage/lisk/__init__.php +++ b/src/applications/base/storage/lisk/__init__.php @@ -10,4 +10,4 @@ phutil_require_module('phabricator', 'storage/connection/mysql'); phutil_require_module('phabricator', 'storage/lisk/dao'); -phutil_require_source('AphrontLiskDAO.php'); +phutil_require_source('PhabricatorLiskDAO.php'); diff --git a/src/applications/directory/controller/base/AphrontDirectoryController.php b/src/applications/directory/controller/base/PhabricatorDirectoryController.php similarity index 91% rename from src/applications/directory/controller/base/AphrontDirectoryController.php rename to src/applications/directory/controller/base/PhabricatorDirectoryController.php index 69960676b6..08e5d723f8 100644 --- a/src/applications/directory/controller/base/AphrontDirectoryController.php +++ b/src/applications/directory/controller/base/PhabricatorDirectoryController.php @@ -16,10 +16,10 @@ * limitations under the License. */ -abstract class AphrontDirectoryController extends AphrontController { +abstract class PhabricatorDirectoryController extends PhabricatorController { public function buildStandardPageResponse($view, array $data) { - $page = new AphrontStandardPageView(); + $page = new PhabricatorStandardPageView(); $page->setApplicationName('Directory'); $page->setBaseURI('/'); diff --git a/src/applications/directory/controller/base/__init__.php b/src/applications/directory/controller/base/__init__.php index 55a1fb02ff..bab124638d 100644 --- a/src/applications/directory/controller/base/__init__.php +++ b/src/applications/directory/controller/base/__init__.php @@ -6,11 +6,11 @@ -phutil_require_module('phabricator', 'aphront/controller'); phutil_require_module('phabricator', 'aphront/response/webpage'); +phutil_require_module('phabricator', 'applications/base/controller/base'); phutil_require_module('phabricator', 'view/page/standard'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryController.php'); +phutil_require_source('PhabricatorDirectoryController.php'); diff --git a/src/applications/directory/controller/categorydelete/AphrontDirectoryCategoryDeleteController.php b/src/applications/directory/controller/categorydelete/PhabricatorDirectoryCategoryDeleteController.php similarity index 89% rename from src/applications/directory/controller/categorydelete/AphrontDirectoryCategoryDeleteController.php rename to src/applications/directory/controller/categorydelete/PhabricatorDirectoryCategoryDeleteController.php index 8e5c7d8013..58c619a7e3 100644 --- a/src/applications/directory/controller/categorydelete/AphrontDirectoryCategoryDeleteController.php +++ b/src/applications/directory/controller/categorydelete/PhabricatorDirectoryCategoryDeleteController.php @@ -16,8 +16,8 @@ * limitations under the License. */ -class AphrontDirectoryCategoryDeleteController - extends AphrontDirectoryController { +class PhabricatorDirectoryCategoryDeleteController + extends PhabricatorDirectoryController { public function willProcessRequest(array $data) { $this->id = $data['id']; @@ -25,7 +25,7 @@ class AphrontDirectoryCategoryDeleteController public function processRequest() { - $category = id(new AphrontDirectoryCategory())->load($this->id); + $category = id(new PhabricatorDirectoryCategory())->load($this->id); if (!$category) { return new Aphront404Response(); } diff --git a/src/applications/directory/controller/categorydelete/__init__.php b/src/applications/directory/controller/categorydelete/__init__.php index c7aa388193..edcd40f1fd 100644 --- a/src/applications/directory/controller/categorydelete/__init__.php +++ b/src/applications/directory/controller/categorydelete/__init__.php @@ -16,4 +16,4 @@ phutil_require_module('phabricator', 'view/dialog'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryCategoryDeleteController.php'); +phutil_require_source('PhabricatorDirectoryCategoryDeleteController.php'); diff --git a/src/applications/directory/controller/categoryedit/AphrontDirectoryCategoryEditController.php b/src/applications/directory/controller/categoryedit/PhabricatorDirectoryCategoryEditController.php similarity index 90% rename from src/applications/directory/controller/categoryedit/AphrontDirectoryCategoryEditController.php rename to src/applications/directory/controller/categoryedit/PhabricatorDirectoryCategoryEditController.php index 2525a746da..7194fc796b 100644 --- a/src/applications/directory/controller/categoryedit/AphrontDirectoryCategoryEditController.php +++ b/src/applications/directory/controller/categoryedit/PhabricatorDirectoryCategoryEditController.php @@ -16,8 +16,8 @@ * limitations under the License. */ -class AphrontDirectoryCategoryEditController - extends AphrontDirectoryController { +class PhabricatorDirectoryCategoryEditController + extends PhabricatorDirectoryController { private $id; @@ -28,12 +28,12 @@ class AphrontDirectoryCategoryEditController public function processRequest() { if ($this->id) { - $category = id(new AphrontDirectoryCategory())->load($this->id); + $category = id(new PhabricatorDirectoryCategory())->load($this->id); if (!$category) { return new Aphront404Response(); } } else { - $category = new AphrontDirectoryCategory(); + $category = new PhabricatorDirectoryCategory(); } $e_name = true; @@ -70,7 +70,7 @@ class AphrontDirectoryCategoryEditController $form->setAction('/directory/category/edit/'); } - $categories = id(new AphrontDirectoryCategory())->loadAll(); + $categories = id(new PhabricatorDirectoryCategory())->loadAll(); $category_map = mpull($categories, 'getName', 'getID'); $form diff --git a/src/applications/directory/controller/categoryedit/__init__.php b/src/applications/directory/controller/categoryedit/__init__.php index 7f83e5d8c2..53121af54c 100644 --- a/src/applications/directory/controller/categoryedit/__init__.php +++ b/src/applications/directory/controller/categoryedit/__init__.php @@ -18,4 +18,4 @@ phutil_require_module('phabricator', 'view/layout/panel'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryCategoryEditController.php'); +phutil_require_source('PhabricatorDirectoryCategoryEditController.php'); diff --git a/src/applications/directory/controller/categorylist/AphrontDirectoryCategoryListController.php b/src/applications/directory/controller/categorylist/PhabricatorDirectoryCategoryListController.php similarity index 91% rename from src/applications/directory/controller/categorylist/AphrontDirectoryCategoryListController.php rename to src/applications/directory/controller/categorylist/PhabricatorDirectoryCategoryListController.php index b34c2ce01e..1f0b510b4f 100644 --- a/src/applications/directory/controller/categorylist/AphrontDirectoryCategoryListController.php +++ b/src/applications/directory/controller/categorylist/PhabricatorDirectoryCategoryListController.php @@ -16,11 +16,11 @@ * limitations under the License. */ -class AphrontDirectoryCategoryListController - extends AphrontDirectoryController { +class PhabricatorDirectoryCategoryListController + extends PhabricatorDirectoryController { public function processRequest() { - $categories = id(new AphrontDirectoryCategory())->loadAll(); + $categories = id(new PhabricatorDirectoryCategory())->loadAll(); $categories = msort($categories, 'getSequence'); $rows = array(); diff --git a/src/applications/directory/controller/categorylist/__init__.php b/src/applications/directory/controller/categorylist/__init__.php index 587d0f8c68..e6aa3dae31 100644 --- a/src/applications/directory/controller/categorylist/__init__.php +++ b/src/applications/directory/controller/categorylist/__init__.php @@ -15,4 +15,4 @@ phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryCategoryListController.php'); +phutil_require_source('PhabricatorDirectoryCategoryListController.php'); diff --git a/src/applications/directory/controller/itemdelete/AphrontDirectoryItemDeleteController.php b/src/applications/directory/controller/itemdelete/PhabricatorDirectoryItemDeleteController.php similarity index 89% rename from src/applications/directory/controller/itemdelete/AphrontDirectoryItemDeleteController.php rename to src/applications/directory/controller/itemdelete/PhabricatorDirectoryItemDeleteController.php index a6321f38c7..076c73ced1 100644 --- a/src/applications/directory/controller/itemdelete/AphrontDirectoryItemDeleteController.php +++ b/src/applications/directory/controller/itemdelete/PhabricatorDirectoryItemDeleteController.php @@ -16,7 +16,8 @@ * limitations under the License. */ -class AphrontDirectoryItemDeleteController extends AphrontDirectoryController { +class PhabricatorDirectoryItemDeleteController + extends PhabricatorDirectoryController { public function willProcessRequest(array $data) { $this->id = $data['id']; @@ -24,7 +25,7 @@ class AphrontDirectoryItemDeleteController extends AphrontDirectoryController { public function processRequest() { - $item = id(new AphrontDirectoryItem())->load($this->id); + $item = id(new PhabricatorDirectoryItem())->load($this->id); if (!$item) { return new Aphront404Response(); } diff --git a/src/applications/directory/controller/itemdelete/__init__.php b/src/applications/directory/controller/itemdelete/__init__.php index e8970cbef4..1462840f94 100644 --- a/src/applications/directory/controller/itemdelete/__init__.php +++ b/src/applications/directory/controller/itemdelete/__init__.php @@ -16,4 +16,4 @@ phutil_require_module('phabricator', 'view/dialog'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryItemDeleteController.php'); +phutil_require_source('PhabricatorDirectoryItemDeleteController.php'); diff --git a/src/applications/directory/controller/itemedit/AphrontDirectoryItemEditController.php b/src/applications/directory/controller/itemedit/PhabricatorDirectoryItemEditController.php similarity index 93% rename from src/applications/directory/controller/itemedit/AphrontDirectoryItemEditController.php rename to src/applications/directory/controller/itemedit/PhabricatorDirectoryItemEditController.php index 2d156595c6..0d3c58ff12 100644 --- a/src/applications/directory/controller/itemedit/AphrontDirectoryItemEditController.php +++ b/src/applications/directory/controller/itemedit/PhabricatorDirectoryItemEditController.php @@ -16,7 +16,8 @@ * limitations under the License. */ -class AphrontDirectoryItemEditController extends AphrontDirectoryController { +class PhabricatorDirectoryItemEditController + extends PhabricatorDirectoryController { private $id; @@ -27,12 +28,12 @@ class AphrontDirectoryItemEditController extends AphrontDirectoryController { public function processRequest() { if ($this->id) { - $item = id(new AphrontDirectoryItem())->load($this->id); + $item = id(new PhabricatorDirectoryItem())->load($this->id); if (!$item) { return new Aphront404Response(); } } else { - $item = new AphrontDirectoryItem(); + $item = new PhabricatorDirectoryItem(); } $e_name = true; @@ -78,7 +79,7 @@ class AphrontDirectoryItemEditController extends AphrontDirectoryController { $form->setAction('/directory/item/edit/'); } - $categories = id(new AphrontDirectoryCategory())->loadAll(); + $categories = id(new PhabricatorDirectoryCategory())->loadAll(); $category_map = mpull($categories, 'getName', 'getID'); $form diff --git a/src/applications/directory/controller/itemedit/__init__.php b/src/applications/directory/controller/itemedit/__init__.php index b1a4d2ebee..525554ef6b 100644 --- a/src/applications/directory/controller/itemedit/__init__.php +++ b/src/applications/directory/controller/itemedit/__init__.php @@ -19,4 +19,4 @@ phutil_require_module('phabricator', 'view/layout/panel'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryItemEditController.php'); +phutil_require_source('PhabricatorDirectoryItemEditController.php'); diff --git a/src/applications/directory/controller/itemlist/AphrontDirectoryItemListController.php b/src/applications/directory/controller/itemlist/PhabricatorDirectoryItemListController.php similarity index 89% rename from src/applications/directory/controller/itemlist/AphrontDirectoryItemListController.php rename to src/applications/directory/controller/itemlist/PhabricatorDirectoryItemListController.php index e5cc37d946..0df965b6cf 100644 --- a/src/applications/directory/controller/itemlist/AphrontDirectoryItemListController.php +++ b/src/applications/directory/controller/itemlist/PhabricatorDirectoryItemListController.php @@ -16,13 +16,14 @@ * limitations under the License. */ -class AphrontDirectoryItemListController extends AphrontDirectoryController { +class PhabricatorDirectoryItemListController + extends PhabricatorDirectoryController { public function processRequest() { - $items = id(new AphrontDirectoryItem())->loadAll(); + $items = id(new PhabricatorDirectoryItem())->loadAll(); $items = msort($items, 'getSortKey'); - $categories = id(new AphrontDirectoryCategory())->loadAll(); + $categories = id(new PhabricatorDirectoryCategory())->loadAll(); $category_names = mpull($categories, 'getName', 'getID'); $rows = array(); diff --git a/src/applications/directory/controller/itemlist/__init__.php b/src/applications/directory/controller/itemlist/__init__.php index 8c699f9d90..647f26c05a 100644 --- a/src/applications/directory/controller/itemlist/__init__.php +++ b/src/applications/directory/controller/itemlist/__init__.php @@ -16,4 +16,4 @@ phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryItemListController.php'); +phutil_require_source('PhabricatorDirectoryItemListController.php'); diff --git a/src/applications/directory/controller/main/AphrontDirectoryMainController.php b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php similarity index 90% rename from src/applications/directory/controller/main/AphrontDirectoryMainController.php rename to src/applications/directory/controller/main/PhabricatorDirectoryMainController.php index 33cb6a65b0..3ae36f0ea7 100644 --- a/src/applications/directory/controller/main/AphrontDirectoryMainController.php +++ b/src/applications/directory/controller/main/PhabricatorDirectoryMainController.php @@ -16,13 +16,14 @@ * limitations under the License. */ -class AphrontDirectoryMainController extends AphrontDirectoryController { +class PhabricatorDirectoryMainController + extends PhabricatorDirectoryController { public function processRequest() { - $items = id(new AphrontDirectoryItem())->loadAll(); + $items = id(new PhabricatorDirectoryItem())->loadAll(); $items = msort($items, 'getSortKey'); - $categories = id(new AphrontDirectoryCategory())->loadAll(); + $categories = id(new PhabricatorDirectoryCategory())->loadAll(); $categories = msort($categories, 'getSequence'); $category_map = mpull($categories, 'getName', 'getID'); diff --git a/src/applications/directory/controller/main/__init__.php b/src/applications/directory/controller/main/__init__.php index 1542a240ba..9d1846c24e 100644 --- a/src/applications/directory/controller/main/__init__.php +++ b/src/applications/directory/controller/main/__init__.php @@ -14,4 +14,4 @@ phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontDirectoryMainController.php'); +phutil_require_source('PhabricatorDirectoryMainController.php'); diff --git a/src/applications/directory/storage/base/AphrontDirectoryDAO.php b/src/applications/directory/storage/base/PhabricatorDirectoryDAO.php similarity index 90% rename from src/applications/directory/storage/base/AphrontDirectoryDAO.php rename to src/applications/directory/storage/base/PhabricatorDirectoryDAO.php index 03272e74a6..5eb3fe0b58 100644 --- a/src/applications/directory/storage/base/AphrontDirectoryDAO.php +++ b/src/applications/directory/storage/base/PhabricatorDirectoryDAO.php @@ -16,7 +16,7 @@ * limitations under the License. */ -abstract class AphrontDirectoryDAO extends AphrontLiskDAO { +abstract class PhabricatorDirectoryDAO extends PhabricatorLiskDAO { public function getApplicationName() { return 'directory'; diff --git a/src/applications/directory/storage/base/__init__.php b/src/applications/directory/storage/base/__init__.php index 58a0b7b539..c33d42ed8b 100644 --- a/src/applications/directory/storage/base/__init__.php +++ b/src/applications/directory/storage/base/__init__.php @@ -6,7 +6,7 @@ -phutil_require_module('phabricator', 'aphront/storage/lisk'); +phutil_require_module('phabricator', 'applications/base/storage/lisk'); -phutil_require_source('AphrontDirectoryDAO.php'); +phutil_require_source('PhabricatorDirectoryDAO.php'); diff --git a/src/applications/directory/storage/category/AphrontDirectoryCategory.php b/src/applications/directory/storage/category/PhabricatorDirectoryCategory.php similarity index 90% rename from src/applications/directory/storage/category/AphrontDirectoryCategory.php rename to src/applications/directory/storage/category/PhabricatorDirectoryCategory.php index fe723b2d1a..b1ce09321f 100644 --- a/src/applications/directory/storage/category/AphrontDirectoryCategory.php +++ b/src/applications/directory/storage/category/PhabricatorDirectoryCategory.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class AphrontDirectoryCategory extends AphrontDirectoryDAO { +class PhabricatorDirectoryCategory extends PhabricatorDirectoryDAO { protected $name; protected $sequence; diff --git a/src/applications/directory/storage/category/__init__.php b/src/applications/directory/storage/category/__init__.php index 367b1a45ea..588e977382 100644 --- a/src/applications/directory/storage/category/__init__.php +++ b/src/applications/directory/storage/category/__init__.php @@ -9,4 +9,4 @@ phutil_require_module('phabricator', 'applications/directory/storage/base'); -phutil_require_source('AphrontDirectoryCategory.php'); +phutil_require_source('PhabricatorDirectoryCategory.php'); diff --git a/src/applications/directory/storage/item/AphrontDirectoryItem.php b/src/applications/directory/storage/item/PhabricatorDirectoryItem.php similarity index 93% rename from src/applications/directory/storage/item/AphrontDirectoryItem.php rename to src/applications/directory/storage/item/PhabricatorDirectoryItem.php index d615a01dab..811bb59a69 100644 --- a/src/applications/directory/storage/item/AphrontDirectoryItem.php +++ b/src/applications/directory/storage/item/PhabricatorDirectoryItem.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class AphrontDirectoryItem extends AphrontDirectoryDAO { +class PhabricatorDirectoryItem extends PhabricatorDirectoryDAO { protected $name; protected $description; diff --git a/src/applications/directory/storage/item/__init__.php b/src/applications/directory/storage/item/__init__.php index 885e04e971..5ceb069a77 100644 --- a/src/applications/directory/storage/item/__init__.php +++ b/src/applications/directory/storage/item/__init__.php @@ -9,4 +9,4 @@ phutil_require_module('phabricator', 'applications/directory/storage/base'); -phutil_require_source('AphrontDirectoryItem.php'); +phutil_require_source('PhabricatorDirectoryItem.php'); diff --git a/src/view/page/standard/AphrontStandardPageView.php b/src/view/page/standard/PhabricatorStandardPageView.php similarity index 97% rename from src/view/page/standard/AphrontStandardPageView.php rename to src/view/page/standard/PhabricatorStandardPageView.php index 04c6f10bbd..a0679d92fc 100755 --- a/src/view/page/standard/AphrontStandardPageView.php +++ b/src/view/page/standard/PhabricatorStandardPageView.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class AphrontStandardPageView extends AphrontPageView { +class PhabricatorStandardPageView extends AphrontPageView { private $baseURI; private $applicationName; diff --git a/src/view/page/standard/__init__.php b/src/view/page/standard/__init__.php index 551b61d102..d931d61dd5 100644 --- a/src/view/page/standard/__init__.php +++ b/src/view/page/standard/__init__.php @@ -12,4 +12,4 @@ phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); -phutil_require_source('AphrontStandardPageView.php'); +phutil_require_source('PhabricatorStandardPageView.php');