Feature 1244 resolved

Replace all mysql functions in core code by ones independant of database engine

Fix small php code synxtax : hash must be accessed with [ ] and not { }.

git-svn-id: http://piwigo.org/svn/trunk@4325 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
nikrou
2009-11-20 14:17:04 +00:00
parent c020cd0d7c
commit 924dd262ec
78 changed files with 789 additions and 691 deletions
+6 -6
View File
@@ -193,7 +193,7 @@ SELECT *
FROM '.CATEGORIES_TABLE.'
WHERE id = '.$_GET['cat_id'].'
;';
$category = mysql_fetch_assoc( pwg_query( $query ) );
$category = pwg_db_fetch_assoc( pwg_query( $query ) );
// nullable fields
foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
{
@@ -210,7 +210,7 @@ $query = 'SELECT DISTINCT category_id
WHERE category_id = '.$_GET['cat_id'].'
LIMIT 1';
$result = pwg_query($query);
$category['has_images'] = mysql_num_rows($result)>0 ? true : false;
$category['has_images'] = pwg_db_num_rows($result)>0 ? true : false;
// Navigation path
$navigation = get_cat_display_name_cache(
@@ -373,7 +373,7 @@ SELECT id,tn_ext,path
FROM '.IMAGES_TABLE.'
WHERE id = '.$category['representative_picture_id'].'
;';
$row = mysql_fetch_assoc(pwg_query($query));
$row = pwg_db_fetch_assoc(pwg_query($query));
$src = get_thumbnail_url($row);
$url = get_root_url().'admin.php?page=picture_modify';
$url.= '&image_id='.$category['representative_picture_id'];
@@ -461,9 +461,9 @@ SELECT id, file, path, tn_ext
;';
$result = pwg_query($query);
if (mysql_num_rows($result) > 0)
if (pwg_db_num_rows($result) > 0)
{
$element = mysql_fetch_assoc($result);
$element = pwg_db_fetch_assoc($result);
$img_url = '<a href="'.
make_picture_url(array(
@@ -511,7 +511,7 @@ SELECT
FROM '.GROUPS_TABLE.'
WHERE id = '.$_POST['group'].'
;';
list($group_name) = mysql_fetch_row(pwg_query($query));
list($group_name) = pwg_db_fetch_row(pwg_query($query));
array_push(
$page['infos'],