Small code cleanup by Falk Doering:

- PHP6 forward compatibility on accessing strings
- Better indenting, other cleanups on the plugin API file
This commit is contained in:
Garvin Hicking
2007-07-17 11:31:20 +00:00
parent 1e846ef160
commit 14f04bd485
18 changed files with 574 additions and 560 deletions
+2 -2
View File
@@ -149,7 +149,7 @@ function serendipity_db_sqlite_fetch_array($res, $type = SQLITE_BOTH)
}
/* strip any slashes, correct fieldname */
foreach ($row as $i => $v) {
foreach ($row AS $i => $v) {
// TODO: If a query of the format 'SELECT a.id, b.text FROM table' is used,
// the sqlite extension will give us key indizes 'a.id' and 'b.text'
// instead of just 'id' and 'text' like in mysql/postgresql extension.
@@ -339,7 +339,7 @@ function serendipity_db_schema_import($query)
}
$query = trim(str_replace($search, $replace, $query));
if ($query{0} == '@') {
if ($query[0] == '@') {
// Errors are expected to happen (like duplicate index creation)
return serendipity_db_query(substr($query, 1), false, 'both', false, false, false, true);
} else {