From: Ben Klang Date: Wed, 13 Jan 2010 13:06:10 +0000 (-0500) Subject: Operator: Make prefs use same column names as UI X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=72c90a3127f309c8dec3c6baa6ec4ba2051db4c1;p=horde.git Operator: Make prefs use same column names as UI --- diff --git a/operator/config/prefs.php.dist b/operator/config/prefs.php.dist index 3586e21d0..15c64a090 100644 --- a/operator/config/prefs.php.dist +++ b/operator/config/prefs.php.dist @@ -25,25 +25,7 @@ $_prefs['columns'] = array( 'locked' => false, 'shared' => false, 'type' => 'multienum', - 'enum' => array( - 'accountcode' => _("Account Code"), - 'src' => _("Source"), - 'dst' => _("Destination"), - 'dcontext' => _("Destination Context"), - 'clid' => _("Caller ID"), - 'channel' => _("Channel"), - 'dstchannel' => _("Destination Channel"), - 'lastapp' => _("Last Application"), - 'lastdata' => _("Last Application Data"), - 'start' => _("Call Start Time"), - 'answer' => _("Call Answer Time"), - 'end' => _("Call End Time"), - 'duration' => _("Call Duration"), - 'billsec' => _("Billing Time (seconds)"), - 'disposition' => _("Call Disposition"), - 'amaflags' => _("AMA Flags"), - 'userfield' => _("User Defined Field"), - 'uniqueid' => _("Call Unique ID")), + 'enum' => Operator::getColumns(), 'desc' => _("The columns to be displayed on the Call Detail Review screen") ); diff --git a/operator/lib/Operator.php b/operator/lib/Operator.php index fa00ad4d1..c707be908 100644 --- a/operator/lib/Operator.php +++ b/operator/lib/Operator.php @@ -37,7 +37,11 @@ class Operator { public static function getColumns() { - #static $columns = array( + static $columns = array(); + if (!empty($columns)) { + return $columns; + } + $columns = array( 'accountcode' => _("Account Code"), 'src' => _("Source"), @@ -48,15 +52,15 @@ class Operator { 'dstchannel' => _("Destination Channel"), 'lastapp' => _("Last Application"), 'lastdata' => _("Last Application Data"), - 'start' => _("Call Start Time"), - 'answer' => _("Call Answer Time"), - 'end' => _("Call End Time"), - 'duration' => _("Call Duration (seconds)"), - 'billsec' => _("Billable Call Duration (seconds)"), - 'disposition' => _("Call Disposition"), + 'start' => _("Start Time"), + 'answer' => _("Answer Time"), + 'end' => _("End Time"), + 'duration' => _("Duration (sec)"), + 'billsec' => _("Billable Duration (sec)"), + 'disposition' => _("Disposition"), 'amaflags' => _("AMA Flag"), 'userfield' => _("User Defined Field"), - 'uniqueid' => _("Call Unique ID")); + 'uniqueid' => _("Unique ID")); return $columns; }