Project

General

Profile

« Previous | Next » 

Revision 1504

Added by DarkViper almost 13 years ago

fixed order::clean()

View differences:

branches/2.8.x/CHANGELOG
12 12

  
13 13
=============================== FEATURES FREEZE ================================
14 14
----------------------------------- Fixes 2.8.2 --------------------------------
15
19 Aug-2011 Build 1504 Werner v.d.Decken(DarkViper)
16
# fixed order::clean()
15 17
18 Aug-2011 Build 1503 Dietmar Woellbrink (Luisehahne)
16 18
! change sql statements to strict in module droplets
17 19
! fix vars in compatibility mode for versions before 2.8.1 in frontend.functions.php
branches/2.8.x/wb/admin/interface/version.php
52 52

  
53 53
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
54 54
if(!defined('VERSION')) define('VERSION', '2.8.2');
55
if(!defined('REVISION')) define('REVISION', '1503');
55
if(!defined('REVISION')) define('REVISION', '1504');
branches/2.8.x/wb/framework/class.order.php
139 139
	 */
140 140
	public function clean($group) {
141 141
		// Loop through all records and give new order
142
		$sql  = 'SET @c := 0; ';
143
		$sql .= 'UPDATE `'.$this->_Table.'` SET `'.$this->_FieldOrder.'`=( SELECT @c := @c + 1 ) ';
144
		$sql .= 'WHERE `'.$this->_FieldGroup.'`=\''.$group.'\' ';
142
		$sql  = 'SET @c:=0;'."\n";
143
		$this->_DB->query($sql);
144
		$sql .= 'UPDATE `'.$this->_Table.'` SET `'.$this->_FieldOrder.'`=(@c:=@c+1) ';
145
		$sql .= 'WHERE `'.$this->_FieldGroup.'`='.$group.' ';
145 146
		$sql .= 'ORDER BY `'.$this->_FieldOrder.'` ASC;';
146 147
		return $this->_DB->query($sql);
147 148
	}

Also available in: Unified diff