Changeset 2787 for trunk/upgrade.php


Ignore:
Timestamp:
Oct 22, 2008, 1:46:13 AM (16 years ago)
Author:
patdenice
Message:
  • Move upgrade.tpl to admin template.
  • Deactivate all active plugins during upgrade.php.
  • Update Editarea for LocalFiles Editor to version 0.7.2.3 (bonEcho compatibility)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upgrade.php

    r2768 r2787  
    152152// +-----------------------------------------------------------------------+
    153153
    154 $template = new Template(PHPWG_ROOT_PATH.'template/yoga');
     154$template = new Template(PHPWG_ROOT_PATH.'admin/template/goto');
    155155$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
    156156$template->assign('RELEASE', PHPWG_VERSION);
     
    234234    $conf['die_on_sql_error'] = false;
    235235    include($upgrade_file);
     236
     237    // Plugins deactivation
     238    if (in_array(PREFIX_TABLE.'plugins', $tables))
     239    {
     240      $query = '
     241UPDATE '.PREFIX_TABLE.'plugins SET state="inactive" WHERE state="active"
     242;';
     243      mysql_query($query);
     244
     245      if (mysql_affected_rows() > 0)
     246      {
     247        array_push(
     248          $page['infos'],
     249          'As a precaution, all activated plugins have been deactivated.
     250You must check for plugins upgrade before reactiving them.'
     251        );
     252      }
     253    }
    236254
    237255    // Create empty local files to avoid log errors
Note: See TracChangeset for help on using the changeset viewer.