| 523 |
* @return string A standised error message |
* @return string A standised error message |
| 524 |
*/ |
*/ |
| 525 |
function stderr( $showSQL = false ) { |
function stderr( $showSQL = false ) { |
| 526 |
return "DB function failed with error number $this->_errorNum" |
$errormsg = sprintf(T_('DB function failed with error number %d'),$this->_errorNum); |
| 527 |
."<br /><font color=\"red\">$this->_errorMsg</font>" |
$errormsg .= '<br /><span style="color:red">'.$this->_errorMsg.'</span>'; |
| 528 |
.($showSQL ? "<br />SQL = <pre>$this->_sql</pre>" : ''); |
$errormsg .= $showSQL ? "<br />SQL = <pre>$this->_sql</pre>" : ''; |
| 529 |
|
return $errormsg; |
| 530 |
} |
} |
| 531 |
|
|
| 532 |
function insertid() |
function insertid() |
| 688 |
*/ |
*/ |
| 689 |
function bind( $array, $ignore="" ) { |
function bind( $array, $ignore="" ) { |
| 690 |
if (!is_array( $array )) { |
if (!is_array( $array )) { |
| 691 |
$this->_error = strtolower(get_class( $this ))."::bind failed."; |
$this->_error = sprintf(T_('%s failed.'), strtolower(get_class( $this ))."::bind()"); |
| 692 |
return false; |
return false; |
| 693 |
} else { |
} else { |
| 694 |
return mosBindArrayToObject( $array, $this, $ignore ); |
return mosBindArrayToObject( $array, $this, $ignore ); |
| 739 |
$ret = $this->_db->insertObject( $this->_tbl, $this, $this->_tbl_key ); |
$ret = $this->_db->insertObject( $this->_tbl, $this, $this->_tbl_key ); |
| 740 |
} |
} |
| 741 |
if( !$ret ) { |
if( !$ret ) { |
| 742 |
$this->_error = strtolower(get_class( $this ))."::store failed <br />" . $this->_db->getErrorMsg(); |
$this->_error = sprintf(T_('%s failed.'), strtolower(get_class( $this )).'::store()') .'<br />'.$this->_db->getErrorMsg(); |
| 743 |
return false; |
return false; |
| 744 |
} else { |
} else { |
| 745 |
return true; |
return true; |
| 1054 |
*/ |
*/ |
| 1055 |
function publish_array( $cid=null, $publish=1, $myid=0 ) { |
function publish_array( $cid=null, $publish=1, $myid=0 ) { |
| 1056 |
if (!is_array( $cid ) || count( $cid ) < 1) { |
if (!is_array( $cid ) || count( $cid ) < 1) { |
| 1057 |
$this->_error = "No items selected."; |
$this->_error = T_("No items selected."); |
| 1058 |
return false; |
return false; |
| 1059 |
} |
} |
| 1060 |
|
|