Aleksander Machniak
2013-12-08 029f7a157da4be15302b3eaf40232c110d27bcf1
Clarify update() result description, return boolean when ID didn't change
2 files modified
6 ■■■■■ changed files
program/lib/Roundcube/rcube_addressbook.php 3 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_contacts.php 3 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_addressbook.php
@@ -281,7 +281,8 @@
     * @param array Assoziative array with save data
     *  Keys:   Field name with optional section in the form FIELD:SECTION
     *  Values: Field value. Can be either a string or an array of strings for multiple values
     * @return boolean True on success, False on error
     *
     * @return mixed On success if ID has been changed returns ID, otherwise True, False on error
     */
    function update($id, $save_cols)
    {
program/lib/Roundcube/rcube_contacts.php
@@ -655,6 +655,7 @@
     *
     * @param mixed Record identifier
     * @param array Assoziative array with save data
     *
     * @return boolean True on success, False on error
     */
    function update($id, $save_cols)
@@ -683,7 +684,7 @@
            $this->result = null;  // clear current result (from get_record())
        }
        return $updated;
        return $updated ? true : false;
    }