Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
891cad97
Commit
891cad97
authored
May 02, 2002
by
Kjartan
Browse files
- clearing extra spaces from user.module.
- patching weblogs.module.
parent
c36dd7cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
891cad97
...
...
@@ -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
);
...
...
modules/user/user.module
View file @
891cad97
...
...
@@ -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
);
...
...
modules/weblogs.module
View file @
891cad97
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment