require_once 'DB.php';
require_once 'MECON/DB/Pager.php';
+require_once 'MECON/Array/Pager.php';
require_once 'MECON/HTML/Error.php';
require_once 'MECON/HTML/Link.php';
require_once 'MECON/HTML/Tabla.php';
*/
function addPager($result, $tipo = null, $link = null, $limit = 10, $maxpages = 21, $getvar = 'from') {
// Creo el pager con el resultado.
- $pager = new MECON_DB_Pager($result, @$_GET[$this->getGetVarPrefix().$getvar], $limit, $maxpages);
+ $pager = (is_array($result))?
+ new MECON_Array_Pager($result, @$_GET[$this->_getVarPrefix.$getvar], $limit, $maxpages):
+ new MECON_DB_Pager($result, @$_GET[$this->_getVarPrefix.$getvar], $limit, $maxpages);
+
// Obtengo un link vĂ¡lido.
if (!$link) {
$link = @$_SERVER['PHP_SELF'];