Changeset 9961
- Timestamp:
- 06/26/10 11:17:47 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.8/amp_conf/htdocs/admin/page.modules.php
r9043 r9961 116 116 function process_module_actions(actions) { 117 117 freepbx_modal_show('moduleBox'); 118 urlStr = "config.php?type=tool&display=modules&extdisplay=process&quietmode=1&module_repo=<?php echo $module_repo ?>";118 urlStr = "config.php?type=<?php echo $type ?>&display=modules&extdisplay=process&quietmode=1&module_repo=<?php echo $module_repo ?>"; 119 119 for (var i in actions) { 120 120 urlStr += "&moduleaction["+i+"]="+actions[i]; … … 126 126 freepbx_modal_hide('moduleBox'); 127 127 if (goback) { 128 location.href = 'config.php?display=modules&type=tool&online=<?php echo ($_REQUEST['online']?1:0); ?>';128 location.href = 'config.php?display=modules&type=<?php echo $type ?>&online=<?php echo ($_REQUEST['online']?1:0); ?>'; 129 129 } 130 130 } … … 280 280 echo "\t<a href=\"#\" onclick=\"parent.close_module_actions(true);\" />"._("Return")."</a>"; 281 281 } else { 282 echo "\t<input type=\"button\" value=\""._("Return")."\" onclick=\"location.href = 'config.php?display=modules&type= tool&online=".($_REQUEST['online']?1:0)."';\" />";282 echo "\t<input type=\"button\" value=\""._("Return")."\" onclick=\"location.href = 'config.php?display=modules&type=$type&online=".($_REQUEST['online']?1:0)."';\" />"; 283 283 echo "</div>"; 284 284 } … … 447 447 echo "<p>"._("Please select at least one action to perform by clicking on the module, and selecting an action on the \"Action\" tab.")."</p>"; 448 448 } 449 echo "\t<input type=\"button\" value=\""._("Cancel")."\" onclick=\"location.href = 'config.php?display=modules&type= tool&online=".($_REQUEST['online']?1:0)."';\" />";449 echo "\t<input type=\"button\" value=\""._("Cancel")."\" onclick=\"location.href = 'config.php?display=modules&type=$type&online=".($_REQUEST['online']?1:0)."';\" />"; 450 450 echo "</form>"; 451 451 … … 456 456 displayRepoSelect(); 457 457 } 458 echo "| <a href='config.php?display=modules&type= tool'>"._("Manage local modules")."</a>\n";458 echo "| <a href='config.php?display=modules&type=$type'>"._("Manage local modules")."</a>\n"; 459 459 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 460 echo " | <a class='info check_updates' href='config.php?display=modules&type= tool&online=1&module_repo=$module_repo'>"._("Check for updates online")."<span>"._("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.")."</span></a>\n";460 echo " | <a class='info check_updates' href='config.php?display=modules&type=$type&online=1&module_repo=$module_repo'>"._("Check for updates online")."<span>"._("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.")."</span></a>\n"; 461 461 } 462 462 463 463 if (isset($_FILES['uploadmod']) && !empty($_FILES['uploadmod']['name'])) { 464 464 // display upload link, only if they did upload something 465 echo " | <a href='config.php?display=modules&type= tool&extdisplay=upload'>"._("Upload module")."</a><br />\n";465 echo " | <a href='config.php?display=modules&type=$type&extdisplay=upload'>"._("Upload module")."</a><br />\n"; 466 466 467 467 $res = module_handleupload($_FILES['uploadmod']); … … 472 472 '<ul><li>'.implode('</li><li>',$res).'</li></ul>'); 473 473 echo sprintf(_('You should fix the problem or select another file and %s.'), 474 "<a href='config.php?display=modules&type= tool'>"._("try again")."</a>");474 "<a href='config.php?display=modules&type=$type'>"._("try again")."</a>"); 475 475 echo "</p></div>\n"; 476 476 } else { 477 477 478 478 echo "<p>".sprintf(_("Module uploaded successfully. You need to enable the module using %s to make it available."), 479 "<a href='config.php?display=modules&type= tool'>"._("local module administration")."</a>")479 "<a href='config.php?display=modules&type=$type'>"._("local module administration")."</a>") 480 480 ."</p>\n"; 481 481 } … … 508 508 509 509 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 510 echo "<a href='config.php?display=modules&type= tool&online=0'>"._("Manage local modules")."</a>\n";510 echo "<a href='config.php?display=modules&type=$type&online=0'>"._("Manage local modules")."</a>\n"; 511 511 echo "<input type=\"checkbox\" id=\"show_upgradable_only\" onclick=\"showhide_upgrades();\" /><label for=\"show_upgradable_only\">"._("Show only upgradeable")."</label>"; 512 512 } … … 514 514 if (!EXTERNAL_PACKAGE_MANAGEMENT) { 515 515 displayRepoSelect(); 516 echo " | <a class='info check_updates' href='config.php?display=modules&type= tool&online=1&module_repo=$module_repo'>"._("Check for updates online")."<span>"._("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.")."</span></a>\n";517 } 518 echo " | <a href='config.php?display=modules&type= tool&extdisplay=upload'>"._("Upload module")."</a><br />\n";516 echo " | <a class='info check_updates' href='config.php?display=modules&type=$type&online=1&module_repo=$module_repo'>"._("Check for updates online")."<span>"._("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.")."</span></a>\n"; 517 } 518 echo " | <a href='config.php?display=modules&type=$type&extdisplay=upload'>"._("Upload module")."</a><br />\n"; 519 519 } 520 520 … … 545 545 546 546 $category = false; 547 $has_extended_modules = false; 547 548 $numdisplayed = 0; 548 549 $fd = $amp_conf['ASTETCDIR'].'/freepbx_module_admin.conf'; … … 603 604 604 605 echo "\t\t\t<span class=\"modulestatus\">"; 606 if (!$has_extended_modules && $category == 'Third Party Addon') { 607 $has_extended_modules = true; 608 } 605 609 switch ($modules[$name]['status']) { 606 610 case MODULE_STATUS_NOTINSTALLED: … … 828 832 829 833 echo "</form>"; 834 if ($has_extended_modules) { 835 ?> 836 <script language="javascript"> 837 <!-- Begin 838 839 $(document).ready(function(){ 840 $("#module_repo").val('extended'); 841 $('.check_updates').attr('href','config.php?display=modules&type=<?php echo $type ?>&online=1&module_repo=extended'); 842 }); 843 844 // End --> 845 </script> 846 <?php 847 } 830 848 break; 831 849 } … … 938 956 939 957 function displayRepoSelect() { 958 global $type; 940 959 ?> 941 960 <select name="module_repo" id="module_repo"> … … 948 967 $(document).ready(function(){ 949 968 $("#module_repo").change(function(){ 950 $('.check_updates').attr('href','config.php?display=modules&type=tool&online=1&module_repo='+this.value);969 $('.check_updates').attr('href','config.php?display=modules&type=<?php echo $type ?>&online=1&module_repo='+this.value); 951 970 if (this.value == "extended") { 952 971 alert("<?php echo _("You have selected to access the Extended Repository. This repository contains some Third Party and un-supported modules. Although these modules are believed to work with FreePBX, they are either developed by third parties in conjunction with optional PBX components, or they are not directly sponsored by the core FreePBX team and may not receive the same level of responsiveness to issues as the main code base does.") ?>");
