Monday, September 26, 2011

CDR export file no data correction:

You need apply the following patch
--- /root/cdr.php_orig  2010-09-08 12:56:20.000000000 +0300
+++ /var/www/html/maint/modules/cdrreport/controllers/cdr.php   2010-09-08 13:01:05.000000000 +0300
@@ -351,7 +353,7 @@

     $ret = $db->query("SELECT count(*) as totalrecords FROM cdr $where");
     $this->reportsize = $ret->current()->totalrecords;
-    return $db->query("SELECT * FROM cdr $where $orderby LIMIT ? OFFSET ?", array((int)$datalimit, (int)$datastart));
+    return $db->query("SELECT * FROM cdr $where $orderby" . ((int)$datalimit > 0 ? " LIMIT ? OFFSET ?" : ""), array((int)$datalimit, (int)$datastart));
     //return $db->query("SELECT * FROM cdr $where $orderby LIMIT ? OFFSET ?", array(100, (int)$datastart));
   }

No comments:

Post a Comment