Commit 891cad97 authored by Kjartan's avatar Kjartan

- clearing extra spaces from user.module.

- patching weblogs.module.
parent c36dd7cf
......@@ -217,7 +217,7 @@ function user_access($string) {
** To reduce the number of SQL queries, we cache the user's permissions
** in a static variable.
*/
if (!$perm) {
if ($user->uid) {
$perm = db_result(db_query("SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = '$user->role'"), 0);
......
......@@ -217,7 +217,7 @@ function user_access($string) {
** To reduce the number of SQL queries, we cache the user's permissions
** in a static variable.
*/
if (!$perm) {
if ($user->uid) {
$perm = db_result(db_query("SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = '$user->role'"), 0);
......
......@@ -14,9 +14,9 @@ function weblogs_help() {
function weblogs_cron() {
if (variable_get("weblogs_ping", 0) && variable_get("site_name", 0) && variable_get("site_url", 0)) {
if (variable_get("weblogs_ping", 0) && variable_get("site_name", 0) && variable_get("site_slogan", 0)) {
if (db_num_rows(db_query("SELECT nid FROM node WHERE status = 1 AND moderate = 0 AND (created > '". variable_get("weblogs_cron_last", time()) ."' OR changed > '". variable_get("weblogs_cron_last", time()) ."')"), 1)) {
weblogs_notify(variable_get("site_name", "") ." - ". variable_get("site_slogan", ""), variable_get("site_url", ""));
weblogs_notify(variable_get("site_name", "") ." - ". variable_get("site_slogan", ""), path_uri());
}
variable_set("weblogs_cron_last", time());
......
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