Issue Details (XML | Word | Printable)

Key: MDL-16669
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14679

Make sql_substr() to accept parameters instead of simply returning function name

Created: 25/Sep/08 05:27 AM   Updated: 29/Oct/08 04:09 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7) and Petr Skoda
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 29/Oct/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Until Moodle 2.0, the sql_substr() helper function (dmllib), is used without parameters at simply returns the "substring" function used for each DB.

Change this behaviour so it will look like:

$DB->sql_substr(string, from, len)

with len being optional.

- Implement it in new moodle_databases.
- Document it.
- Look for wrong usages in core.
- Add some tests, with and without len.

Ciao :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda committed 13 files to 'Moodle CVS' - 29/Oct/08 12:11 AM
Mitsuhiro Yoshida committed 5 files to 'Lang CVS' - 29/Oct/08 12:55 AM
MDL-16669 Translated a new string for debug.
MDL-16996 Translated new strings for error messages.
MDL-15352 Translated a new string for repository remote Moodle.
MDL-16975 Translated new strings for xmldb.
MODIFY ja_utf8/xmldb.php   Rev. 1.20    (+12 -3 lines)
MODIFY ja_utf8/debug.php   Rev. 1.17    (+2 -1 lines)
MODIFY ja_utf8/error.php   Rev. 1.98    (+3 -1 lines)
MODIFY ja_utf8/README   Rev. 1.853    (+1 -1 lines)
MODIFY ja_utf8/repository_remotemoodle.php   Rev. 1.5    (+1 -0 lines)
Eloy Lafuente (stronk7) committed 1 file to 'Moodle CVS' - 29/Oct/08 02:57 AM
Missing parenthesis in sql_substr(). MDL-16669
MODIFY lib/dml/moodle_database.php   Rev. 1.59    (+2 -2 lines)
martignoni committed 1 file to 'Lang CVS' - 16/Nov/08 05:36 AM
MDL-16669 string added
MODIFY fr_utf8/debug.php   Rev. 1.17    (+2 -1 lines)