From a0bc514809e465444d9054fa67052d1ea6cb8cd7 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Wed, 6 Sep 2017 17:59:28 +0530 Subject: [PATCH] Company profile pic issue fixed --- application/controllers/companycontroller.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/application/controllers/companycontroller.php b/application/controllers/companycontroller.php index ebdb8763..4aceb9fb 100755 --- a/application/controllers/companycontroller.php +++ b/application/controllers/companycontroller.php @@ -154,7 +154,25 @@ class companycontroller extends BaseController else { - $Picture = $this->add(); + // $Picture = $this->add(); + $PictureName = $this->input->post('Image'); + $ModifyPictureName = $this->input->post('ModifyImage'); + if ($PictureName != '') + { + if(strlen($ModifyPictureName) == 0) + { + $Picture = $PictureName; + } + else + { + $Picture = $ModifyPictureName; + } + } + else + { + //echo 'Not Exists'; + $Picture = $this->add(); + } $file =$this->addfile(); $CompID = $this->input->post('CompanyID'); $CompanyName = $this->input->post('CompanyName');