From 28d10be26fd201afae7cf98aadcfb590dd5ac276 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 28 Sep 2014 20:17:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D1=80=D0=BC=D0=B0=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=B8=D0=B7=D0=B1=D1=80=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/classes/Model.php | 7 ++----- ground/controllers/IndexController.php | 1 - ground/views/indexTemplate.php | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ground/classes/Model.php b/ground/classes/Model.php index 56683e7..c603017 100644 --- a/ground/classes/Model.php +++ b/ground/classes/Model.php @@ -154,7 +154,6 @@ abstract class Model $sql .= isset($params['where'])&&$params['where'] ? ' WHERE ' . $params['where'] : ''; $sql .= isset($params['order'])&&$params['order'] ? ' ORDER BY ' . $params['order'] : ''; $sql .= isset($params['limit'])&&$params['limit'] ? ' LIMIT ' . $params['limit'] : ''; - $res = App::DB()->query($sql); $ready = array(); @@ -176,12 +175,10 @@ abstract class Model */ function getOne($whereField, $whereValue) { - return array_shift( - $this->getAll(array( + return $this->getAll(array( 'where' => '`' . $whereField . '` = "' . $whereValue . '"', 'limit' => 1 - )) - ); + )); } /** diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index e95558f..f7dfaa1 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -117,7 +117,6 @@ class IndexController extends Controller { $source = file_get_contents('http://ulogin.ru/token.php?token=' . $_POST['token'] . '&host=' . $_SERVER['HTTP_HOST']); $uLoginUser = json_decode($source, true); - //var_dump($uLoginUser);die; $uLoginUser['identity'] = md5($uLoginUser['uid'] . $uLoginUser['network'] . '=P'); $user = User::model()->getByUID($uLoginUser['identity']); diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php index fee7284..f94ca35 100644 --- a/ground/views/indexTemplate.php +++ b/ground/views/indexTemplate.php @@ -13,6 +13,7 @@
+
@@ -63,6 +64,18 @@ +
+

Хочу посетить

+
+ + + point->name ?>
+ + + Ваши закладки пока пусты. + +
+

Мои маршруты

@@ -80,12 +93,6 @@

Профиль

Выйти
- - - - point->name ?>
- -