Commit 099a6546 authored by mfer's avatar mfer

Updated to fix issues with OG

parent aa6bc384
......@@ -65,7 +65,7 @@ function bloginfo_block($op = 'list', $delta = 0) {
*/
function bloginfo_form_bloginfo($edit, $account, $category) {
if ($category == 'account' && is_numeric(arg(1)) && (user_access('edit own bloginfo') || user_access('administer bloginfo'))) {
$result = db_query(db_rewrite_sql('SELECT b.title, b.description FROM {bloginfo} b WHERE b.uid = %d', 'b'), arg(1));
$result = db_query('SELECT title, description FROM {bloginfo} WHERE uid = %d', arg(1));
while ($bloginfo = db_fetch_object($result)) {
$mybloginfo['title'] = $bloginfo->title;
$mybloginfo['description'] = $bloginfo->description;
......@@ -94,10 +94,10 @@ function bloginfo_form_bloginfo($edit, $account, $category) {
* Helper function: insert bloginfo into the database
*/
function bloginfo_save_bloginfo(&$edit, &$user) {
$results = db_query(db_rewrite_sql('SELECT b.uid FROM {bloginfo} b WHERE b.uid = %d', 'b'), arg(1));
$results = db_query('SELECT uid FROM {bloginfo} WHERE uid = %d', arg(1));
//This is to update where info already exists in the database
if (mysql_num_rows($results) == 1){
if (db_num_rows($results) == 1){
db_query("Update {bloginfo} SET title = \"%s\", description = \"%s\" WHERE uid = %d", $edit['Title'], $edit['Description'], arg(1));
}
......@@ -107,4 +107,4 @@ function bloginfo_save_bloginfo(&$edit, &$user) {
}
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment