Skip to content

Commit

Permalink
Bug 1716 fixed : Check upgrades failed in intro
Browse files Browse the repository at this point in the history
Incorrect use of database dependant functions.
Fixed same problem for ws functions

git-svn-id: http://piwigo.org/svn/trunk@6500 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 9, 2010
1 parent ad676ee commit a629994
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/ws_functions.inc.php
Expand Up @@ -1143,7 +1143,7 @@ function ws_images_addFile($params, &$service)
FROM '.IMAGES_TABLE.'
WHERE id = '.$params['image_id'].'
;';
list($file_path, $original_sum) = mysql_fetch_row(pwg_query($query));
list($file_path, $original_sum) = pwg_db_fetch_row(pwg_query($query));

// TODO only files added with web API can be updated with web API

Expand Down Expand Up @@ -1712,10 +1712,10 @@ function ws_images_checkFiles($params, &$service)
WHERE id = '.$params['image_id'].'
;';
$result = pwg_query($query);
if (mysql_num_rows($result) == 0) {
if (pwg_db_num_rows($result) == 0) {
return new PwgError(404, "image_id not found");
}
list($path) = mysql_fetch_row($result);
list($path) = pwg_db_fetch_row($result);

$ret = array();

Expand Down
4 changes: 2 additions & 2 deletions plugins/c13y_upgrade/initialize.inc.php
Expand Up @@ -50,7 +50,7 @@ function c13y_upgrade($c13y)
limit 0,1
;';

if (mysql_fetch_array(pwg_query($query)))
if (pwg_db_fetch_array(pwg_query($query)))
{
$to_deactivate = false;
$c13y->add_anomaly(
Expand Down Expand Up @@ -80,7 +80,7 @@ function c13y_upgrade($c13y)
;';

$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
while ($row = pwg_db_fetch_assoc($result))
{
$to_deactivate = false;

Expand Down

0 comments on commit a629994

Please sign in to comment.