Operator: Fix references to operator driver
authorBen Klang <ben@alkaloid.net>
Sun, 10 Jan 2010 18:25:51 +0000 (13:25 -0500)
committerBen Klang <ben@alkaloid.net>
Sun, 10 Jan 2010 18:25:51 +0000 (13:25 -0500)
operator/lib/Form/SearchCDR.php
operator/lib/Operator.php
operator/search.php
operator/viewgraph.php

index 7342194..e04537a 100644 (file)
@@ -17,8 +17,6 @@ class SearchCDRForm extends Horde_Form {
 
     function SearchCDRForm($title, &$vars)
     {
-        global $operator_driver;
-
         parent::Horde_Form($vars, $title);
 
         // FIXME: Generate a list of clients from Turba?
index a882ce9..90dbbaa 100644 (file)
@@ -88,9 +88,9 @@ class Operator {
      */
     function getAccountCodes($permfilter = false)
     {
-        global $operator_driver;
+        global $operator;
 
-        $accountcodes = $operator_driver->getAccountCodes();
+        $accountcodes = $operator->driver->getAccountCodes();
 
         if (Horde_Auth::isAdmin() || 
             $GLOBALS['perms']->hasPermission('operator:accountcodes',
index 8f31a5a..30e7cc5 100644 (file)
@@ -46,7 +46,7 @@ if ($form->isSubmitted() && $form->validate($vars, true)) {
     if (is_a($start, 'PEAR_Error') || is_a($end, 'PEAR_Error')) {
         $notification->push(_("Invalid date requested."));
     } else {
-        $data = $operator_driver->getRecords($start, $end, $accountcode,
+        $data = $operator->driver->getRecords($start, $end, $accountcode,
                                              $dcontext, $rowstart, $numrows);
         if (is_a($data, 'PEAR_Error')) {
             $notification->push($data);
index fe36c5d..e9e1430 100644 (file)
@@ -43,7 +43,7 @@ if ($form->isSubmitted() && $form->validate($vars, true)) {
         // the object.
         $stats = $cache->get($cachekey, 0);
         if ($stats === false) {
-            $stats = $operator_driver->getMonthlyCallStats($start,
+            $stats = $operator->driver->getMonthlyCallStats($start,
                                                            $end,
                                                            $accountcode,
                                                            $dcontext);