Beispiel #1
0
         foreach ($d as $n) {
             //Dont show the same notifications twice
             if (!in_array($n['id'], array('FW_REVOKED', 'FW_UNSIGNED', 'FW_UNTRUSTED', 'FW_TAMPERED', 'FW_UNKNOWN'))) {
                 array_unshift($danger, $n['display_text']);
             }
         }
         if (!empty($danger)) {
             echo generate_message_banner(_('Security Warning'), 'danger', $danger, 'http://wiki.freepbx.org/display/F2/Module+Signing', true);
         }
         if (!empty($warning)) {
             echo generate_message_banner(_('Unsigned Module(s)'), 'warning', $warning, 'http://wiki.freepbx.org/display/F2/Module+Signing', true);
         }
         if ($amp_conf['PHP_CONSOLE']) {
             $connector = PhpConsole\Connector::getInstance();
             if (!$connector->isActiveClient()) {
                 echo generate_message_banner(_('PHP Console Enabled but not installed'), 'info', array(_('You have enabled PHP Console in Advanced settings but have not installed the Chrome Extension or you are not using Chrome')), 'https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef', true);
             }
         }
     }
 }
 if (isset($gpgstatus['status']) && $gpgstatus['status'] & FreePBX\GPG::STATE_REVOKED) {
     echo sprintf(_("File %s has a revoked signature. Can not load"), $module_file);
     break;
 } else {
     // load language info if available
     modgettext::textdomain($module_name);
     if (isset($currentcomponent)) {
         $bmo->GuiHooks->doGUIHooks($module_name, $currentcomponent);
     }
     if ($bmo->GuiHooks->needsIntercept($module_name, $module_file)) {
         $bmo->Performance->Start("hooks-{$module_name}-{$module_file}");
Beispiel #2
0
<?php

/* TODO: Something like this needs to be added above the module page to represent this functionality as Beta
 *       May be nice to have a tool tip saying what it means, etc. Commneted out until it is put together.
 *       it is triggered with a beta="yes" attribute in the menuitem tag in module.xml such that specific
 *       pages can be beta vs. the whole module.
 */
echo generate_message_banner(_('This page is currently BETA'), 'info', '', 'http://wiki.freepbx.org/display/F2/Beta+Modules');
<?php

$danger = array(sprintf(_('Please install the TTS Engines module via %s or run `fwconsole ma install ttsengines` from the CLI`'), '<a href="config.php?display=modules">Module Admin</a>'));
echo generate_message_banner(_('TTS Engines Not Installed'), 'danger', $danger);
Beispiel #4
0
                     $warning = array_merge($warning, $modules['statuses'][$st]);
                 }
             }
         }
         $d = FreePBX::notifications()->list_security(true);
         foreach ($d as $n) {
             //Dont show the same notifications twice
             if (!in_array($n['id'], array('FW_REVOKED', 'FW_UNSIGNED', 'FW_UNTRUSTED', 'FW_TAMPERED', 'FW_UNKNOWN'))) {
                 array_unshift($danger, $n['display_text']);
             }
         }
         if (!empty($danger)) {
             echo generate_message_banner(_('Security Warning'), 'danger', $danger, 'http://wiki.freepbx.org/display/F2/Module+Signing', true);
         }
         if (!empty($warning)) {
             echo generate_message_banner(_('Unsigned Module(s)'), 'warning', $warning, 'http://wiki.freepbx.org/display/F2/Module+Signing', true);
         }
     }
 }
 if (isset($gpgstatus['status']) && $gpgstatus['status'] & GPG::STATE_REVOKED) {
     echo sprintf(_("File %s has a revoked signature. Can not load"), $module_file);
 } else {
     // load language info if available
     modgettext::textdomain($module_name);
     try {
         if ($bmo->GuiHooks->needsIntercept($module_name, $module_file)) {
             $bmo->GuiHooks->doIntercept($module_name, $module_file);
         } else {
             include $module_file;
         }
     } catch (Exception $e) {