Commit 310515fb authored by Peter Spicer's avatar Peter Spicer
Browse files

Rewording a comment to be more descriptive.

behatnotneeded

Change-Id: Ied6c3f8b6cf5fcb6fac6ba1edf6f2d9ba1c8d3ee
parent 35171f67
......@@ -3050,13 +3050,13 @@ class View {
private function shuffle_helper($field, $direction, $operator, $value, $extrawhere='', $extravalues='') {
// doing this with execute_sql rather than set_field and friends because of
// adodb retardedly trying to make "order"+1 and friends into a string
// I couldn't find a way to shift a bunch of rows in step even with set constraints deferred.
// the two options I found were to move them all out of range (eg start at max +1) and then back again
// or move them into negative and back into positive (Grant's suggestion) which I like more.
/*
* We need to use execute_sql here because ADODB naturally
* wants to convert "order+1" into string fields.
*
* Additionally, we need to move a set of rows in step, and
* sign-switching is one way to do that without violating constraints.
*/
if (empty($extrawhere)) {
$extrawhere = '';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment