diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 77094a05f..60d3af000 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -2920,7 +2920,8 @@ class e_admin_model extends e_front_model $this->_db_errmsg = $sql->getLastErrorText(); $this->addMessageError('SQL Insert Error', $session_messages); //TODO - Lan - $this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$sql->getLastErrorText()); + $this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$this->_db_errmsg); + $this->addMessageDebug('SQL QRY Error '.print_a($sqlQry,true)); return false; } diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 606f5d1cb..25a2f6bd9 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -466,6 +466,8 @@ class e_db_mysql catch(PDOException $ex) { $sQryRes = false; + $this->mySQLlastErrText = $ex->getMessage(); + $this->mySQLlastErrNum = $ex->getCode(); } } else @@ -477,8 +479,9 @@ class e_db_mysql } catch(PDOException $ex) { - $sQryRes = false; + $this->mySQLlastErrText = $ex->getMessage(); + $this->mySQLlastErrNum = $ex->getCode(); } } @@ -918,7 +921,7 @@ class e_db_mysql } else { - $this->dbError("db_Insert ({$query})"); + // $this->dbError("db_Insert ({$query})"); return FALSE; } } @@ -2522,14 +2525,8 @@ class e_db_mysql if($this->pdo) { - // $this->mySQLlastErrNum =; $this->mySQLerror = true; - if(is_object($this->mySQLaccess)) - { - $errInfo= $this->mySQLaccess->errorInfo(); - $this->mySQLlastErrNum = $errInfo[1]; - $this->mySQLlastErrText = $errInfo[2]; // $ex->getMessage(); - } + if($this->mySQLlastErrNum == 0) { return null; diff --git a/e107_plugins/banner/admin_banner.php b/e107_plugins/banner/admin_banner.php index fe57c1e79..73a1509d4 100644 --- a/e107_plugins/banner/admin_banner.php +++ b/e107_plugins/banner/admin_banner.php @@ -113,7 +113,7 @@ class banner_ui extends e_admin_ui protected $fields = array ( 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), - 'banner_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '2%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'banner_id' => array ( 'title' => LAN_ID, 'type' => null, 'data' => 'int', 'width' => '2%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'banner_campaign' => array ( 'title' => 'Campaign', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => array( 'tdClassRight'=>'form-inline'), 'class' => 'left', 'thclass' => 'left', ), 'banner_clientname' => array ( 'title' => 'Clientname', 'type' => 'method', 'tab'=>1, 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), @@ -170,7 +170,7 @@ class banner_ui extends e_admin_ui $new_data['banner_clientname'] = $new_data['banner_clientname_sel']; } - + if(!empty($new_data['banner_campaign_sel']) && $new_data['banner_campaign_sel'] != '_new_') { $new_data['banner_campaign'] = $new_data['banner_campaign_sel']; @@ -187,7 +187,8 @@ class banner_ui extends e_admin_ui public function onCreateError($new_data, $old_data) { - // do something + // do something + exit; } @@ -446,7 +447,7 @@ class banner_form_ui extends e_admin_form_ui else { - $text .= $frm->text('client_name',$curVal); + $text .= $frm->text('banner_clientname',$curVal); $text .= "".BNRLAN_29.""; }