Revision: 5909
Author:
ph...@designhive.com
Date: Wed Feb 18 10:37:35 2015 UTC
Log: Allow offset attribute on txp:recent_articles tag
https://code.google.com/p/textpattern/source/detail?r=5909
Modified:
/development/4.5/textpattern/publish/taghandlers.php
=======================================
--- /development/4.5/textpattern/publish/taghandlers.php Fri Oct 4
09:37:34 2013 UTC
+++ /development/4.5/textpattern/publish/taghandlers.php Wed Feb 18
10:37:35 2015 UTC
@@ -782,6 +782,7 @@
'label' => gTxt('recent_articles'),
'labeltag' => '',
'limit' => 10,
+ 'offset' => 0,
'section' => '',
'sort' => 'Posted desc',
'sortby' => '', // deprecated
@@ -820,7 +821,7 @@
$expired = ($prefs['publish_expired_articles']) ? '' : ' and (now() <=
Expires or Expires = '.NULLDATETIME.') ';
$rs = safe_rows_start('*, id as thisid, unix_timestamp(Posted) as
posted', 'textpattern',
- "Status = 4 $section $categories and Posted <= now()$expired order
by ".doSlash($sort).' limit 0,'.intval($limit));
+ "Status = 4 $section $categories and Posted <= now()$expired order
by ".doSlash($sort).' limit '.intval($offset).','.intval($limit));
if ($rs)
{