From: Andrey Kutejko Date: Sun, 11 Aug 2013 20:25:32 +0000 (+0300) Subject: code style changes X-Git-Tag: 0.5~63 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=7bb4b7bb41e92fdcc6dbdd9feeb23e56f00c0ec6;p=ipf.git code style changes --- diff --git a/ipf/admin/app.php b/ipf/admin/app.php index 36c241e..0ef0999 100644 --- a/ipf/admin/app.php +++ b/ipf/admin/app.php @@ -52,7 +52,7 @@ class IPF_Admin_App extends IPF_Application { foreach (IPF_Project::getInstance()->appList() as $app) { if ($app->getSlug() == $lapp) { - foreach($app->modelList() as $m) { + foreach ($app->modelList() as $m) { if (strtolower($m) == $lmodel) return array('app' => $app, 'modelname' => $m); } @@ -60,7 +60,7 @@ class IPF_Admin_App extends IPF_Application } return null; } - + static function GetAdminModelPermissions($adminModel, $request, $lapp, $lmodel) { $adminPerms = $adminModel->getPerms($request); diff --git a/ipf/admin/views.php b/ipf/admin/views.php index f471f26..03c1f7e 100644 --- a/ipf/admin/views.php +++ b/ipf/admin/views.php @@ -113,25 +113,18 @@ function IPF_Admin_Views_EditItem($request, $match) $lapp = $match[1]; $lmodel = $match[2]; $id = $match[3]; - + $am = IPF_Admin_App::GetAppModelFromSlugs($lapp, $lmodel); - - if ($am !== null) - { - $app = $am['app']; - $m = $am['modelname']; - + + if ($am !== null) { + $m = $am['modelname']; $ma = IPF_Admin_Model::getModelAdmin($m); - - if ($ma !== null) - { - $o = new $m(); - $item = $o->getTable()->find($id); - + if ($ma !== null) { + $item = IPF_ORM::getTable($m)->find($id); return $ma->EditItem($request, $lapp, $lmodel, $item); } } - + return new IPF_HTTP_Response_NotFound($request); } diff --git a/ipf/form/field.php b/ipf/form/field.php index 85d225f..bd0f10a 100644 --- a/ipf/form/field.php +++ b/ipf/form/field.php @@ -40,7 +40,8 @@ class IPF_Form_Field return $value; } - function LateClean($data, &$cleaned_data){ + function LateClean($data, &$cleaned_data) + { } protected function createWidget($args)