public function filterCaseInsensitive($value, &$sqlFilter) { $sqlFilter[] = new Zend_Db_Expr(Centurion_Db_Table_Abstract::getDefaultAdapter()->quoteInto('uid like ? COLLATE utf8_general_ci', '%' . $value . '%')); }
public function errorAction() { $this->view->headMeta()->appendName('robots', 'noindex,follow'); $this->view->headTitle()->prepend('Error - '); $cachePage = $this->getInvokeArg('bootstrap')->getResource('cachemanager')->getCache('_page'); if (null !== $cachePage && method_exists($cachePage, 'cancel')) { $cachePage->cancel(); } $cachePage = $this->getInvokeArg('bootstrap')->getResource('cachemanager')->getCache('page'); if (null !== $cachePage && method_exists($cachePage, 'cancel')) { $cachePage->cancel(); } if ($this->_httpCode) { $this->getResponse()->setHttpResponseCode($this->_httpCode); } $params = array(); if ($log = $this->_getLog()) { if ($this->_exception) { if (method_exists($this->_request, 'getRequestUri')) { $uri = $this->_request->getRequestUri(); } else { $uri = $this->view->url(); } $referer = ''; if (isset($_SERVER['HTTP_REFERER'])) { $referer = ' (' . $_SERVER['HTTP_REFERER'] . ')'; } $log->log(sprintf("%d: \n%s \n%s: %s\n\n%s\n\n", $this->_httpCode, $uri, $referer, $this->_exception->exception->getMessage(), $this->_exception->exception->getTraceAsString()), $this->_priority); } } if ($this->getInvokeArg('displayExceptions') == true) { $params = array(); if ($this->_exception) { $params = array('exception' => $this->_exception->exception, 'trace' => Zend_Debug::dump($this->_exception->exception->getTraceAsString(), null, false)); } $params['profiler'] = Centurion_Db_Table_Abstract::getDefaultAdapter()->getProfiler()->getQueryProfiles(null, true); $this->renderToResponse(array('error/error-dev.phtml', 'centurion/error.phtml'), $params); } else { $this->renderToResponse(array('error/error.phtml', 'centurion/error.phtml'), $params); } }