return count($aParts) > count($bParts);
}
-
- /**
- * Logs a debug entry
- *
- * @param string $sql The log statement.
- * @param string $name TODO
- * @param float $runtime Runtime interval.
- */
- protected function _logDebug($entry, $name, $runtime = null)
- {
- /*@TODO */
- $name = (empty($name) ? '' : $name)
- . (empty($runtime) ? '' : sprintf(" (%.4fs)", $runtime));
- $this->_logger->debug($this->_formatLogEntry($name, $entry));
- }
-
- /**
- * Logs an error entry.
- *
- * @param string $error The error statement.
- * @param string $name TODO
- * @param float $runtime Runtime interval.
- */
- protected function _logError($error, $name, $runtime = null)
- {
- /*@TODO */
- $name = (empty($name) ? '' : $name)
- . (empty($runtime) ? '' : sprintf(" (%.4fs)", $runtime));
- $this->_logger->err($this->_formatLogEntry($name, $error));
- }
-
- /**
- * Formats the log entry.
- *
- * @param string $message Message.
- * @param string $sql SQL statment.
- *
- * @return string Formatted log entry.
- */
- protected function _formatLogEntry($message, $sql)
- {
- return "SQL $message \n\t" . wordwrap(preg_replace("/\s+/", ' ', $sql), 70, "\n\t ", 1);
- }
-
}
throw new Horde_Share_Exception($e->getMessage());
}
if (!$results) {
- $this->_logError(sprintf("Share name %s not found", $name), 'NOT FOUND');
+ $this->_logger->err(sprintf('Share name %s not found', $name));
throw new Horde_Exception_NotFound();
}
$data = $this->_fromDriverCharset($results);
throw new Horde_Share_Exception($e->getMessage());
}
if (!$results) {
- $this->_logError(sprintf("Share name %s not found", $name), 'NOT FOUND');
+ $this->_logger->err(sprintf('Share name %s not found', $name));
throw new Horde_Exception_NotFound();
}
$data = $this->_fromDriverCharset($results);
. ' AND (' . Horde_SQL::buildClause($this->_db, 'g.perm', '&', $perm) . '))';
}
} catch (Horde_Group_Exception $e) {
- $this->_logError($e, 'Horde_Share_Sql::getShareCriteria()');
+ $this->_logger->err($e);
}
} else {
$where = '(' . Horde_SQL::buildClause($this->_db, 's.perm_guest', '&', $perm) . ')';