Changeset 7778

Show
Ignore:
Timestamp:
05/30/09 06:48:40 (4 years ago)
Author:
wiseoldowl
Message:

fixes #3584 (thanks C4colo)

Files:

Legend:

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

    r7579 r7778  
    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  
    212/* functions.inc.php - functions for BulkExtensions module. */ 
    223include_once("modules/voicemail/functions.inc.php");    // for using voicemail module functions to retrieve voicemail settings 
     
    305286 
    306287function generate_table_rows() { 
    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; 
     288  $fh = fopen("modules/bulkextensions/table.csv", "r"); 
     289  if ($fh == NULL) { 
     290    return NULL; 
    315291  } 
    316292  $k = 0; 
  • contributed_modules/modules/bulkextensions/module.xml

    r7497 r7778  
    33  <name>Bulk Extensions</name> 
    44  <description>Bulk Extensions uses CSV files to import and export extensions.</description> 
    5   <version>2.5.0.4</version> 
     5  <version>2.5.0.5</version> 
    66  <type>tool</type> 
    77  <category>Third Party Addon</category> 
     
    1212    <version>ge2.5</version> 
    1313  </depends> 
    14   <location>contributed_modules/release/bulkextensions-2.5.0.4.tgz</location> 
     14  <location>release/contributed_modules/bulkextensions-2.5.0.3.tgz</location> 
    1515  <info></info> 
    1616  <changelog> 
     17    *2.5.0.5* Added Permit and Deny fields  
    1718    *2.5.0.4* No changes, re-publishing to get md5sum and location info updated 
    1819    *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 
     
    2627    *0.1* First release 
    2728  </changelog> 
    28   <md5sum>b48bbbe84441349953a097f1844b9ca7</md5sum> 
     29  <md5sum>0be37625af7d972b7b726551df500549</md5sum> 
    2930</module> 
    3031 
  • contributed_modules/modules/bulkextensions/page.bulkextensions.php

    r7579 r7778  
    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 // 
    202// This is a long running process, so extend time limit for execution. 
    213// Typical PHP default is 30 seconds, but this only allows 100 to 200 
     
    343325          $vars["devinfo_mailbox"] = trim($aInfo[$aFields["devinfo_mailbox"][1]]); 
    344326        } 
    345  
     327         
    346328          if ($aFields["devinfo_deny"][0]) { 
    347329          $vars["devinfo_deny"] = trim($aInfo[$aFields["devinfo_deny"][1]]); 
     
    826808  } 
    827809 
    828  
    829 echo "<h1>"._("Bulk Extensions")."</h1>"; 
    830 echo "<h2>"._("Manage Extensions in bulk using CSV files.")."</h2>"; 
    831 echo "<p>"; 
    832  
    833 echo 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  
    835 echo "<p>"; 
    836  
    837 echo _("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."); 
    838 echo "<p>"; 
    839 echo "<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>"; 
    840810?> 
     811<h1>Bulk Extensions</h1> 
     812 
     813<h2>Manage Extensions in bulk using CSV files.</h2> 
     814 
     815<p> 
     816Start 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> 
     821Modify the CSV file to add, edit, or delete Extensions as desired. Then load 
     822the CSV file. After the CSV file is processed, the action taken for each row 
     823will be displayed. 
     824</p> 
     825<p> 
     826<b>Bulk extension changes can take a long time to complete. It can take 30-60 
     827seconds to add 100 extensions on a small system. However, on a system with 2000 
     828extensions it can take about 5 minutes to add 100 new extensions.</b> 
     829</p> 
     830 
    841831<form action="<?php $_SERVER["PHP_SELF"] ?>" name="uploadcsv" method="post" enctype="multipart/form-data"> 
    842832<input id="csv_type" name="csv_type" type="hidden" value="none" /> 
    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")?>" /> 
     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" /> 
    846836<hr /> 
    847  
    848 <?php 
    849 echo "<h3>"._("Email Notification for New Accounts")."</h3>"; 
    850 echo "<p>"; 
    851 echo _("By default, a notification email will be sent to the voicemail email address set for each account added.")."<br>"; 
    852 echo _(" The settings below can be used to control the content and destination of the notification emails."); 
    853 ?> 
     837<h3>Email Notification for New Accounts</h3> 
     838<p> 
     839By default, a notification email will be sent to the voicemail email address 
     840set for each account added. The settings below can be used to control the 
     841content and destination of the notification emails. 
    854842<table> 
    855843  <tr> 
    856844    <td> 
    857845      <a href="#" class="info"> 
    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.")?> 
     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. 
    860851      </span> 
    861852      </a> 
     
    868859    <td> 
    869860      <a href="#" class="info"> 
    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.")?> 
     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. 
    872867      </span> 
    873868      </a> 
     
    880875    <td> 
    881876      <a href="#" class="info"> 
    882       <?php echo _("Email From:")?> 
     877      Email From: 
    883878      <span> 
    884       <?php echo _("The Email From header may be specified. If left blank, the system default will be used.")?> 
     879      The Email From header may be specified. If left blank, 
     880      the system default will be used. 
    885881      </span> 
    886882      </a> 
     
    893889    <td> 
    894890      <a href="#" class="info"> 
    895       <?php echo _("Email Reply-To:")?> 
     891      Email Reply-To: 
    896892      <span> 
    897       <?php echo _("The Email Reply-To header may be specified. If left blank, the system default will be used.")?> 
     893      The Email Reply-To header may be specified. If left blank, 
     894      the system default will be used. 
    898895      </span> 
    899896      </a> 
     
    906903    <td> 
    907904      <a href="#" class="info"> 
    908       <?php echo _("Email Subject:")?> 
     905      Email Subject: 
    909906      <span> 
    910       <?php echo _("The Email Subject may be specified. If left blank, the default subject, \"Voicemail Account Activated\", will be used.")?> 
     907      The Email Subject may be specified. If left blank, the 
     908      default subject, "Voicemail Account Activated", will be 
     909      used. 
    911910      </span> 
    912911      </a> 
     
    919918    <td> 
    920919      <a href="#" class="info"> 
    921       <?php echo _("Email Opening:")?> 
     920      Email Opening: 
    922921      <span> 
    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.")?>  
     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. 
    925927      </span> 
    926928      </a> 
     
    933935    <td> 
    934936      <a href="#" class="info"> 
    935       <?php echo _("Email Closing:")?> 
     937      Email Closing: 
    936938      <span> 
    937       <?php echo _("The Email Closing may be specified. If any text is entered, it will be inserted at the end of the email.")?> 
     939      The Email Closing may be specified. If any text is 
     940      entered, it will be inserted at the end of the email. 
    938941      </span> 
    939942      </a> 
     
    946949</form> 
    947950<hr /> 
    948 <?php  
    949 echo "<h3>"._("Bulk Extensions CSV File Columns")."</h3><p>"; 
    950 echo _("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>"; 
     951<h3>Bulk Extensions CSV File Columns</h3> 
     952<p> 
     953The table below explains each column in the CSV file. You can change the column 
     954order of the CSV file as you like, however, the column names must be preserved. 
     955</p> 
     956<?php 
    951957  print $table_output; 
    952958} 
  • contributed_modules/modules/bulkextensions/table.csv

    r7542 r7778  
    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."