function uc_catalog_update_4 in Ubercart 5
File
- uc_catalog/
uc_catalog.install, line 115
Code
function uc_catalog_update_4() {
$ret = array();
$result = db_query("SELECT rid FROM {permission} WHERE perm NOT LIKE '%%%s%%'", 'view catalog');
while ($role = db_fetch_object($result)) {
$sql_result = db_query("UPDATE {permission} SET perm = CONCAT_WS(', ', perm, 'view catalog') WHERE rid = %d", $role->rid);
$ret[] = array(
'success' => $sql_result !== FALSE,
'query' => "UPDATE {permission} SET perm = CONCAT_WS(', ', perm, 'view catalog') WHERE rid = " . $role->rid,
);
}
return $ret;
}