Example #1
0
 array_unshift($repo_list, 'standard');
 if ($online) {
     if (!empty($remote_repo_list)) {
         $modulef->set_remote_repos($remote_repo_list);
     }
     $active_repos = $modulef->get_active_repos();
     // Check for announcements such as security advisories, required updates, etc.
     //
     $displayvars['announcements'] = $modulef->get_annoucements();
     if (!EXTERNAL_PACKAGE_MANAGEMENT) {
         $displayvars['repo_select'] = displayRepoSelect(array(), false, array_unique($repo_list));
     }
 } else {
     $repo_list = array_merge($repo_list, $modulef->get_remote_repos($online));
     if (!EXTERNAL_PACKAGE_MANAGEMENT) {
         $displayvars['repo_select'] = displayRepoSelect(array('upload'), true, array_unique($repo_list));
     }
 }
 $category = false;
 $numdisplayed = 0;
 if ($amp_conf['USE_FREEPBX_MENU_CONF']) {
     $fd = $amp_conf['ASTETCDIR'] . '/freepbx_menu.conf';
 } else {
     $fd = $amp_conf['ASTETCDIR'] . '/freepbx_module_admin.conf';
 }
 $module_filter = array();
 $module_filter_new = array();
 if (file_exists($fd)) {
     $module_filter = @parse_ini_file($fd, true);
     if (count($module_filter) == 1 && !empty($module_filter['general'])) {
         $module_filter = $module_filter['general'];
Example #2
0
 default:
     uasort($modules, 'category_sort_callback');
     if ($online) {
         // Check for annoucements such as security advisories, required updates, etc.
         //
         $announcements = module_get_annoucements();
         if (isset($announcements) && !empty($announcements)) {
             echo "<div class='announcements'>{$announcements}</div>";
         }
         if (!EXTERNAL_PACKAGE_MANAGEMENT) {
             echo "<a href='config.php?display=modules&amp;type={$type}&amp;online=0'>" . _("Manage local modules") . "</a>\n";
             echo "<input type=\"checkbox\" id=\"show_upgradable_only\" onclick=\"showhide_upgrades();\" /><label for=\"show_upgradable_only\">" . _("Show only upgradeable") . "</label>";
         }
     } else {
         if (!EXTERNAL_PACKAGE_MANAGEMENT) {
             displayRepoSelect();
             echo " | <a class='info check_updates' href='config.php?display=modules&amp;type={$type}&amp;online=1&amp;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";
         }
         echo " | <a href='config.php?display=modules&type={$type}&extdisplay=upload'>" . _("Upload module") . "</a><br />\n";
     }
     echo "<form name=\"modulesGUI\" action=\"config.php\" method=\"post\">";
     echo "<input type=\"hidden\" name=\"display\" value=\"" . $display . "\" />";
     echo "<input type=\"hidden\" name=\"type\" value=\"" . $type . "\" />";
     echo "<input type=\"hidden\" name=\"online\" value=\"" . $online . "\" />";
     echo "<input type=\"hidden\" name=\"extdisplay\" value=\"confirm\" />";
     echo "<input type=\"hidden\" name=\"module_repo\" value=\"" . $module_repo . "\" />";
     echo "<div class=\"modulebuttons\">";
     if ($online) {
         echo "\t<a href=\"javascript:void(null);\" onclick=\"check_download_all();\">" . _("Download all") . "</a>";
         echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\">" . _("Upgrade all") . "</a>";
     }
Example #3
0
 default:
     uasort($modules, 'category_sort_callback');
     if ($online) {
         // Check for announcements such as security advisories, required updates, etc.
         //
         $announcements = module_get_annoucements();
         if (isset($announcements) && !empty($announcements)) {
             echo "<div class='announcements'>{$announcements}</div>";
         }
         if (!EXTERNAL_PACKAGE_MANAGEMENT) {
             echo "<a href='config.php?display=modules&amp;type={$type}&amp;online=0'>" . _("Manage local modules") . "</a>\n";
             echo "<input type=\"checkbox\" id=\"show_upgradable_only\" onclick=\"showhide_upgrades();\" /><label for=\"show_upgradable_only\">" . _("Show only upgradeable") . "</label>";
         }
     } else {
         if (!EXTERNAL_PACKAGE_MANAGEMENT) {
             displayRepoSelect(array('upload'));
         } else {
             echo " | <a href='config.php?display=modules&type={$type}&extdisplay=upload'>" . _("Upload module") . "</a><br />\n";
         }
     }
     echo "<form name=\"modulesGUI\" action=\"config.php\" method=\"post\">";
     echo "<input type=\"hidden\" name=\"display\" value=\"" . $display . "\" />";
     echo "<input type=\"hidden\" name=\"type\" value=\"" . $type . "\" />";
     echo "<input type=\"hidden\" name=\"online\" value=\"" . $online . "\" />";
     echo "<input type=\"hidden\" name=\"extdisplay\" value=\"confirm\" />";
     echo "<div class=\"modulebuttons\">";
     if ($online) {
         echo "\t<a href=\"javascript:void(null);\" onclick=\"check_download_all();\">" . _("Download all") . "</a>";
         echo "\t<a href=\"javascript:void(null);\" onclick=\"check_upgrade_all();\">" . _("Upgrade all") . "</a>";
     }
     echo "\t<input type=\"reset\" value=\"" . _("Reset") . "\" />";