Ejemplo n.º 1
0
 function _replaceBlobs($matches)
 {
     $blob = $this->checkoutBlob($matches[1]);
     //if ( !is_uploaded_file($blob) ) throw new Exception(df_translate('scripts.Dataface.DB._replaceBlobs.BLOB_NOT_UPLOADED',"Attempt to load blob that is not uploaded. "), E_USER_ERROR);
     if (PEAR::isError($blob)) {
         throw new Exception($blob->toString(), E_USER_ERROR);
     }
     return xf_db_real_escape_string(file_get_contents($blob));
 }
Ejemplo n.º 2
0
 /**
  * Escapes a string according to the current DBMS's standards
  *
  * @param string $str  the string to be escaped
  *
  * @return string  the escaped string
  *
  * @see DB_common::quoteSmart()
  * @since Method available since Release 1.6.0
  */
 function escapeSimple($str)
 {
     if (function_exists('xf_db_real_escape_string')) {
         return @xf_db_real_escape_string($str, $this->connection);
     } else {
         return @xf_db_escape_string($str);
     }
 }