Changeset 7779

Show
Ignore:
Timestamp:
05/30/09 08:07:14 (4 years ago)
Author:
mickecarlsson
Message:

Reverts 7778

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/bulkextensions/functions.inc.php

    r7778 r7779  
    11<?php 
     2//This file is part of FreePBX. 
     3// 
     4//    FreePBX is free software: you can redistribute it and/or modify 
     5//    it under the terms of the GNU General Public License as published by 
     6//    the Free Software Foundation, either version 2 of the License, or 
     7//    (at your option) any later version. 
     8// 
     9//    FreePBX is distributed in the hope that it will be useful, 
     10//    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     11//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     12//    GNU General Public License for more details. 
     13// 
     14//    You should have received a copy of the GNU General Public License 
     15//    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>. 
     16// 
     17//    Copyright 2008 sasargen 
     18//    Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com 
     19// 
     20 
    221/* functions.inc.php - functions for BulkExtensions module. */ 
    322include_once("modules/voicemail/functions.inc.php");    // for using voicemail module functions to retrieve voicemail settings 
     
    286305 
    287306function generate_table_rows() { 
    288   $fh = fopen("modules/bulkextensions/table.csv", "r"); 
    289   if ($fh == NULL) { 
    290     return NULL; 
     307  $langcookie =  $_COOKIE['lang']; 
     308  if (file_exists("modules/bulkextensions/i18n/$langcookie/LC_MESSAGES/table.csv")) {   // check if translated file exists 
     309    $fh = fopen("modules/bulkextensions/i18n/$langcookie/LC_MESSAGES/table.csv", "r");  // open it 
     310        } else {                    // nope, no translated file was found, open the default one 
     311          $fh = fopen("modules/bulkextensions/table.csv", "r"); 
     312        } 
     313        if ($fh == NULL) { 
     314                return NULL; 
    291315  } 
    292316  $k = 0; 
  • contributed_modules/modules/bulkextensions/module.xml

    r7778 r7779  
    33  <name>Bulk Extensions</name> 
    44  <description>Bulk Extensions uses CSV files to import and export extensions.</description> 
    5   <version>2.5.0.5</version> 
     5  <version>2.5.0.4</version> 
    66  <type>tool</type> 
    77  <category>Third Party Addon</category> 
     
    1212    <version>ge2.5</version> 
    1313  </depends> 
    14   <location>release/contributed_modules/bulkextensions-2.5.0.3.tgz</location> 
     14  <location>contributed_modules/release/bulkextensions-2.5.0.4.tgz</location> 
    1515  <info></info> 
    1616  <changelog> 
    17     *2.5.0.5* Added Permit and Deny fields  
    1817    *2.5.0.4* No changes, re-publishing to get md5sum and location info updated 
    1918    *2.5.0.3* Fixed bug - every notification email after the first one had increasing amounts of unwanted white space at the beginning of the message 
     
    2726    *0.1* First release 
    2827  </changelog> 
    29   <md5sum>0be37625af7d972b7b726551df500549</md5sum> 
     28  <md5sum>b48bbbe84441349953a097f1844b9ca7</md5sum> 
    3029</module> 
    3130 
  • contributed_modules/modules/bulkextensions/page.bulkextensions.php

    r7778 r7779  
    11<?php 
     2//This file is part of FreePBX. 
     3// 
     4//    FreePBX is free software: you can redistribute it and/or modify 
     5//    it under the terms of the GNU General Public License as published by 
     6//    the Free Software Foundation, either version 2 of the License, or 
     7//    (at your option) any later version. 
     8// 
     9//    FreePBX is distributed in the hope that it will be useful, 
     10//    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     11//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     12//    GNU General Public License for more details. 
     13// 
     14//    You should have received a copy of the GNU General Public License 
     15//    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>. 
     16// 
     17//    Copyright 2006 Seth Sargent, Steven Ward 
     18//    Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com 
     19// 
    220// This is a long running process, so extend time limit for execution. 
    321// Typical PHP default is 30 seconds, but this only allows 100 to 200 
     
    325343          $vars["devinfo_mailbox"] = trim($aInfo[$aFields["devinfo_mailbox"][1]]); 
    326344        } 
    327          
     345 
    328346          if ($aFields["devinfo_deny"][0]) { 
    329347          $vars["devinfo_deny"] = trim($aInfo[$aFields["devinfo_deny"][1]]); 
     
    808826  } 
    809827 
     828 
     829echo "<h1>"._("Bulk Extensions")."</h1>"; 
     830echo "<h2>"._("Manage Extensions in bulk using CSV files.")."</h2>"; 
     831echo "<p>"; 
     832 
     833echo sprintf(_("Start by downloading the %s Template CSV file %s (right-click > save as) or clicking the Export Extensions button."), "<a href=\"modules/bulkextensions/template.csv\">", "</a>");  
     834 
     835echo "<p>"; 
     836 
     837echo _("Modify the CSV file to add, edit, or delete Extensions as desired. Then load the CSV file. After the CSV file is processed, the action taken for each row will be displayed."); 
     838echo "<p>"; 
     839echo "<b>"._("Bulk extension changes can take a long time to complete. It can take 30-60 seconds to add 100 extensions on a small system. However, on a system with 2000 extensions it can take about 5 minutes to add 100 new extensions.")."</b>"; 
    810840?> 
    811 <h1>Bulk Extensions</h1> 
    812  
    813 <h2>Manage Extensions in bulk using CSV files.</h2> 
    814  
    815 <p> 
    816 Start by downloading the 
    817 <a href="modules/bulkextensions/template.csv">Template CSV file</a> 
    818 (right-click > save as) or clicking the Export Extensions button. 
    819 </p> 
    820 <p> 
    821 Modify the CSV file to add, edit, or delete Extensions as desired. Then load 
    822 the CSV file. After the CSV file is processed, the action taken for each row 
    823 will be displayed. 
    824 </p> 
    825 <p> 
    826 <b>Bulk extension changes can take a long time to complete. It can take 30-60 
    827 seconds to add 100 extensions on a small system. However, on a system with 2000 
    828 extensions it can take about 5 minutes to add 100 new extensions.</b> 
    829 </p> 
    830  
    831841<form action="<?php $_SERVER["PHP_SELF"] ?>" name="uploadcsv" method="post" enctype="multipart/form-data"> 
    832842<input id="csv_type" name="csv_type" type="hidden" value="none" /> 
    833 <input type="submit" onclick="document.getElementById('csv_type').value='output';" value="Export Extensions" /> 
    834 &nbsp;&nbsp;CSV File to Load: <input name="csvFile" type="file" /> 
    835 <input type="submit" onclick="document.getElementById('csv_type').value='input';"  value="Load File" /> 
     843<input type="submit" onclick="document.getElementById('csv_type').value='output';" value="<?php echo _("Export Extensions")?>" /> 
     844&nbsp;&nbsp;<?php echo _("CSV File to Load")?>: <input name="csvFile" type="file" /> 
     845<input type="submit" onclick="document.getElementById('csv_type').value='input';"  value="<?php echo _("Load File")?>" /> 
    836846<hr /> 
    837 <h3>Email Notification for New Accounts</h3> 
    838 <p> 
    839 By default, a notification email will be sent to the voicemail email address 
    840 set for each account added. The settings below can be used to control the 
    841 content and destination of the notification emails. 
     847 
     848<?php 
     849echo "<h3>"._("Email Notification for New Accounts")."</h3>"; 
     850echo "<p>"; 
     851echo _("By default, a notification email will be sent to the voicemail email address set for each account added.")."<br>"; 
     852echo _(" The settings below can be used to control the content and destination of the notification emails."); 
     853?> 
    842854<table> 
    843855  <tr> 
    844856    <td> 
    845857      <a href="#" class="info"> 
    846       Default Address: 
    847       <span> 
    848       If a Default Address is specified, notification emails 
    849       for new accounts without a voicemail email address will 
    850       be sent to the Default Address. 
     858      <?php echo _("Default Address:")?> 
     859      <span><?php echo _("If a Default Address is specified, notification emails for new accounts without a voicemail email address will be sent to the Default Address.")?> 
    851860      </span> 
    852861      </a> 
     
    859868    <td> 
    860869      <a href="#" class="info"> 
    861       Override Address: 
    862       <span> 
    863       If an Override Address is specified, all notification 
    864       emails will be sent to the Override Address only. Type 
    865       "noemail" (without the quotes) as the Override Address 
    866       to stop notification emails from being sent. 
     870      <?php echo _("Override Address:")?> 
     871      <span><?php echo _("If an Override Address is specified, all notification emails will be sent to the Override Address only. Type \"noemail\" (without the quotes) as the Override Address to stop notification emails from being sent.")?> 
    867872      </span> 
    868873      </a> 
     
    875880    <td> 
    876881      <a href="#" class="info"> 
    877       Email From: 
     882      <?php echo _("Email From:")?> 
    878883      <span> 
    879       The Email From header may be specified. If left blank, 
    880       the system default will be used. 
     884      <?php echo _("The Email From header may be specified. If left blank, the system default will be used.")?> 
    881885      </span> 
    882886      </a> 
     
    889893    <td> 
    890894      <a href="#" class="info"> 
    891       Email Reply-To: 
     895      <?php echo _("Email Reply-To:")?> 
    892896      <span> 
    893       The Email Reply-To header may be specified. If left blank, 
    894       the system default will be used. 
     897      <?php echo _("The Email Reply-To header may be specified. If left blank, the system default will be used.")?> 
    895898      </span> 
    896899      </a> 
     
    903906    <td> 
    904907      <a href="#" class="info"> 
    905       Email Subject: 
     908      <?php echo _("Email Subject:")?> 
    906909      <span> 
    907       The Email Subject may be specified. If left blank, the 
    908       default subject, "Voicemail Account Activated", will be 
    909       used. 
     910      <?php echo _("The Email Subject may be specified. If left blank, the default subject, \"Voicemail Account Activated\", will be used.")?> 
    910911      </span> 
    911912      </a> 
     
    918919    <td> 
    919920      <a href="#" class="info"> 
    920       Email Opening: 
     921      <?php echo _("Email Opening:")?> 
    921922      <span> 
    922       The Email Opening may be specified. If left blank, the 
    923       default opening, "Login information for your voicemail 
    924       account is as follows:", will be used. The account name, 
    925       extension, and voicemail password will automatically be 
    926       inserted after the opening. 
     923      <?php echo _("The Email Opening may be specified. If left blank, the default opening, \"Login information for your voicemail account is as follows:\", will be used.")?> 
     924      <?php echo _(" The account name, extension, and voicemail password will automatically be inserted after the opening.")?>  
    927925      </span> 
    928926      </a> 
     
    935933    <td> 
    936934      <a href="#" class="info"> 
    937       Email Closing: 
     935      <?php echo _("Email Closing:")?> 
    938936      <span> 
    939       The Email Closing may be specified. If any text is 
    940       entered, it will be inserted at the end of the email. 
     937      <?php echo _("The Email Closing may be specified. If any text is entered, it will be inserted at the end of the email.")?> 
    941938      </span> 
    942939      </a> 
     
    949946</form> 
    950947<hr /> 
    951 <h3>Bulk Extensions CSV File Columns</h3> 
    952 <p> 
    953 The table below explains each column in the CSV file. You can change the column 
    954 order of the CSV file as you like, however, the column names must be preserved. 
    955 </p> 
    956 <?php 
     948<?php  
     949echo "<h3>"._("Bulk Extensions CSV File Columns")."</h3><p>"; 
     950echo _("The table below explains each column in the CSV file. You can change the column order of the CSV file as you like, however, the column names must be preserved.")."<p>"; 
    957951  print $table_output; 
    958952} 
  • contributed_modules/modules/bulkextensions/table.csv

    r7778 r7779  
    88"callwaiting","enabled","enabled, disabled","Call Waiting","Set the initial/current Call Waiting state for this user's extension." 
    99"call_screen","0","0, nomemory, memory","Call Screening","Call Screening requires external callers to say their name, which will be played back to the user and allow the user to accept or reject the call.  Screening with memory only verifies a caller for their caller-id once. Screening without memory always requires a caller to say their name. Either mode will always announce the caller based on the last introduction saved with that callerid. If any user on the system uses the memory option, when that user is called, the caller will be required to re-introduce themselves and all users on the system will have that new introduction associated with the caller's CallerId.Set the initial/current Call Waiting state for this user's extension." 
    10 "password",,,,,"For logging in and out of devices in deviceanduser mode, not available on Extensions page." 
     10"password",,,,"For logging in and out of devices in deviceanduser mode, not available on Extensions page." 
    1111"emergency_cid",,,"Emergency CID","This caller id will always be set when dialing out an Outbound Route flagged as Emergency. The Emergency CID overrides all other caller id settings." 
    1212"tech",,"sip, iax2, zap, custom",,"Device channel type."