News admin panel

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@39 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
akulikov
2008-12-29 16:16:58 +00:00
parent 83d25fa24b
commit 9345b8d27e
3 changed files with 11 additions and 18 deletions

View File

@ -113,7 +113,10 @@ abstract class Model
function getList($limit = false, $sort = 'ASC')
{
return $this->query('SELECT * FROM '.$this->table.' ORDER BY '.$this->primary_key.' '.($sort == 'ASC' ? 'ASC' : 'DESC').($limit === false ? ' LIMIT '.(int) $limit : ''));
return $this->query('SELECT *
FROM '.$this->table.'
ORDER BY '.$this->primary_key.' '.($sort == 'ASC' ? 'ASC' : 'DESC')
.($limit !== false ? ' LIMIT '.(int) $limit : ''))->fetchAll();
}
}

View File

@ -56,10 +56,6 @@ final class Router
*/
function proccess($path)
{
if(self::getRewriteBase()){
$path = trim(ltrim($path, self::getRewriteBase()), '/');
}
$path = explode('/', $path);
foreach($this->routes as $name => $route) {
@ -73,21 +69,11 @@ final class Router
throw new StaticPageException(E_404);
}
static public function setRewriteBase($value = '')
{
self::$rewrite_base = $value;
}
static public function getRewriteBase()
{
return self::$rewrite_base;
}
static public function setDefaultDecorator($decorator)
{
self::$decorator = $decorator.DECORATOR_POSTFIX;
}
static public function getRouteName()
{
return self::$route_name;