News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1193552566:v:use_geshi-1:v:type-php

Started by Guest, Oct 28, 2007, 06:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guest

---# Enable cache if upgrading from 1.1 and lower.
---{
if (isset($modSettings['smfVersion']) && $modSettings['smfVersion'] <= '2.0 Beta 1')
{
   $request = upgrade_query("
      SELECT value
      FROM {$db_prefix}settings
      WHERE variable = 'cache_enable'");
   list ($cache_enable) = mysql_fetch_row($request);

   // No cache before 1.1.
   if (mysql_num_rows($request) == 0)
      upgrade_query("
         INSERT INTO {$db_prefix}settings
            (variable, value)
         VALUES ('cache_enable', '1')");
   elseif (empty($cache_enable))
      upgrade_query("
         UPDATE {$db_prefix}settings
         SET value = '1'
         WHERE variable = 'cache_enable'");
}
---}
---#