From f9ea56d54f8c57680a8f252724bb35c63ca351ee Mon Sep 17 00:00:00 2001 From: be-ride Date: Mon, 4 May 2015 20:12:33 +1000 Subject: [PATCH 1/2] Update BrandAdmin.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Если не указываешь УРЛ или название бренда, нет ошибки и бренд создается пустой. --- simpla/BrandAdmin.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simpla/BrandAdmin.php b/simpla/BrandAdmin.php index dfcb24d..e939d4e 100755 --- a/simpla/BrandAdmin.php +++ b/simpla/BrandAdmin.php @@ -29,6 +29,14 @@ function fetch() { $this->design->assign('message_error', 'url_exists'); } + elseif(empty($category->name)) + { + $this->design->assign('message_error', 'name_empty'); + } + elseif(empty($category->url)) + { + $this->design->assign('message_error', 'url_empty'); + } else { if(empty($brand->id)) @@ -66,4 +74,4 @@ function fetch() $this->design->assign('brand', $brand); return $this->design->fetch('brand.tpl'); } -} \ No newline at end of file +} From e3a9d698d09ab02b2d9fc7835e407b4d2dec3517 Mon Sep 17 00:00:00 2001 From: be-ride Date: Mon, 4 May 2015 20:38:58 +1000 Subject: [PATCH 2/2] Update BrandAdmin.php --- simpla/BrandAdmin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpla/BrandAdmin.php b/simpla/BrandAdmin.php index e939d4e..3180c12 100755 --- a/simpla/BrandAdmin.php +++ b/simpla/BrandAdmin.php @@ -29,11 +29,11 @@ function fetch() { $this->design->assign('message_error', 'url_exists'); } - elseif(empty($category->name)) + elseif(empty($brand->name)) { $this->design->assign('message_error', 'name_empty'); } - elseif(empty($category->url)) + elseif(empty($brand->url)) { $this->design->assign('message_error', 'url_empty'); }