Project

General

Profile

« Previous | Next » 

Revision 1822

Added by Dietmar over 11 years ago

! update installer, strict difference between table structure and data
  1. fixed wrong constant for settings table
    ! update redirct to upgrade-script in /admin/start(index.php

View differences:

upgrade-script.php
519 519
     */
520 520
    $aDebugMessage[] = "<span>Adding/updating website_signature to settings table</span>";
521 521
    $cfg = array(
522
    	'website_signature' => (defined('WEBSITE_SIGNATURE') && (WEBSITE_SIGNATURE=='') ? '' : WEBSITE_SIGNATURE)
522
    	'website_signature' => (defined('WEBSITE_SIGNATURE') ? WEBSITE_SIGNATURE : '')
523 523
    );
524 524

  
525 525
    $aDebugMessage[] = (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
......
529 529
     */
530 530
    $aDebugMessage[] = "<span>Adding/updating confirmed_registration to settings table</span>";
531 531
    $cfg = array(
532
    	'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') && (CONFIRMED_REGISTRATION=='') ? '' : CONFIRMED_REGISTRATION)
532
    	'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') ? CONFIRMED_REGISTRATION : '0')
533 533
    );
534 534

  
535 535
    $aDebugMessage[] = (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
......
770 770

  
771 771
}
772 772

  
773
$aDebugMessage = array();
774
/**********************************************************
775
 * This part with changing in mod_wysiwyg will be removed in the final version
776
 * special workout for the tester
777
 *  - Remove/add PRIMARY KEY from/to "section_id" from table "mod_wysiwygs"
778
 */
773
if(version_compare(WB_REVISION, '1800', '<'))
774
{
775
    $aDebugMessage = array();
776
    /**********************************************************
777
     * This part with changing in mod_wysiwyg will be removed in the final version
778
     * special workout for the tester
779
     *  - Remove/add PRIMARY KEY from/to "section_id" from table "mod_wysiwygs"
780
     */
779 781
    $aDebugMessage[] = '<div style="margin-left:2em;">';
780 782

  
781 783
    $sTable = TABLE_PREFIX.'mod_wysiwyg';
......
793 795
    $aDebugMessage[] = $database->index_add($sTable, '', 'section_id', 'PRIMARY') ? " $OK<br />" : " $FAIL!<br />";
794 796
    $aDebugMessage[] = '</div>';
795 797

  
796
if($bDebugModus) {
797
// $aDebugMessage[] =
798
    echo implode(PHP_EOL,$aDebugMessage);
798
    if($bDebugModus) {
799
    // $aDebugMessage[] =
800
        echo implode(PHP_EOL,$aDebugMessage);
801
    }
799 802
}
800
$aDebugMessage = array();
801
echo '<h3>Step '.(++$stepID).': Updating group_id in table users</h3>';
803

  
804
if(version_compare(WB_REVISION, VERSION, '<'))
805
{
806
    $aDebugMessage = array();
807
    echo '<h3>Step '.(++$stepID).': Updating group_id in table users</h3>';
802 808
    /**********************************************************
803 809
    * Updating group_id in table users
804 810
    */
805

  
806 811
        echo '<div style="margin-left:2em;">';
807 812
        $aUsers = array();
808 813
		// Get existing values
......
840 845

  
841 846
    $aDebugMessage[] = '</div>';
842 847

  
843
if($bDebugModus) {
844
// $aDebugMessage[] =
845
    echo implode(PHP_EOL,$aDebugMessage);
846
}else {
847
    echo '<span><strong>'.$iTotalUsers.' users updating the group_id</strong></span>'." $OK<br />";
848
    echo '</div>';
848
    if($bDebugModus) {
849
    // $aDebugMessage[] =
850
        echo implode(PHP_EOL,$aDebugMessage);
851
    }else {
852
        echo '<span><strong>'.$iTotalUsers.' users updating the group_id</strong></span>'." $OK<br />";
853
        echo '</div>';
854
    }
849 855
}
850 856

  
851 857
$aDebugMessage = array();
852 858

  

Also available in: Unified diff