| version 1.73, 2013/07/24 07:01:14 |
version 1.74, 2013/09/02 09:30:56 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/db.inc.php,v 1.72 2012-10-25 08:09:16 igor Exp $ */ |
/* $Platon: Metafox/db.inc.php,v 1.73 2013-07-24 07:01:14 igor Exp $ */ |
| |
|
| /* |
/* |
| * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
* updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
| Line 518 function ezin_get_articles_todo() /* {{{ |
|
| Line 518 function ezin_get_articles_todo() /* {{{ |
|
| * ezin_get_article_list() |
* ezin_get_article_list() |
| * TODO: this should probably re-think or re-implement (with database enums too) |
* TODO: this should probably re-think or re-implement (with database enums too) |
| */ |
*/ |
| function ezin_get_article_list($section_id = 0, $author_id = 0, $limit = 10, $lang = '') /* {{{ */ |
function ezin_get_article_list($section_id = 0, $author_id = 0, $limit = 10, $lang = '', $from = null) /* {{{ */ |
| { |
{ |
| global $ezin_sys; |
global $ezin_sys; |
| global $ezin_cfg; |
global $ezin_cfg; |
| Line 648 function ezin_get_article_list($section_ |
|
| Line 648 function ezin_get_article_list($section_ |
|
| .($ezin_cfg['order_articles_desc'] ? 'DESC' : 'ASC') |
.($ezin_cfg['order_articles_desc'] ? 'DESC' : 'ASC') |
| .', articles.id DESC'; |
.', articles.id DESC'; |
| if ($limit > 0) { |
if ($limit > 0) { |
| $query .= ' LIMIT '.$limit; |
if (is_null($from)) { |
| |
$query .= ' LIMIT '.$limit; |
| |
} else { |
| |
$from = intval($from); |
| |
$query .= ' LIMIT '.$from.','.$limit; |
| |
} |
| } |
} |
| $result = @mysql_query($query, $ezin_db_handle) |
$result = @mysql_query($query, $ezin_db_handle) |
| or ezin_db_error('ezin_get_article_list()'); |
or ezin_db_error('ezin_get_article_list()'); |