Project

General

Profile

« Previous | Next » 

Revision 1891

Added by Dietmar over 11 years ago

! update captcha_control module set version to 1.2.1

View differences:

upgrade-script.php
763 763
        if($oUser = $database->query($sql)){
764 764
            $iTotalUsers = $oUser->numRows();
765 765
            while($Users = $oUser->fetchRow(MYSQL_ASSOC)) {
766

  
767 766
                $aUsers[$Users['user_id']]['groups_id'] = $Users['groups_id'];
768 767
                $aUsers[$Users['user_id']]['display_name'] = $Users['display_name'];
769 768
            }
770 769
        } else {
771 770
            $aDebugMessage[] = $database->is_error()==false ? " $OK<br />" : " $FAIL!<br />";
772 771
        }
773

  
774 772
        foreach($aUsers AS $user_id => $value){
775 773
                // choose group_id from groups_id - workaround for still remaining calls to group_id (to be cleaned-up)
776 774
                $aGroups_id = explode(',', $aUsers[$user_id]['groups_id']);
......
778 776
                $group_id = 0;
779 777
                //if user is in administrator-group, get this group else just get the first one
780 778
                if($admin->is_group_match($aGroups_id,'1')) { $group_id = 1; $groups_id = '1'; } else { $group_id = intval($aGroups_id[0]); }
781

  
782 779
                $sMessage = "<span>Updating group_id ".$TEXT['DISPLAY_NAME']." " .$aUsers[$user_id]['display_name']."</span>";
783 780
                $sql  = 'UPDATE `'.TABLE_PREFIX.'users` ';
784 781
                $sql .= 'SET `group_id`  = '.$group_id.', ';
785 782
                $sql .=     '`groups_id` = \''.$groups_id.'\' ';
786 783
                $sql .= 'WHERE `user_id` = '.intval($user_id);
787

  
788 784
                if($oRes = $database->query($sql)){  }
789 785
                $aDebugMessage[] = $database->is_error()==false ? $sMessage." $OK<br />" : $sMessage." $FAIL!<br />";
790 786
        }
......
969 965
	 * upgrade modules if newer version is available
970 966
	 * $aModuleList list of proofed modules
971 967
	 */
972
//	$aModuleList = array('wysiwyg','news','form','captcha_control','output_filter');
973
	$aModuleList = array('wysiwyg','form','code');
968
	$aModuleList = array('wysiwyg','form','code','captcha_control');
974 969
	if(sizeof($aModuleList)) 
975 970
	{
976 971
		echo '<h3>Step '.(++$stepID).': Upgrade proofed modules</h3>';

Also available in: Unified diff