Use of deprecated function db_fetch_object().
views_datasource/views/theme/views_views_rdf_style.theme.inc
LINE 435 -- Deprecated function
.
.
$roles = array();
$roles_query = db_query("SELECT r.name AS name, r.rid AS rid FROM {users_roles} ur, {role} r WHERE ur.uid = %d AND ur.rid = r.rid", $user["uid"]);
while ($role = db_fetch_object($roles_query)) {
$roles[$role->rid] = $role->name;
}
.
.
LINE 468 -- Deprecated function
.
.
/* Add taxonomy terms as SIOC topics */
$query = db_query('SELECT tn.tid AS tid, td.name AS name FROM {term_node} tn, {term_data} td WHERE td.tid = tn.tid AND tn.nid = %d', $nid);
while ($term = db_fetch_object($query)) {
$taxonomy_terms = " <sioc:topic rdfs:label=\"$term->name\" rdf:resource=\"" . url("taxonomy/term/$term->tid", array('absolute' => TRUE)) . "\" />\n";
}
.
.
LINE 482 -- Deprecated function
.
.
$result = db_query($query, $query_args);
while ($comment = db_fetch_object($result)) {
$comment = drupal_unpack($comment);
}
views_datasource/views/theme/views-views-rdf-style-sioc.tpl.php (line:64)
$roles = array();
$roles_query = db_query("SELECT r.name AS name, r.rid AS rid FROM {users_roles} ur, {role} r WHERE ur.uid = %d AND ur.rid = r.rid", $uid);
while ($role = db_fetch_object($roles_query)) {
$roles[$role->rid] = $role->name;
}
Comments
Comment #2
chaseonthewebCan you elaborate how it's a security issue? Function
db_fetch_objectwas removed from Drupal 7.x, and so the SIOC formatter of views_rdf.module is probably broken, but that's a runtime error.Comment #3
sachint1996 commentedComment #4
sachint1996 commentedUpdated the issue to use of deprecated function db_fetch_object(). Apologies for the confusion.
Comment #5
sachint1996 commentedComment #6
sachint1996 commentedComment #7
shashwat purav commentedThe patch in #5 applied successfully to 7.x-1.x branch.