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
63814764
Commit
63814764
authored
Jul 12, 2001
by
Dries
Browse files
- Two small bugfixes.
parent
b885ccb8
Changes
5
Hide whitespace changes
Inline
Side-by-side
modules/aggregator.module
View file @
63814764
...
...
@@ -105,10 +105,10 @@ function import_feed_block($feed) {
}
function
import_block
()
{
return
import_
block
_bundle
();
return
import_
get
_bundle
s
();
}
function
import_
block
_bundle
(
$attributes
=
0
)
{
function
import_
get
_bundle
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
...
...
@@ -131,7 +131,6 @@ function import_block_bundle($attributes = 0) {
while
(
$bundle
=
db_fetch_object
(
$result
))
{
$i
++
;
$blocks
[
$i
][
subject
]
=
format_url
(
"module.php?mod=import&op=bundle&id=
$bundle->bid
"
,
$bundle
->
title
);
$blocks
[
$i
][
content
]
=
import_bundle_block
(
$bundle
->
attributes
);
$blocks
[
$i
][
info
]
=
"
$bundle->title
bundle"
;
...
...
@@ -140,15 +139,15 @@ function import_block_bundle($attributes = 0) {
return
$blocks
;
}
function
import_
block
_feed
(
$attributes
=
0
)
{
function
import_
get
_feed
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
foreach
(
$keys
as
$key
)
$where
[]
=
"attributes LIKE '%"
.
trim
(
$key
)
.
"%'"
;
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
"
);
}
else
{
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
"
);
}
$i
=
0
;
...
...
@@ -505,16 +504,16 @@ function import_page_bundle($bid) {
}
function
import_page_bundles
()
{
import_page_blocks
(
import_
block
_bundle
());
import_page_blocks
(
import_
get
_bundle
s
());
}
function
import_page_feeds
()
{
import_page_blocks
(
import_
block
_feed
());
import_page_blocks
(
import_
get
_feed
s
());
}
function
import_page_bundle_feeds
(
$bid
)
{
$bundle
=
db_fetch_object
(
db_query
(
"SELECT * FROM bundle WHERE bid = '"
.
check_input
(
$bid
)
.
"'"
));
import_page_blocks
(
import_
block
_feed
(
$bundle
->
attributes
));
import_page_blocks
(
import_
get
_feed
s
(
$bundle
->
attributes
));
}
function
import_page_blocks
(
$blocks
)
{
...
...
modules/aggregator/aggregator.module
View file @
63814764
...
...
@@ -105,10 +105,10 @@ function import_feed_block($feed) {
}
function
import_block
()
{
return
import_
block
_bundle
();
return
import_
get
_bundle
s
();
}
function
import_
block
_bundle
(
$attributes
=
0
)
{
function
import_
get
_bundle
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
...
...
@@ -131,7 +131,6 @@ function import_block_bundle($attributes = 0) {
while
(
$bundle
=
db_fetch_object
(
$result
))
{
$i
++
;
$blocks
[
$i
][
subject
]
=
format_url
(
"module.php?mod=import&op=bundle&id=
$bundle->bid
"
,
$bundle
->
title
);
$blocks
[
$i
][
content
]
=
import_bundle_block
(
$bundle
->
attributes
);
$blocks
[
$i
][
info
]
=
"
$bundle->title
bundle"
;
...
...
@@ -140,15 +139,15 @@ function import_block_bundle($attributes = 0) {
return
$blocks
;
}
function
import_
block
_feed
(
$attributes
=
0
)
{
function
import_
get
_feed
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
foreach
(
$keys
as
$key
)
$where
[]
=
"attributes LIKE '%"
.
trim
(
$key
)
.
"%'"
;
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
"
);
}
else
{
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
"
);
}
$i
=
0
;
...
...
@@ -505,16 +504,16 @@ function import_page_bundle($bid) {
}
function
import_page_bundles
()
{
import_page_blocks
(
import_
block
_bundle
());
import_page_blocks
(
import_
get
_bundle
s
());
}
function
import_page_feeds
()
{
import_page_blocks
(
import_
block
_feed
());
import_page_blocks
(
import_
get
_feed
s
());
}
function
import_page_bundle_feeds
(
$bid
)
{
$bundle
=
db_fetch_object
(
db_query
(
"SELECT * FROM bundle WHERE bid = '"
.
check_input
(
$bid
)
.
"'"
));
import_page_blocks
(
import_
block
_feed
(
$bundle
->
attributes
));
import_page_blocks
(
import_
get
_feed
s
(
$bundle
->
attributes
));
}
function
import_page_blocks
(
$blocks
)
{
...
...
modules/blog.module
View file @
63814764
...
...
@@ -97,7 +97,7 @@ function blog_page_day($userid = 0, $date = 0) {
$output
.
=
"<p>"
.
blog_format_link
(
$blog
)
.
check_output
(
$blog
->
body
,
1
)
.
"</p>
\n
"
;
}
if
(
$userid
==
$user
->
userid
)
{
if
(
$user
->
id
&&
$user
->
userid
==
$userid
)
{
$output
.
=
"<p>[ <a href=
\"
submit.php?mod=blog&op=edit&id=
$first
\"
>"
.
t
(
"edit"
)
.
"</a> ]</p>"
;
}
...
...
@@ -122,7 +122,7 @@ function blog_format_link($blog) {
global
$user
;
if
(
$user
&&
user_access
(
"post blogs"
))
{
return
"<a href=
\"
submit.php?mod=blog&type=blog&id=
$blog->nid
\"
><img src=
\"
misc/blog.gif
\"
border=
\"
0
\"
width=
\"
12
\"
height=
\"
16
\"
alt=
\"
"
.
t
(
"Blog this item"
)
.
"
\"
></a>"
;
return
"<a href=
\"
submit.php?mod=blog&type=blog&id=
$blog->nid
\"
><img src=
\"
misc/blog.gif
\"
border=
\"
0
\"
width=
\"
12
\"
height=
\"
16
\"
alt=
\"
"
.
t
(
"Blog this item"
)
.
"
\"
></a>
"
;
}
}
...
...
@@ -148,7 +148,7 @@ function blog_form($edit = array()) {
global
$REQUEST_URI
,
$id
,
$mod
,
$type
,
$user
,
$theme
;
if
(
$user
->
id
)
{
if
(
$mod
==
"node"
||
$edit
[
type
]
==
"blog"
)
{
}
else
if
(
$type
==
"blog"
)
{
...
...
@@ -165,12 +165,12 @@ function blog_form($edit = array()) {
if
(
$edit
[
title
])
{
$form
.
=
blog_view
(
new
Blog
(
node_preview
(
$edit
)));
}
$form
.
=
form_textfield
(
t
(
"Subject"
),
"title"
,
$edit
[
"title"
],
50
,
64
);
$form
.
=
form_textarea
(
t
(
"Body"
),
"body"
,
$edit
[
"body"
],
70
,
15
,
t
(
"Allowed HTML tags"
)
.
": "
.
htmlspecialchars
(
variable_get
(
"allowed_html"
,
""
)));
$form
.
=
form_hidden
(
"type"
,
"blog"
);
if
(
$edit
[
"nid"
]
>
0
)
{
$form
.
=
form_hidden
(
"nid"
,
$edit
[
"nid"
]);
}
...
...
@@ -187,9 +187,9 @@ function blog_form($edit = array()) {
$form
.
=
form_submit
(
t
(
"Preview"
));
$form
.
=
form_submit
(
t
(
"Submit"
));
}
$output
.
=
form
(
$REQUEST_URI
,
$form
);
return
$output
;
}
else
{
...
...
modules/blog/blog.module
View file @
63814764
...
...
@@ -97,7 +97,7 @@ function blog_page_day($userid = 0, $date = 0) {
$output
.
=
"<p>"
.
blog_format_link
(
$blog
)
.
check_output
(
$blog
->
body
,
1
)
.
"</p>
\n
"
;
}
if
(
$userid
==
$user
->
userid
)
{
if
(
$user
->
id
&&
$user
->
userid
==
$userid
)
{
$output
.
=
"<p>[ <a href=
\"
submit.php?mod=blog&op=edit&id=
$first
\"
>"
.
t
(
"edit"
)
.
"</a> ]</p>"
;
}
...
...
@@ -122,7 +122,7 @@ function blog_format_link($blog) {
global
$user
;
if
(
$user
&&
user_access
(
"post blogs"
))
{
return
"<a href=
\"
submit.php?mod=blog&type=blog&id=
$blog->nid
\"
><img src=
\"
misc/blog.gif
\"
border=
\"
0
\"
width=
\"
12
\"
height=
\"
16
\"
alt=
\"
"
.
t
(
"Blog this item"
)
.
"
\"
></a>"
;
return
"<a href=
\"
submit.php?mod=blog&type=blog&id=
$blog->nid
\"
><img src=
\"
misc/blog.gif
\"
border=
\"
0
\"
width=
\"
12
\"
height=
\"
16
\"
alt=
\"
"
.
t
(
"Blog this item"
)
.
"
\"
></a>
"
;
}
}
...
...
@@ -148,7 +148,7 @@ function blog_form($edit = array()) {
global
$REQUEST_URI
,
$id
,
$mod
,
$type
,
$user
,
$theme
;
if
(
$user
->
id
)
{
if
(
$mod
==
"node"
||
$edit
[
type
]
==
"blog"
)
{
}
else
if
(
$type
==
"blog"
)
{
...
...
@@ -165,12 +165,12 @@ function blog_form($edit = array()) {
if
(
$edit
[
title
])
{
$form
.
=
blog_view
(
new
Blog
(
node_preview
(
$edit
)));
}
$form
.
=
form_textfield
(
t
(
"Subject"
),
"title"
,
$edit
[
"title"
],
50
,
64
);
$form
.
=
form_textarea
(
t
(
"Body"
),
"body"
,
$edit
[
"body"
],
70
,
15
,
t
(
"Allowed HTML tags"
)
.
": "
.
htmlspecialchars
(
variable_get
(
"allowed_html"
,
""
)));
$form
.
=
form_hidden
(
"type"
,
"blog"
);
if
(
$edit
[
"nid"
]
>
0
)
{
$form
.
=
form_hidden
(
"nid"
,
$edit
[
"nid"
]);
}
...
...
@@ -187,9 +187,9 @@ function blog_form($edit = array()) {
$form
.
=
form_submit
(
t
(
"Preview"
));
$form
.
=
form_submit
(
t
(
"Submit"
));
}
$output
.
=
form
(
$REQUEST_URI
,
$form
);
return
$output
;
}
else
{
...
...
modules/import.module
View file @
63814764
...
...
@@ -105,10 +105,10 @@ function import_feed_block($feed) {
}
function
import_block
()
{
return
import_
block
_bundle
();
return
import_
get
_bundle
s
();
}
function
import_
block
_bundle
(
$attributes
=
0
)
{
function
import_
get
_bundle
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
...
...
@@ -131,7 +131,6 @@ function import_block_bundle($attributes = 0) {
while
(
$bundle
=
db_fetch_object
(
$result
))
{
$i
++
;
$blocks
[
$i
][
subject
]
=
format_url
(
"module.php?mod=import&op=bundle&id=
$bundle->bid
"
,
$bundle
->
title
);
$blocks
[
$i
][
content
]
=
import_bundle_block
(
$bundle
->
attributes
);
$blocks
[
$i
][
info
]
=
"
$bundle->title
bundle"
;
...
...
@@ -140,15 +139,15 @@ function import_block_bundle($attributes = 0) {
return
$blocks
;
}
function
import_
block
_feed
(
$attributes
=
0
)
{
function
import_
get
_feed
s
(
$attributes
=
0
)
{
if
(
$attributes
)
{
$keys
=
explode
(
","
,
$attributes
);
foreach
(
$keys
as
$key
)
$where
[]
=
"attributes LIKE '%"
.
trim
(
$key
)
.
"%'"
;
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed WHERE "
.
implode
(
" OR "
,
$where
)
.
" ORDER BY fid
"
);
}
else
{
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
LIMIT "
.
variable_get
(
"import_block_limit"
,
15
)
);
$result
=
db_query
(
"SELECT * FROM feed ORDER BY fid
"
);
}
$i
=
0
;
...
...
@@ -505,16 +504,16 @@ function import_page_bundle($bid) {
}
function
import_page_bundles
()
{
import_page_blocks
(
import_
block
_bundle
());
import_page_blocks
(
import_
get
_bundle
s
());
}
function
import_page_feeds
()
{
import_page_blocks
(
import_
block
_feed
());
import_page_blocks
(
import_
get
_feed
s
());
}
function
import_page_bundle_feeds
(
$bid
)
{
$bundle
=
db_fetch_object
(
db_query
(
"SELECT * FROM bundle WHERE bid = '"
.
check_input
(
$bid
)
.
"'"
));
import_page_blocks
(
import_
block
_feed
(
$bundle
->
attributes
));
import_page_blocks
(
import_
get
_feed
s
(
$bundle
->
attributes
));
}
function
import_page_blocks
(
$blocks
)
{
...
...
Write
Preview
Supports
Markdown
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