Changeset 855 in ExiteCMS


Ignore:
Timestamp:
09/29/07 14:20:26 (4 years ago)
Author:
hverton
Message:

Changed to upgrade system to show more information about the updates, also added a panel to list the updates present that already have been installed.

Location:
trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/upgrade.php

    r834 r855  
    2020// check for available upgrades 
    2121$upgrades = array(); 
     22$upgraded = array(); 
    2223$temp = makefilelist(PATH_ADMIN."upgrade", ".|.."); 
    2324foreach ($temp as $tempfile) { 
     
    2526    if (strlen($tempfile) != 12 || substr($tempfile,0,3) != "rev" || substr($tempfile,-4) != ".php") continue; 
    2627    $thisrev = substr($tempfile,3,5); 
    27     if (!isNum($thisrev) || $thisrev <= $settings['revision']) continue; 
    28     $upgrades[] = $tempfile; 
     28    if (!isNum($thisrev) || $thisrev <= $settings['revision']) { 
     29        $upgraded[] = $tempfile; 
     30    } else { 
     31        $upgrades[] = $tempfile; 
     32    } 
    2933} 
    3034 
    3135// set a constant to define the upgrades available 
    3236define('UPGRADES', count($upgrades)); 
     37 
     38// set a constant to define the upgrades already installed 
     39define('UPGRADED', count($upgraded)); 
    3340 
    3441// if it was called from the admin panel, continue interactively 
     
    4754    $variables = array(); 
    4855 
     56    // get some information from the upgrades already installed 
     57    if (UPGRADED) { 
     58        $revisions = array(); 
     59        // load and check the revision files 
     60        foreach ($upgraded as $revfile) { 
     61            require_once PATH_ADMIN."upgrade/".$revfile; 
     62        } 
     63        $variables['revisions_installed'] = $revisions; 
     64    } 
     65     
    4966    // check if there are upgrades available 
    5067    if (UPGRADES) { 
     
    129146    // check for newer revisions on the ExiteCMS website 
    130147    $variables['new_upgrades'] = false; 
    131      
     148 
    132149    $template_panels[] = array('type' => 'body', 'name' => 'admin.upgrade', 'template' => 'admin.upgrade.tpl', 'locale' => PATH_LOCALE.LOCALESET."admin/upgrade.php"); 
    133150    $template_variables['admin.upgrade'] = $variables; 
  • trunk/administration/upgrade/rev00700.php

    r834 r855  
    2424 
    2525// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 
    27             'date' => 1184152074,  
    28             'description' => "Upgrade from ExiteCMS v6.1.10 to v7.00.<br /><font color='red'>This is a major upgrade, and introduces the ExiteCMS templated system.</font>"); 
     26$revisions[] = array('revision' => $_revision, 'date' => mktime(18,10,0,6,14,2007), 'description' => "Upgrade from PLi-Fusion v6.1.10 to ExiteCMS v7.00<br /><font color='red'><b>This is a major upgrade!</b><br />It replaces the old PHP-Fusion code with the new ExiteCMS templated CMS engine, and converts the PHP-Fusion database to the ExiteCMS format.<br /><br /><b>Make sure you have a backup, there is no way back from this upgrade!!!</b></font>"); 
    2927 
    3028// array to store the commands of this update 
     
    3432// * NO DATABASE CHANGES FOR THIS REVISION 
    3533 
    36 // data changes 
    37 // * NO DATA CHANGES FOR THIS REVISION 
     34// upgrade functions 
     35$commands[] = array('type' => 'function', 'value' => "migration"); 
     36 
     37/*---------------------------------------------------+ 
     38| functions required for part of the upgrade process | 
     39+----------------------------------------------------*/ 
     40function migration() { 
     41    global $db_prefix; 
     42 
     43    // disable php code panels: 
     44    $result = dbquery("UPDATE ".$db_prefix."panels SET panel_status = '0' WHERE panel_type = 'php'"); 
     45 
     46    // Reset module information 
     47    $result = dbquery("SELECT * FROM ".$db_prefix."site_links WHERE link_url LIKE 'infusions/%'"); 
     48    while ($data = dbarray($result)) { 
     49        $result2 = dbquery("UPDATE ".$db_prefix."site_links SET link_url = '".str_replace('infusions/', 'modules/', $data['link_url'])."' WHERE link_id = '".$data['link_id']."'"); 
     50    } 
     51    $result = dbquery("SELECT * FROM ".$db_prefix."admin WHERE admin_link LIKE '%/infusions/%'"); 
     52    while ($data = dbarray($result)) { 
     53        $result2 = dbquery("UPDATE ".$db_prefix."admin SET admin_link = '".str_replace('/infusions/', '/modules/', str_replace('..', '', $data['admin_link']))."' WHERE admin_id = '".$data['admin_id']."'"); 
     54    } 
     55} 
    3856?> 
  • trunk/administration/upgrade/rev00730.php

    r834 r855  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    2421 
    2522// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 'date' => 1184152074, 'description' => "Required updates for ExiteCMS v7.00 rev.730"); 
     23$revisions[] = array('revision' => $_revision, 'date' => mktime(16,34,0,6,29,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>This revision adds more granular homepage new selections, and better support for timezones.</font>"); 
    2724 
    2825// array to store the commands of this update 
  • trunk/administration/upgrade/rev00740.php

    r834 r855  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    2421 
    2522// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 'date' => 1184779156, 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>This revision introduces the new PM system, and drops standard support for Photo Albums, Weblinks and Submissions.</font>"); 
     23$revisions[] = array('revision' => $_revision, 'date' => mktime(18,58,0,7,17,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>This revision introduces the new PM system, and drops support for the Photo Albums, Weblinks and Submissions modules.</font>"); 
    2724 
    2825// array to store the commands of this update 
  • trunk/administration/upgrade/rev00760.php

    r834 r855  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    2421 
    2522// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 'date' => mktime(12,0,0,07,24,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision); 
     23$revisions[] = array('revision' => $_revision, 'date' => mktime(12,25,0,7,28,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>Now banners can be activated on a per-forum basis, and support for 'broken' timezones (like +10.5) has been added. GeoIP information can now be added manually (to correct mistakes, or add non-public IP's)</font>"); 
    2724 
    2825// array to store the commands of this update 
  • trunk/administration/upgrade/rev00780.php

    r834 r855  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    2421 
    2522// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 'date' => mktime(12,0,0,08,30,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision); 
     23$revisions[] = array('revision' => $_revision, 'date' => mktime(22,19,0,8,27,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>Dropped support for the Shoutbox (now an optional module), added forum thumbnail threshold settings.</font>"); 
    2724 
    2825// array to store the commands of this update 
  • trunk/administration/upgrade/rev00800.php

    r834 r855  
    55| Copyright 2007 Harro "WanWizard" Verton, Exite BV  | 
    66| for support, please visit http://exitecms.exite.eu | 
    7 +----------------------------------------------------+ 
    8 | Some portions copyright 2002 - 2006 Nick Jones     | 
    9 | http://www.php-fusion.co.uk/                       | 
    107+----------------------------------------------------+ 
    118| Released under the terms & conditions of v2 of the | 
     
    2421 
    2522// register this revision update 
    26 $revisions[] = array('revision' => $_revision, 'date' => mktime(12,0,0,9,1,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision); 
     23$revisions[] = array('revision' => $_revision, 'date' => mktime(14,43,0,9,10,2007), 'description' => "Required updates for ExiteCMS v7.00 rev.".$_revision."<br /><font color='red'>This revision introduces sub menu's to the menu panels, with a choose of using indentation or foldable menu's.</font>"); 
    2724 
    2825// array to store the commands of this update 
  • trunk/includes/templates/admin.upgrade.tpl

    r843 r855  
    8282        {section name=rev loop=$revisions} 
    8383        <tr> 
    84             <td align='center' width='1%' class='tbl1' style='white-space:nowrap;'> 
     84            <td align='center' valign='top' width='1%' class='tbl1' style='white-space:nowrap;'> 
    8585                {$revisions[rev].revision} 
    8686            </td> 
    87             <td align='center' width='1%' class='tbl1' style='white-space:nowrap;'> 
    88                 {$revisions[rev].date|date_format:"longdate"} 
     87            <td align='center' valign='top' width='1%' class='tbl1' style='white-space:nowrap;'> 
     88                {$revisions[rev].date|date_format:"forumdate"} 
    8989            </td> 
    9090            <td align='left' class='tbl1'> 
     
    115115{/if} 
    116116{include file="_closetable.tpl"} 
     117{if $smarty.const.UPGRADED} 
     118{include file="_opentable.tpl" name=$_name title=$locale.400 state=$_state style=$_style} 
     119    <br /> 
     120    <center> 
     121    <b>{$locale.407}</b> 
     122    </center> 
     123    <br /> 
     124    <table align='center' cellpadding='0' cellspacing='1' width='650' class='tbl-border'> 
     125        <tr> 
     126            <td align='center' width='1%' class='tbl2' style='white-space:nowrap;'> 
     127                <b>{$locale.410} </b> 
     128            </td> 
     129            <td align='center' width='1%' class='tbl2' style='white-space:nowrap;'> 
     130                <b>{$locale.411}</b> 
     131            </td> 
     132            <td align='left' class='tbl2'> 
     133                <b>{$locale.412}</b> 
     134            </td> 
     135        </tr> 
     136        {section name=rev loop=$revisions_installed} 
     137        <tr> 
     138            <td align='center' valign='top' width='1%' class='tbl1' style='white-space:nowrap;'> 
     139                {$revisions_installed[rev].revision} 
     140            </td> 
     141            <td align='center' valign='top' width='1%' class='tbl1' style='white-space:nowrap;'> 
     142                {$revisions_installed[rev].date|date_format:"forumdate"} 
     143            </td> 
     144            <td align='left' class='tbl1'> 
     145                {$revisions_installed[rev].description} 
     146            </td> 
     147        </tr> 
     148        {/section} 
     149    </table> 
     150    <br /> 
     151{include file="_closetable.tpl"} 
     152{/if} 
    117153{***************************************************************************} 
    118154{* End of template                                                         *} 
  • trunk/locale/English/admin/upgrade.php

    r834 r855  
    77$locale['405'] = "ExiteCMS has been succesfully upgraded to revision %s."; 
    88$locale['406'] = "Please look carefully at the error messages, and correct them."; 
     9$locale['407'] = "The following upgrades have been installed:"; 
    910// upgrades 
    1011$locale['410'] = "Revision"; 
    11 $locale['411'] = "Date"; 
     12$locale['411'] = "Release Date"; 
    1213$locale['412'] = "Description"; 
    1314$locale['413'] = "Upgrade Now"; 
Note: See TracChangeset for help on using the changeset viewer.