Changeset 2574

Show
Ignore:
Timestamp:
09/18/06 00:22:14 (7 years ago)
Author:
qldrob
Message:

Add the 'force refresh' to the 2.1 branch - backport of r2539

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.1/amp_conf/htdocs/admin/page.modules.php

    r2469 r2574  
    22 
    33$extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:''; 
     4$refresh = isset($_REQUEST['refresh'])?$_REQUEST['refresh']:''; 
    45 
    56$installed = find_allmodules(); 
     
    101102    echo _("Module Administration (online)"); 
    102103    echo "</h2>"; 
    103     echo "<a href='config.php?display=modules&type=tool&extdisplay=local'>"._("Terminate Connection to Online Module Repository")."</a>\n"; 
     104    echo "<a href='config.php?display=modules&amp;type=tool&amp;extdisplay=local'>"._("Terminate Connection to Online Module Repository")."</a><br />\n"; 
     105    echo "<a href='config.php?display=modules&amp;type=tool&amp;extdisplay=online&amp;refresh=true'>"._("Force Refresh of Local Module Cache")."</a>\n"; 
     106    // If 'refresh' is set to 'true' then truncate the modules_xml table so it doesn't try to  
     107    // use the cached XML file. 
     108    if (isset($refresh)) 
     109      sql("truncate module_xml;"); 
    104110    // determine which modules we have installed already 
    105111    $installed = find_allmodules(); 
     
    113119    echo _("Module Administration"); 
    114120    echo "</h2>"; 
    115     echo "<a href='config.php?display=modules&type=tool&extdisplay=online'>"._("Connect to Online Module Repository")."</a>\n"; 
     121    echo "<a href='config.php?display=modules&amp;type=tool&amp;extdisplay=online'>"._("Connect to Online Module Repository")."</a>\n"; 
    116122    $installed = find_allmodules(); 
    117123    $dispMods = new displayModules($installed); 
     
    412418   
    413419  function formStart($title = "") { 
     420    $uri = preg_replace("/&refresh=true/", "//", $_SERVER['REQUEST_URI']); 
    414421    return " 
    415422      <h4>{$title}</h4> 
    416       <form method=\"POST\" action=\"{$_SERVER['REQUEST_URI']}\"> 
     423      <form method=\"POST\" action=\"{$uri}\"> 
    417424      <table border=1><tr><th>&nbsp;</th><th>". _("Module")."</th><th>". _("Version")."</th><th>". _("Type") ."</th><th>". _("Category") ."</th></tr> 
    418425        ";