Skip to content

Commit

Permalink
Bug 1715 fixed : SQLite: Add photos fail
Browse files Browse the repository at this point in the history
must use pwg_db_* functions instead of mysql_* ones

git-svn-id: http://piwigo.org/svn/trunk@6498 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 9, 2010
1 parent 6b0aebc commit ad676ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/include/functions_upload.inc.php
Expand Up @@ -26,7 +26,7 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
global $conf;

// current date
list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();'));
list($year, $month, $day) = preg_split('/[^\d]/', $dbnow, 4);

// upload directory hierarchy
Expand Down Expand Up @@ -120,7 +120,7 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
array($insert)
);

$image_id = mysql_insert_id();
$image_id = pwg_db_insert_id();

if (isset($categories) and count($categories) > 0)
{
Expand Down
4 changes: 2 additions & 2 deletions admin/photos_add_direct.php
Expand Up @@ -237,7 +237,7 @@
FROM '.IMAGES_TABLE.'
WHERE id = '.$image_id.'
;';
$image_infos = mysql_fetch_assoc(pwg_query($query));
$image_infos = pwg_db_fetch_assoc(pwg_query($query));

$thumbnail['file'] = $image_infos['file'];

Expand Down Expand Up @@ -297,7 +297,7 @@
FROM '.IMAGE_CATEGORY_TABLE.'
WHERE category_id = '.$category_id.'
;';
list($count) = mysql_fetch_row(pwg_query($query));
list($count) = pwg_db_fetch_row(pwg_query($query));
$category_name = get_cat_display_name_from_id($category_id, 'admin.php?page=cat_modify&cat_id=');

// information
Expand Down

0 comments on commit ad676ee

Please sign in to comment.