Changeset 3556

Show
Ignore:
Timestamp:
01/08/07 20:13:57 (2 years ago)
Author:
qldrob
Message:

Working through the patches, bringing them up to date.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/deb/trunk/debian/patches/00list

    r3550 r3556  
    44disable-online-updates 
    55fix-retrieve-op-panel-cfg 
    6 fix-fop-config.dpatch 
    7 fix-version-2.1.3 
    8 fix-open-or-die 
    9 fix-recordings 
    106fix-toplinks 
    117fix-index-php 
  • misc/deb/trunk/debian/patches/disable-online-updates.dpatch

    r3550 r3556  
    22## disable-online-updates.dpatch by Diego Iastrubni <diego.iastrubni@xorcom.com> 
    33## 
    4 ## DP: Disable online updates, unless user specifies a special hidden 
    5 ## DP: configuration in amportal.conf 
     4## RT: Disable package management 
    65 
    76@DPATCH@ 
     
    98--- freepbx-2.1.3.dfsg~/amp_conf/htdocs/admin/page.modules.php  2006-09-21 06:04:12.000000000 +0300 
    109+++ freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/page.modules.php   2006-09-28 17:34:48.000000000 +0300 
    11 @@ -5,6 +5,15 @@ 
    12   
    13  $installed = find_allmodules(); 
    14   
    15 +if (isset($amp_conf["AMP_ONLINE_UPDATE"])) { 
    16 +       $packager_mode = (strtolower($amp_conf["AMP_ONLINE_UPDATE"]) == "true" ); 
    17 +} 
    18 +else{ 
    19 +       $packager_mode =  true; 
    20 +} 
    21 
    22 
    23 
    24  function pageReload(){ 
    25  return ""; 
    26         //return "<script language=\"Javascript\">document.location='".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."&foo=".rand()."'</script>"; 
    27 @@ -18,12 +27,11 @@ 
    28                                         installModule($module,$_POST[$module.'_version']); 
    29                                 else 
    30                                         echo "<div class=\"error\">"._("Module install script failed to run")."</div>"; 
    31 -                       break; 
    32 -                       case "uninstall": 
    33 -                               if (runModuleSQL($module,'uninstall')) 
    34 -                                       uninstallModule($module); 
    35 -                               else 
    36 -                                       echo "<div class=\"error\">"._("Module uninstall script failed to run")."</div>"; 
    37 +                               break; 
    38 +                                       if (runModuleSQL($module,'uninstall')) 
    39 +                                               uninstallModule($module); 
    40 +                                       else 
    41 +                                               echo "<div class=\"error\">"._("Module uninstall script failed to run")."</div>"; 
    42                         break; 
    43                         case "enable": 
    44                                 enableModule($module); 
    45 @@ -34,12 +42,22 @@ 
    46                                 echo pageReload(); 
    47                         break; 
    48                         case "delete": 
    49 +                               if ($packager_mode){ 
    50 +                                       echo "<div class=\"error\">" . _("Deleting modules is not supported on packager mode.") . _("Use your distribution packaging system for manipulating modules.") . "</div>"; 
    51 +                                       break; 
    52 +                               } 
    53 
    54                                 deleteModule($module); 
    55                                 rmModule($module); 
    56 -                       break; 
    57 +                               break; 
    58                         case "download": 
    59 +                               if ($packager_mode){ 
    60 +                                       echo "<div class=\"error\">" . _("Downloading modules is not supported on packager mode."); 
    61 +                                       echo _("Use your distribution packaging system for manipulating modules.") . "</div>"; 
    62 +                                       break; 
    63 +                               } 
    64                                 fetchModule($module); 
    65 -                       break; 
    66 +                               break; 
    67                         case "upgrade": 
    68                                 upgradeModule($module); 
    69                         break; 
    70 @@ -62,6 +80,12 @@ 
    71                                 } 
    72                         break; 
    73                         case "downloadinstall": // download, install and enable 
    74 +                               if ($packager_mode){ 
    75 +                                       echo "<div class=\"error\">" . _("Downloading  not supported on packager mode.") . 
    76 +                                               _("Use your distribution packaging system for manipulating modules.") . "</div>"; 
    77 +                                       break; 
    78 +                               } 
    79 +                        
    80                                 fetchModule($module); 
    81                                 if (runModuleSQL($module,'install'))  
    82                                         installModule($module,$_POST[$module.'_version']); 
    83 @@ -70,6 +94,11 @@ 
    84                                 enableModule($module); 
    85                         break; 
    86                         case "downloadupdate": //download and update 
    87 +                               if ($packager_mode){ 
    88 +                                       echo "<div class=\"error\">" . _("Downloading  not supported on packager mode.") . 
    89 +                                               _("Use your distribution packaging system for manipulating modules.") . "</div>"; 
    90 +                                       break; 
    91 +                               } 
    92                                 fetchModule($module); 
    93                                 upgradeModule($module); 
    94                         break; 
    95 @@ -98,6 +127,15 @@ 
    96  <?php 
    97  switch($extdisplay) { 
    98         case "online":  
    99 +               if ($packager_mode) 
    100 +               { 
    101 +                       echo "<h2>"; 
    102 +                       echo _("Module Administration (online)"); 
    103 +                       echo "</h2>"; 
    104 +                       echo _("This feature has been disabled in this version of FreePBX."); 
    105 +                       echo _("Use your distribution packaging system for manipulating modules."); 
    106 +               } 
    107 
    108                 echo "<h2>"; 
    109                 echo _("Module Administration (online)"); 
    110                 echo "</h2>"; 
    111 @@ -123,7 +161,8 @@ 
    112                 echo "<h2>"; 
    113                 echo _("Module Administration"); 
    114                 echo "</h2>"; 
    115 -               echo "<a href='config.php?display=modules&amp;type=tool&amp;extdisplay=online'>"._("Connect to Online Module Repository")."</a>\n"; 
    116 +               if (!$packager_mode) 
    117 +                       echo "<a href='config.php?display=modules&amp;type=tool&amp;extdisplay=online'>"._("Connect to Online Module Repository")."</a>\n"; 
    118                 $installed = find_allmodules(); 
    119                 $dispMods = new displayModules($installed); 
    120                 echo $dispMods->drawModules(); 
    121 @@ -144,6 +183,7 @@ 
    122         var $html; 
    123         //constructor 
    124         function displayModules($installed,$online=false) { 
    125 +               global $packager_mode; 
    126                 // So, we have an array with several: 
    127         /* 
    128                 [phpinfo] => Array 
    129 @@ -294,14 +334,26 @@ 
    130                                         $color = "white"; 
    131                                         $rows .= $this->tableHtml($mod,$color); 
    132                                 } 
    133 -                               $this->options = " 
    134 -                                       <select name=\"modaction\"> 
    135 -                                               <option value=\"disable\">"._("Disable Selected")." 
    136 -                                               <option value=\"uninstall\">"._("Uninstall Selected")." 
    137 -                                               <option value=\"uninstalldelete\">"._("Uninstall and Delete Selected")." 
    138 -                                       </select> 
    139 -                                       <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    140 -                                       "; 
    141 +                                
    142 +                               if ($packager_mode){ 
    143 +                                       $this->options = " 
    144 +                                               <select name=\"modaction\"> 
    145 +                                                       <option value=\"disable\">"._("Disable Selected")." 
    146 +                                                       <option value=\"uninstall\">"._("Uninstall Selected")." 
    147 +                                               </select> 
    148 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    149 +                                               "; 
    150 +                               } 
    151 +                               else { 
    152 +                                       $this->options = " 
    153 +                                               <select name=\"modaction\"> 
    154 +                                                       <option value=\"disable\">"._("Disable Selected")." 
    155 +                                                       <option value=\"uninstall\">"._("Uninstall Selected")." 
    156 +                                                       <option value=\"uninstalldelete\">"._("Uninstall and Delete Selected")." 
    157 +                                               </select> 
    158 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    159 +                                               "; 
    160 +                               } 
    161                                 // build the table 
    162                                 $this->html .= $this->formStart(_("Enabled Modules")); 
    163                                 $this->html .= $rows; 
    164 @@ -317,14 +369,24 @@ 
    165                                         $color = "white"; 
    166                                         $rows .= $this->tableHtml($mod,$color); 
    167                                 } 
    168 -                               $this->options = " 
    169 -                                       <select name=\"modaction\"> 
    170 -                                               <option value=\"enable\">"._("Enable Selected")." 
    171 -                                               <option value=\"uninstall\">"._("Uninstall Selected")." 
    172 -                                               <option value=\"uninstalldelete\">"._("Uninstall and Delete Selected")." 
    173 -                                       </select> 
    174 -                                       <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    175 -                                       "; 
    176 +                                
    177 +                               if ($packager_mode) 
    178 +                                       $this->options = " 
    179 +                                               <select name=\"modaction\"> 
    180 +                                                       <option value=\"enable\">"._("Enable Selected")." 
    181 +                                                       <option value=\"uninstall\">"._("Uninstall Selected")." 
    182 +                                               </select> 
    183 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    184 +                                               "; 
    185 +                               else 
    186 +                                       $this->options = " 
    187 +                                               <select name=\"modaction\"> 
    188 +                                                       <option value=\"enable\">"._("Enable Selected")." 
    189 +                                                       <option value=\"uninstall\">"._("Uninstall Selected")." 
    190 +                                                       <option value=\"uninstalldelete\">"._("Uninstall and Delete Selected")." 
    191 +                                               </select> 
    192 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    193 +                                               "; 
    194                                 // build the table 
    195                                 $this->html .= $this->formStart(_("Disabled Modules")); 
    196                                 $this->html .= $rows; 
    197 @@ -340,13 +402,24 @@ 
    198                                         $color = "white"; 
    199                                         $rows .= $this->tableHtml($mod,$color); 
    200                                 } 
    201 -                               $this->options = " 
    202 -                                       <select name=\"modaction\"> 
    203 -                                               <option value=\"installenable\">"._("Enable Selected")." 
    204 -                                               <option value=\"delete\">"._("Delete Selected")." 
    205 -                                       </select> 
    206 -                                       <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    207 -                                       "; 
    208 +                                
    209 +                               if ($packager_mode){ 
    210 +                                       $this->options = " 
    211 +                                               <select name=\"modaction\"> 
    212 +                                                       <option value=\"installenable\">"._("Enable Selected")." 
    213 +                                               </select> 
    214 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    215 +                                               "; 
    216 +                               } 
    217 +                               else { 
    218 +                                       $this->options = " 
    219 +                                               <select name=\"modaction\"> 
    220 +                                                       <option value=\"installenable\">"._("Enable Selected")." 
    221 +                                                       <option value=\"delete\">"._("Delete Selected")." 
    222 +                                               </select> 
    223 +                                               <input type=\"submit\" name=\"submit\" value=\""._("Submit")."\"> 
    224 +                                               "; 
    225 +                               } 
    226                                 // build the table 
    227                                 $this->html .= $this->formStart(_("Not Installed Local Modules")); 
    228                                 $this->html .= $rows; 
     10@@ -6,12 +6,8 @@ 
     11  * Optionally, the other way is to remove the below lines, and instead just define 
     12  * EXTERNAL_PACKAGE_MANAGEMENT as 1. This prevents changing the setting from amportal.conf. 
     13  */ 
     14-if (!isset($amp_conf['AMPEXTERNPACKAGES']) || ($amp_conf['AMPEXTERNPACKAGES'] != 'true')) { 
     15-       define('EXTERNAL_PACKAGE_MANAGEMENT', 0); 
     16-} else { 
     17-       define('EXTERNAL_PACKAGE_MANAGEMENT', 1); 
     18-} 
     19 
     20+define('EXTERNAL_PACKAGE_MANAGEMENT', 0); 
     21 
     22 $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:''; 
     23 // can't go online if external management is on 
     24 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads