Advertisement:

Navigation

Readme

This patch file will update your forum to SMF 1.1.7.

File Edits

./index.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
$forum_version = 'SMF 1.1.6';
Replace With: [Select]
$forum_version = 'SMF 1.1.7';

./SSI.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
elseif (isset($_REQUEST['ssi_layers']))
{
   if ((@get_magic_quotes_gpc() ? addslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == htmlspecialchars($ssi_layers))
      die('Hacking attempt...');
}
Replace With: [Select]
elseif (isset($_REQUEST['ssi_layers'], $ssi_layers) && (@get_magic_quotes_gpc() ? stripslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == $ssi_layers)
   die('Hacking attempt...');

./Sources/Help.php

Operation #1
Find: [Select]
   if (!isset($_GET['page']) || !isset($context['all_pages'][$_GET['page']]))
Replace With: [Select]
   if (!isset($_GET['page']) || !is_string($_GET['page']) || !isset($context['all_pages'][$_GET['page']]))

./Sources/PackageGet.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
      redirectexit('action=packages;sa=install;package=' . $package_name);
Replace With: [Select]
      redirectexit('action=packages;sa=install;package=' . $package_name . ';sesc=' . $context['session_id']);
Operation #3
Find: [Select]
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package11'] . ' ]</a>';
   elseif ($context['package']['type'] == 'avatar')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package12'] . ' ]</a>';
   elseif ($context['package']['type'] == 'language')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package13'] . ' ]</a>';
   else
      $context['package']['install']['link'] = '';

   $context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';

   // Free a little bit of memory...
Replace With: [Select]
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package11'] . ' ]</a>';
   elseif ($context['package']['type'] == 'avatar')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package12'] . ' ]</a>';
   elseif ($context['package']['type'] == 'language')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package13'] . ' ]</a>';
   else
      $context['package']['install']['link'] = '';

   $context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';

   // Free a little bit of memory...

Operation #4
Find: [Select]
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package11'] . ' ]</a>';
   elseif ($context['package']['type'] == 'avatar')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package12'] . ' ]</a>';
   elseif ($context['package']['type'] == 'language')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . '">[ ' . $txt['package13'] . ' ]</a>';
   else
      $context['package']['install']['link'] = '';

   $context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';

   unset($context['package']['xml']);
Replace With: [Select]
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package11'] . ' ]</a>';
   elseif ($context['package']['type'] == 'avatar')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package12'] . ' ]</a>';
   elseif ($context['package']['type'] == 'language')
      $context['package']['install']['link'] = '<a href="' . $scripturl . '?action=packages;sa=install;package=' . $context['package']['filename'] . ';sesc=' . $context['session_id'] . '">[ ' . $txt['package13'] . ' ]</a>';
   else
      $context['package']['install']['link'] = '';

   $context['package']['list_files']['link'] = '<a href="' . $scripturl . '?action=packages;sa=list;package=' . $context['package']['filename'] . '">[ ' . $txt['package14'] . ' ]</a>';

   unset($context['package']['xml']);

./Sources/Packages.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
// Test install a package.
function PackageInstallTest()
{
   global $boarddir, $txt, $context, $scripturl, $sourcedir, $modSettings;

   // You have to specify a file!!
   if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
Replace With: [Select]
// Test install a package.
function PackageInstallTest()
{
   global $boarddir, $txt, $context, $scripturl, $sourcedir, $modSettings;

   checkSession('get');

   // You have to specify a file!!
   if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)

Operation #3
Find: [Select]
function PackageInstall()
{
   global $boarddir, $txt, $context, $boardurl, $scripturl, $sourcedir, $modSettings;

   // If there's no file, what are we installing?
   if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
      redirectexit('action=packages');
Replace With: [Select]
function PackageInstall()
{
   global $boarddir, $txt, $context, $boardurl, $scripturl, $sourcedir, $modSettings;

   checkSession('post');

   // If there's no file, what are we installing?
   if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)
      redirectexit('action=packages');

Operation #4
Find: [Select]
function PackageList()
{
   global $txt, $scripturl, $boarddir, $context, $sourcedir;

   require_once($sourcedir . '/Subs-Package.php');

   // No package? Show him or her the door.
   if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
Replace With: [Select]
function PackageList()
{
   global $txt, $scripturl, $boarddir, $context, $sourcedir;

   require_once($sourcedir . '/Subs-Package.php');

   // No package? Show him or her the door.
   if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)

Operation #5
Find: [Select]
function ExamineFile()
{
   global $txt, $scripturl, $boarddir, $context, $sourcedir;

   require_once($sourcedir . '/Subs-Package.php');

   // No package? Show him or her the door.
   if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
Replace With: [Select]
function ExamineFile()
{
   global $txt, $scripturl, $boarddir, $context, $sourcedir;

   checkSession('get');

   require_once($sourcedir . '/Subs-Package.php');

   // No package? Show him or her the door.
   if (empty($_REQUEST['package']) || preg_match('~[^\\w0-9.\\-_]~', $_REQUEST['package']) === 1 || strpos($_REQUEST['package'], '..') !== false)

Operation #6
Find: [Select]
      $context['filedata'] = '<img src="' . $scripturl . '?action=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw" alt="' . $_REQUEST['file'] . '" />';
Replace With: [Select]
      $context['filedata'] = '<img src="' . $scripturl . '?action=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw;sesc=' . $context['session_id'] . '" alt="' . $_REQUEST['file'] . '" />';
Operation #7
Find: [Select]
function FlushInstall()
{
   global $boarddir, $sourcedir;
Replace With: [Select]
function FlushInstall()
{
   global $boarddir, $sourcedir;

   checkSession('get');

Operation #8
Find: [Select]
// Delete a package.
function PackageRemove()
{
   global $scripturl, $boarddir;
Replace With: [Select]
// Delete a package.
function PackageRemove()
{
   global $scripturl, $boarddir;

   checkSession('get');

./Sources/QueryString.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.5 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
      parse_str(preg_replace('/&(\w+)(?=&|$)/', '&$1=', strtr($_SERVER['QUERY_STRING'], array(';?' => '&', ';' => '&'))), $_GET);
Replace With: [Select]
      parse_str(preg_replace('/&(\w+)(?=&|$)/', '&$1=', strtr($_SERVER['QUERY_STRING'], array(';?' => '&', ';' => '&', '%00' => '', "\0" => ''))), $_GET);

./Sources/Subs-Graphics.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
      fwrite($fp, fetch_web_data($url));
Replace With: [Select]
      $fileContents = fetch_web_data($url);

      // Though not an exhaustive list, better safe than sorry.
      if (preg_match('~(iframe|\\<\\?php|\\<\\?|\\<%|html|eval|body|script)~', $fileContents) === 1)
      {
         fclose($fp);
         return false;
      }

      fwrite($fp, $fileContents);

./Sources/Themes.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.7 *
Operation #2
Find: [Select]
   // Use a specific theme?
Replace With: [Select]
   $reservedVars = array(
      'actual_theme_url',
      'actual_images_url',
      'base_theme_dir',
      'base_theme_url',
      'default_images_url',
      'default_theme_dir',
      'default_theme_url',
      'default_template',
      'images_url',
      'number_recent_posts',
      'smiley_sets_default',
      'theme_dir',
      'theme_id',
      'theme_layers',
      'theme_templates',
      'theme_url',
   );

   // Can't change reserved vars.
   if (in_array(strtolower($_GET['var']), $reservedVars))
      redirectexit($settings['images_url'] . '/blank.gif');

   // Use a specific theme?

./Themes/default/Packages.template.php

Operation #1
Find: [Select]
// Version: 1.1; Packages
Replace With: [Select]
// Version: 1.1.7; Packages
Operation #2
Find: [Select]
      </form>';
}

function template_extract_package()
Replace With: [Select]
         <input type="hidden" name="sc" value="', $context['session_id'], '" />
      </form>';
}

function template_extract_package()

Operation #3
Find: [Select]
                  <li><a href="', $scripturl, '?action=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], '" title="', $txt[305], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>';
Replace With: [Select]
                  <li><a href="', $scripturl, '?action=packages;sa=examine;package=', $context['filename'], ';file=', $fileinfo['filename'], ';sesc=', $context['session_id'], '" title="', $txt[305], '">', $fileinfo['filename'], '</a> (', $fileinfo['size'], ' ', $txt['package_bytes'], ')</li>';
Operation #4
Find: [Select]
                     <td>', $file['version'], '</td>
                     <td align="right"><a href="', $scripturl, '?action=packages;sa=uninstall;package=', $file['filename'], '">[ ', $txt['smf198b'], ' ]</a></td>
                  </tr>';

      echo '
               </table>
               <br />
               <a href="', $scripturl, '?action=packages;sa=flush">[ ', $txt['smf198d'], ' ]</a>';
Replace With: [Select]
                     <td>', $file['version'], '</td>
                     <td align="right"><a href="', $scripturl, '?action=packages;sa=uninstall;package=', $file['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a></td>
                  </tr>';

      echo '
               </table>
               <br />
               <a href="', $scripturl, '?action=packages;sa=flush;sesc=', $context['session_id'], '">[ ', $txt['smf198d'], ' ]</a>';

Operation #5
Find: [Select]
      foreach ($context['available_mods'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>', ++$i, '.</td>
                     <td>', $package['name'], '</td>
                     <td>
                        ', $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
Replace With: [Select]
      foreach ($context['available_mods'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>', ++$i, '.</td>
                     <td>', $package['name'], '</td>
                     <td>
                        ', $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>

Operation #6
Find: [Select]
      foreach ($context['available_avatars'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>', ++$i, '.</td>
                     <td>', $package['name'], '</td>
                     <td>', $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
Replace With: [Select]
      foreach ($context['available_avatars'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>', ++$i, '.</td>
                     <td>', $package['name'], '</td>
                     <td>', $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package52'], ' ]</a>

Operation #7
Find: [Select]
      foreach ($context['available_languages'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>' . ++$i . '.</td>
                     <td>' . $package['name'] . '</td>
                     <td>' . $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '">[ ', $txt['package52'], ' ]</a>
Replace With: [Select]
      foreach ($context['available_languages'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>' . ++$i . '.</td>
                     <td>' . $package['name'] . '</td>
                     <td>' . $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package52'], ' ]</a>

Operation #8
Find: [Select]
      foreach ($context['available_other'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>' . ++$i . '.</td>
                     <td>' . $package['name'] . '</td>
                     <td>' . $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>
Replace With: [Select]
      foreach ($context['available_other'] as $i => $package)
      {
         echo '
                  <tr>
                     <td>' . ++$i . '.</td>
                     <td>' . $package['name'] . '</td>
                     <td>' . $package['version'];

         if ($package['is_installed'] && !$package['is_newer'])
            echo '
                        <img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.gif" alt="" width="12" height="11" align="middle" style="margin-left: 2ex;" />';

         echo '
                     </td>
                     <td align="right">';

      if ($package['can_uninstall'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=uninstall;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['smf198b'], ' ]</a>';
      elseif ($package['can_upgrade'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package_upgrade'], ' ]</a>';
      elseif ($package['can_install'])
         echo '
                        <a href="', $scripturl, '?action=packages;sa=install;package=', $package['filename'], ';sesc=', $context['session_id'], '">[ ', $txt['package11'], ' ]</a>';

      echo '
                        <a href="', $scripturl, '?action=packages;sa=list;package=', $package['filename'], '">[ ', $txt['package14'], ' ]</a>
                        <a href="', $scripturl, '?action=packages;sa=remove;package=', $package['filename'], ';sesc=', $context['session_id'], '"', $package['is_installed'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package52'], ' ]</a>

File Operations