Changeset 11725

Show
Ignore:
Timestamp:
03/08/11 18:59:47 (2 years ago)
Author:
p_lindheimer
Message:

fixes #4932 don't warn if told not to

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.9/amp_conf/bin/module_admin

    r11633 r11725  
    226226  global $active_repos; 
    227227 
     228  check_active_repos(); 
     229 
    228230  foreach ($modules_online as $name) { 
    229231 
     
    251253  global $active_repos; 
    252254   
     255  check_active_repos(); 
     256 
    253257  foreach (array_keys($modules_local) as $name) { 
    254258    if (isset($modules_online[$name])) { 
     
    347351  } 
    348352} 
     353 
     354function check_active_repos() { 
     355  global $no_warnings; 
     356  global $active_repos; 
     357 
     358  if (!isset($active_repos)) { 
     359    $active_repos = module_get_active_repos(); 
     360    $list = implode(',',array_keys($active_repos)); 
     361    if (!$no_warnings) { 
     362      out("no repos specified, using: [$list] from last GUI settings"); 
     363      out(""); 
     364    } 
     365  } 
     366} 
     367 
    349368 
    350369function showHelp() { 
     
    448467  global $active_repos; 
    449468 
     469  check_active_repos(); 
     470 
    450471  if ($online) { 
    451472    $modules_online = module_getonlinexml(false, $repo); 
     
    614635} 
    615636 
    616 if (!isset($active_repos)) { 
    617   $active_repos = module_get_active_repos(); 
    618   $list = implode(',',array_keys($active_repos)); 
    619   out("no repos specified, using: [$list] from last GUI settings"); 
    620   out(""); 
    621 } 
    622  
    623637$operation = $args[1][0]; 
    624638$param = isset($args[1][1]) ? $args[1][1] : null;;