mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #32015
[Bug 1525736] Re: update_record() doesn't allow for a column listed in the 'where' object to be updated
In fact, my proposal for how to change update_record(), is pretty much
already hinted at by the description at the top of the function:
* @param mixed $where defines the WHERE part of the upgrade. Can be string (key) or array (keys) or hash (keys/values).
* If the first two, values are expected to be in $dataobject.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1525736
Title:
update_record() doesn't allow for a column listed in the 'where'
object to be updated
Status in Mahara:
New
Bug description:
If I have a where object like:
stdClass Object (
[localusr] => 11
[authinstance] => 2
)
And data object like:
stdClass Object (
[remoteusername] => 'null@xxxxxxxx'
[authinstance] => 4
[localusr] => 11
)
It will only update the remoteusername and not the authinstance as
well?
The reason for this is that inside update_record() is a foreach loop
to remove any data fields if they match where fields
But we probably don't need to do that.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1525736/+subscriptions
References