Changeset 11050
- Timestamp:
- 01/21/11 14:45:09 (2 years ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/admin/libraries/framework_view.functions.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/page.modules.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/views/bad_refferer.php (modified) (1 diff)
- freepbx/trunk/libfreepbx.install.php (modified) (8 diffs)
- freepbx/trunk/update_i18n.sh (modified) (5 diffs)
- modules/branches/2.9/core/functions.inc.php (modified) (3 diffs)
- modules/branches/2.9/core/page.ampusers.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/libraries/framework_view.functions.php
r10953 r11050 104 104 105 105 if ($amp_conf['ARI_ADMIN_PASSWORD'] == $amp_conf_defaults['ARI_ADMIN_PASSWORD'][1]) { 106 $nt->add_warning('ari', 'ARI_ADMIN_PASSWORD', _("Default ARI Admin password Used"), _("You are using the default ARI Admin password that is widely known, you should change to a new password. Do this in amportal.conf"));106 $nt->add_warning('ari', 'ARI_ADMIN_PASSWORD', _("Default ARI Admin password Used"), _("You are using the default ARI Admin password that is widely known, you should change to a new password. Do this in General Settings/Advanced Settings")); 107 107 } else { 108 108 $nt->delete('ari', 'ARI_ADMIN_PASSWORD'); freepbx/trunk/amp_conf/htdocs/admin/page.modules.php
r10950 r11050 980 980 $tooltip = _("Choose the repositories that you want to check for new modules. Any updates available for modules you have on your system will be detected even if the repository is not checked. If you are installing a new system, you may want to start with the Basic repository and upload all modules, then go back and review the others.").' '; 981 981 $tooltip .= _(" The modules in the Extended repository are less common and may receive lower levels of support. The Unsupported repository has modules that are not supported by the FreePBX team but may receive some level of support by the authors.").' '; 982 $tooltip .= _("The Commer ical reposiotry is reserved for modules that are available for purchase and commercially supported.").' ';982 $tooltip .= _("The Commercial repository is reserved for modules that are available for purchase and commercially supported.").' '; 983 983 $tooltip .= '<br /><br /><small><i>('._("Checking for updates will transmit your FreePBX and Asterisk version numbers along with a unique but random identifier. This is used to provide proper update information and track version usage to focus development and maintenance efforts. No private information is transmitted.").')</i></small>'; 984 984 ?> freepbx/trunk/amp_conf/htdocs/admin/views/bad_refferer.php
r9040 r11050 15 15 "<div style='margin-left:20px;margin-right:20px'>\n". 16 16 "<h2>"._("Potential Security Breach")."</h2>\n". 17 "<p>"._("You are attempting to modify settings from a URL that does not appear to have come from a FreePBX page link or button. This can occur if you manually typed in the URL below. This action has been blocked because the HTTP_REFERER does not match your current SERVER. If you require this access, you can set C HECKREFERER=false in amportal.confto disable this security check")."</p>\n".17 "<p>"._("You are attempting to modify settings from a URL that does not appear to have come from a FreePBX page link or button. This can occur if you manually typed in the URL below. This action has been blocked because the HTTP_REFERER does not match your current SERVER. If you require this access, you can set Check Server Referrer=false in General Settings/Advanced Settings to disable this security check")."</p>\n". 18 18 "<p>"._("The suspect URL is listed below. If this action is intended, you can click this link and your action will be processed. Do not proceed with this if you did not intended to execute this command as it may result in changes to your configuration.")."</p>\n". 19 19 "<p>"._("SUSPECT LINK:")." <b><a href='".$_SERVER['REQUEST_URI']."'>"."$rtype://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].$port."</a></b>"."</p>\n". freepbx/trunk/libfreepbx.install.php
r11041 r11050 46 46 outn("Checking for upgrades.."); 47 47 48 // read versions list from u gprades/48 // read versions list from upgrades/ 49 49 $versions = array(); 50 50 $dir = opendir(UPGRADE_DIR); … … 518 518 $set['options'] = ''; 519 519 $set['name'] = 'User Portal Admin Username'; 520 $set['description'] = 'This is the default admin name used to allow an administrator to login to ARI bypassing all security. Change this to whatever you want, dont forget to change the ARI_ADMIN_PASSWORD as well.Default = not set';520 $set['description'] = 'This is the default admin name used to allow an administrator to login to ARI bypassing all security. Change this to whatever you want, dont forget to change the User Portal Admin Password as well. Default = not set'; 521 521 $set['emptyok'] = 1; 522 522 $set['type'] = CONF_TYPE_TEXT; … … 527 527 $set['options'] = ''; 528 528 $set['name'] = 'User Portal Admin Password'; 529 $set['description'] = 'This is the default admin password to allow an administrator to login to ARI bypassing all security. Change this to a secure password. Default = not set';529 $set['description'] = 'This is the default admin password to allow an administrator to login to ARI bypassing all security. Change this to a secure password. Default = not set'; 530 530 $set['emptyok'] = 0; 531 531 $set['type'] = CONF_TYPE_TEXT; … … 637 637 $set['options'] = ''; 638 638 $set['name'] = 'Dynamically Generate Hints'; 639 $set['description'] = 'If true, Core will not statically generate hints, but instead make a call to the AMPBIN php script, and generate_hints.php through an Asterisk #exec call. This requires Asterisk.conf to be configured with <b>execincludes=yes<b> set in the [options] section.';639 $set['description'] = 'If true, Core will not statically generate hints, but instead make a call to the AMPBIN php script, and generate_hints.php through an Asterisk #exec call. This requires asterisk.conf to be configured with <b>execincludes=yes<b> set in the [options] section.'; 640 640 $set['emptyok'] = 0; 641 641 $set['type'] = CONF_TYPE_BOOL; … … 696 696 $set['options'] = '0,1,2,3,4,5,6,7,8,9,10'; 697 697 $set['name'] = 'Noop Traces in Dialplan'; 698 $set['description'] = 'Some modules will generate lots of Noop() commands proceeded by a [TRACE](trace_level) that can be used during development or while trying to trace call flows. These No op() commands serve no other purpose so if you do not want to see excessive Noop()s in your dialplan you can set this to 0. The higher the number the more detailed level of trace Noop()s will be generated';698 $set['description'] = 'Some modules will generate lots of Noop() commands proceeded by a [TRACE](trace_level) that can be used during development or while trying to trace call flows. These NoOp() commands serve no other purpose so if you do not want to see excessive NoOp()s in your dialplan you can set this to 0. The higher the number the more detailed level of trace NoOp()s will be generated'; 699 699 $set['emptyok'] = 0; 700 700 $set['type'] = CONF_TYPE_SELECT; … … 760 760 $set['options'] = ''; 761 761 $set['name'] = 'Block CNAM on External Trunks'; 762 $set['description'] = 'Some carriers will reject a call if a CallerID Name (CNAM) is presented. This occurs in several areas when configuring CID on the PBX using the format of "CNAM" <CNUM>. To remove the CNAM part of CID on all external trunks, set this value to true. This WILL NOT remove CNAM when a trunk is called from an Intra-Company route. This can be done on each individu cal trunk in addition to globaly if there are trunks where it is desirable to keep CNAM information, though most carriers ignore CNAM.';762 $set['description'] = 'Some carriers will reject a call if a CallerID Name (CNAM) is presented. This occurs in several areas when configuring CID on the PBX using the format of "CNAM" <CNUM>. To remove the CNAM part of CID on all external trunks, set this value to true. This WILL NOT remove CNAM when a trunk is called from an Intra-Company route. This can be done on each individual trunk in addition to globally if there are trunks where it is desirable to keep CNAM information, though most carriers ignore CNAM.'; 763 763 $set['emptyok'] = 0; 764 764 $set['type'] = CONF_TYPE_BOOL; … … 900 900 $set['value'] = true; 901 901 $set['options'] = ''; 902 $set['name'] = 'Check Server Refer er';902 $set['name'] = 'Check Server Referrer'; 903 903 $set['description'] = 'When set to the default value of true, all requests into FreePBX that might possibly add/edit/delete settings will be validated to assure the request is coming from the server. This will protect the system from CSRF (cross site request forgery) attacks. It will have the effect of preventing legitimately entering URLs that could modify settings which can be allowed by changing this field to false.'; 904 904 $set['emptyok'] = 0; … … 1047 1047 $set['options'] = ''; 1048 1048 $set['name'] = 'Debug File'; 1049 $set['description'] = 'Full path and name of FreePBX debug file. Used by the dbug() func iton by developers.';1049 $set['description'] = 'Full path and name of FreePBX debug file. Used by the dbug() function by developers.'; 1050 1050 $set['emptyok'] = 0; 1051 1051 $set['type'] = CONF_TYPE_TEXT; freepbx/trunk/update_i18n.sh
r10122 r11050 1 1 #! /bin/sh 2 # Copyright (c) 2008 Mikael Carlsson2 # Copyright (c) 2008, 2011 Mikael Carlsson 3 3 # This program is free software; you can redistribute it and/or 4 4 # modify it under the terms of the GNU General Public License … … 14 14 # The purpose of this script is to extract all text strings from all FreePBX code that can 15 15 # be translated and create template files under each modules/<module>/i18n directory. 16 # For this script to work you need to so svn co for for branch and for modules and 17 # install this in the same tree so that the script can do all extraction at once. 16 # For this script to work you need to so svn co for for branch and for modules and 17 # install this in the same tree so that the script can do all extraction at once. 18 18 # 19 19 … … 21 21 # go down to modules directory 22 22 cd amp_conf/htdocs/admin/modules 23 for modules in $(ls -d */); 23 for modules in $(ls -d */); 24 24 do 25 echo "Checking if module ${modules%%/} has an i18n directory" 26 # spit out the module.xml in a <modulename>.i18.php so that we can grab it with the find 27 # all modules from svn MUST be installed as module_admin reads from 28 # the installed modules NOT from the directory itself 29 if [ -d ${modules}i18n ]; then 30 echo "Found directory ${modules}i18n, creating temp file" 31 # This is needed for localization to actually pickup the enclosed text strings 32 # This could probably be done better, but I lack the time for doing that so here it is 33 echo -e "<?php \nif (false) {" > $modules${modules%%/}.i18n.php 34 /var/lib/asterisk/bin/module_admin i18n ${modules%%/} >> $modules${modules%%/}.i18n.php 35 # This is needed for localization to actually pickup the enclosed text strings 36 # This could probably be done better, but I lack the time for doing that so here it is 37 echo -e "}\n?>\n" >> $modules${modules%%/}.i18n.php 38 echo "Creating ${modules%%/}.pot file, extracting text strings" 39 # Save the file as a temp file 40 find ${modules%%/}/*.php | xargs xgettext --no-location -L PHP -o ${modules%%/}/i18n/${modules%%/}.tmp --keyword=_ - 41 # Now add the copyright and the license info to the.pot file 42 # Again, could be done better, but I lack the time and really need this out now 43 echo "# This file is part of FreePBX." > ${modules%%/}/i18n/${modules%%/}.pot 44 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 45 echo "# FreePBX is free software: you can redistribute it and/or modify" >> ${modules%%/}/i18n/${modules%%/}.pot 46 echo "# it under the terms of the GNU General Public License as published by" >> ${modules%%/}/i18n/${modules%%/}.pot 47 echo "# the Free Software Foundation, either version 2 of the License, or" >> ${modules%%/}/i18n/${modules%%/}.pot 48 echo "# (at your option) any later version." >> ${modules%%/}/i18n/${modules%%/}.pot 49 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 50 echo "# FreePBX is distributed in the hope that it will be useful," >> ${modules%%/}/i18n/${modules%%/}.pot 51 echo "# but WITHOUT ANY WARRANTY; without even the implied warranty of" >> ${modules%%/}/i18n/${modules%%/}.pot 52 echo "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" >> ${modules%%/}/i18n/${modules%%/}.pot 53 echo "# GNU General Public License for more details." >> ${modules%%/}/i18n/${modules%%/}.pot 54 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 55 echo "# You should have received a copy of the GNU General Public License" >> ${modules%%/}/i18n/${modules%%/}.pot 56 echo "# along with FreePBX. If not, see <http://www.gnu.org/licenses/>." >> ${modules%%/}/i18n/${modules%%/}.pot 57 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 58 echo "# FreePBX language template for ${modules%%/}" >> ${modules%%/}/i18n/${modules%%/}.pot 59 echo "# Copyright (C) 2008, 2009, 2010 Bandwith.com" >> ${modules%%/}/i18n/${modules%%/}.pot 60 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 61 # Remove the first six lines of the .tmp file and put it in the -pot file 62 /bin/sed '1,6d' ${modules%%/}/i18n/${modules%%/}.tmp >> ${modules%%/}/i18n/${modules%%/}.pot 63 echo "Removing temp files" 64 rm $modules${modules%%/}.i18n.php 65 rm ${modules%%/}/i18n/${modules%%/}.tmp 66 fi 25 echo "Checking if module ${modules%%/} has an i18n directory" 26 # spit out the module.xml in a <modulename>.i18.php so that we can grab it with the find 27 # all modules from svn MUST be installed as module_admin reads from 28 # the installed modules NOT from the directory itself 29 if [ -d ${modules}i18n ]; then 30 echo "Found directory ${modules}i18n, creating temp file" 31 # This is needed for localization to actually pickup the enclosed text strings 32 # This could probably be done better, but I lack the time for doing that so here it is 33 echo -e "<?php \nif (false) {" > $modules${modules%%/}.i18n.php 34 /var/lib/asterisk/bin/module_admin i18n ${modules%%/} >> $modules${modules%%/}.i18n.php 35 # This is needed for localization to actually pickup the enclosed text strings 36 # This could probably be done better, but I lack the time for doing that so here it is 37 echo -e "}\n?>\n" >> $modules${modules%%/}.i18n.php 38 echo "Creating ${modules%%/}.pot file, extracting text strings" 39 # Save the file as a temp file 40 find ${modules%%/}/*.php | xargs xgettext --no-location -L PHP -o ${modules%%/}/i18n/${modules%%/}.tmp --keyword=_ - 41 # Now add the copyright and the license info to the.pot file 42 # Again, could be done better, but I lack the time and really need this out now 43 echo "# This file is part of FreePBX." > ${modules%%/}/i18n/${modules%%/}.pot 44 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 45 echo "# FreePBX is free software: you can redistribute it and/or modify" >> ${modules%%/}/i18n/${modules%%/}.pot 46 echo "# it under the terms of the GNU General Public License as published by" >> ${modules%%/}/i18n/${modules%%/}.pot 47 echo "# the Free Software Foundation, either version 2 of the License, or" >> ${modules%%/}/i18n/${modules%%/}.pot 48 echo "# (at your option) any later version." >> ${modules%%/}/i18n/${modules%%/}.pot 49 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 50 echo "# FreePBX is distributed in the hope that it will be useful," >> ${modules%%/}/i18n/${modules%%/}.pot 51 echo "# but WITHOUT ANY WARRANTY; without even the implied warranty of" >> ${modules%%/}/i18n/${modules%%/}.pot 52 echo "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" >> ${modules%%/}/i18n/${modules%%/}.pot 53 echo "# GNU General Public License for more details." >> ${modules%%/}/i18n/${modules%%/}.pot 54 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 55 echo "# You should have received a copy of the GNU General Public License" >> ${modules%%/}/i18n/${modules%%/}.pot 56 echo "# along with FreePBX. If not, see <http://www.gnu.org/licenses/>." >> ${modules%%/}/i18n/${modules%%/}.pot 57 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 58 echo "# FreePBX language template for ${modules%%/}" >> ${modules%%/}/i18n/${modules%%/}.pot 59 echo "# Copyright (C) 2008, 2009, 2010, 2011 Bandwith.com" >> ${modules%%/}/i18n/${modules%%/}.pot 60 echo "#" >> ${modules%%/}/i18n/${modules%%/}.pot 61 # Remove the first six lines of the .tmp file and put it in the -pot file 62 /bin/sed '1,6d' ${modules%%/}/i18n/${modules%%/}.tmp >> ${modules%%/}/i18n/${modules%%/}.pot 63 # Now set Project to FreePBX and utf-8 as charset 64 /bin/sed -i 's/PACKAGE VERSION/FreePBX/g' ${modules%%/}/i18n/${modules%%/}.pot 65 /bin/sed -i 's/charset=CHARSET/charset=utf-8/g' ${modules%%/}/i18n/${modules%%/}.pot 66 echo "Removing temp files" 67 rm $modules${modules%%/}.i18n.php 68 rm ${modules%%/}/i18n/${modules%%/}.tmp 69 fi 67 70 done 68 71 # Go back two directory levels 69 72 cd ../.. 70 73 echo "Creating new POT template files for core" 71 # spit out the module.xml for core to amp.i18.php so that we can grab it with the find74 # spit out the module.xml for core and framework to amp.i18.php so that we can grab it with the find 72 75 echo -e "<?php \nif (false) {" >> admin/modules/core/core.i18n.php 73 76 /var/lib/asterisk/bin/module_admin i18n core >> admin/modules/core/core.i18n.php 77 /var/lib/asterisk/bin/module_admin i18n framework >> admin/modules/core/core.i18n.php 74 78 echo -e "}\n?>\n" >> admin/modules/core/core.i18n.php 75 79 find admin/*.php admin/cdr/*.php admin/views/*.php admin/common/*.php admin/modules/core/*.php -maxdepth 0 | xargs xgettext --no-location -L PHP -o admin/i18n/amp.tmp --keyword=_ - … … 90 94 echo "#" >> admin/i18n/amp.pot 91 95 echo "# FreePBX language template for amp" >> admin/i18n/amp.pot 92 echo "# Copyright (C) 2008, 2009, 2010 Bandwith.com" >> admin/i18n/amp.pot96 echo "# Copyright (C) 2008, 2009, 2010, 2011 Bandwith.com" >> admin/i18n/amp.pot 93 97 echo "#" >> admin/i18n/amp.pot 94 98 # remove the <modulename>.i18.php … … 96 100 # Remove the first six lines of the .tmp file and put it in the -pot file 97 101 /bin/sed '1,6d' admin/i18n/amp.tmp >> admin/i18n/amp.pot 102 # Now set Project to FreePBX and utf-8 as charset 103 /bin/sed -i 's/PACKAGE VERSION/FreePBX/g' admin/i18n/amp.pot 104 /bin/sed -i 's/charset=CHARSET/charset=utf-8/g' admin/i18n/amp.pot 98 105 echo "Removing temp files" 99 106 rm admin/i18n/amp.tmp 100 107 echo "Done, now don't forget to commit your work!" 108 modules/branches/2.9/core/functions.inc.php
r11041 r11050 3410 3410 function core_advancedsettings_write_amportal(){ 3411 3411 global $amp_conf; 3412 $txt = _("#;--------------------------------------------------------------------------------;\n#; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;\n#; this file must be done via the web gui. There are alternative files to make ;\n#; custom modifications, details at: http://freepbx.org/configuration_files ;\n#;--------------------------------------------------------------------------------;\n\n\n"); 3413 $txt .= "#;--------------------------------------------------------------------------------;\n#;" . _(' All settings can be set from the Advanced Settings page accessible from the General Settings page in FreePBX')."\n#;--------------------------------------------------------------------------------;\n\n\n\n\n\n\n\n\n\n\n\n"; 3412 $txt = "#;--------------------------------------------------------------------------------;\n#;" 3413 $txt .= _("Do NOT edit this file as it is auto-generated by FreePBX. All modifications to"); 3414 $txt .= " ;\n#; "; 3415 $txt .= _("this file must be done via the web gui. There are alternative files to make"); 3416 $txt .= " ;\n#; "; 3417 $txt .= _("custom modifications, details at:"); 3418 $txt .= "http://freepbx.org/configuration_files ;\n#;--------------------------------------------------------------------------------;\n\n\n"; 3419 $txt .= "#;--------------------------------------------------------------------------------;\n#; "; 3420 $txt .= _("All settings can be set from the Advanced Settings page accessible from the General Settings page in FreePBX"); 3421 $txt .= "\n#;--------------------------------------------------------------------------------;\n\n\n\n\n\n\n\n\n\n\n\n"; 3414 3422 foreach ($amp_conf as $key => $val) { 3415 3423 $txt .= trim($key) . '=' . trim($val) . "\n"; … … 6097 6105 6098 6106 $concurrency_limit = isset($concurrency_limit) ? $concurrency_limit : $amp_conf['CONCURRENCYLIMITDEFAULT']; 6099 $currentcomponent->addguielem($section, new gui_selectbox('concurrency_limit', $currentcomponent->getoptlist('concurrency_limit'), $concurrency_limit, _("Outbound Co uncurrency Limit"), _("Maximum number of outbound simultaneous calls that an extension can make. This is also very useful as a Security Protection against a system that has been compromised. It will limit the number of simultaneous calls that can be made on the compromised extension."), false));6107 $currentcomponent->addguielem($section, new gui_selectbox('concurrency_limit', $currentcomponent->getoptlist('concurrency_limit'), $concurrency_limit, _("Outbound Concurrency Limit"), _("Maximum number of outbound simultaneous calls that an extension can make. This is also very useful as a Security Protection against a system that has been compromised. It will limit the number of simultaneous calls that can be made on the compromised extension."), false)); 6100 6108 6101 6109 $currentcomponent->addguielem($section, new gui_selectbox('callwaiting', $currentcomponent->getoptlist('callwaiting'), $callwaiting, _("Call Waiting"), _("Set the initial/current Call Waiting state for this user's extension"), false)); … … 6169 6177 $currentcomponent->addguielem($section, new gui_textbox('busy_cid', $busy_cid, ' '._("CID Prefix"), _("Optional CID Prefix to add before sending to this busy destination.")),5,9); 6170 6178 6171 $helptext = _('Optional destination the call is routed to when the phone is offline, such as a softphone curren lty off or a phone unplugged.');6179 $helptext = _('Optional destination the call is routed to when the phone is offline, such as a softphone currently off or a phone unplugged.'); 6172 6180 $nodest_msg = _('Unavail Voicemail if Enabled'); 6173 6181 $currentcomponent->addguielem($section, new gui_drawselects('chanunavail_dest', '2', $chanunavail_dest, _('Not Reachable'), $helptext, $canbeempty = true, '', $nodest_msg),5,9); modules/branches/2.9/core/page.ampusers.php
r9786 r11050 180 180 <tr> 181 181 <td colspan="2"> 182 <?php echo '<b>'._("NOTE:").'</b>'._("A UTHTYPE is not set to 'database' in /etc/amportal.conf - note that this module is not currently providing access control, and changing passwords here or adding users will have no effect unless AUTHTYPEis set to 'database'.") ?><br /><br />182 <?php echo '<b>'._("NOTE:").'</b>'._("Authorization Type is not set to 'database' in General Settings/Advanced Setting - note that this module is not currently providing access control, and changing passwords here or adding users will have no effect unless Authorization Type is set to 'database'.") ?><br /><br /> 183 183 </td> 184 184 </tr>
