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
7c05eaa9
Commit
7c05eaa9
authored
Jun 11, 2006
by
drumm
Browse files
#66662
by stefan nagtegaal, Remove PHP notices
parent
24d04502
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/upload.module
View file @
7c05eaa9
...
...
@@ -45,7 +45,7 @@ function upload_link($type, $node = 0, $main = 0) {
$links
=
array
();
// Display a link with the number of attachments
if
(
$main
&&
$type
==
'node'
&&
is
_array
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
if
(
$main
&&
$type
==
'node'
&&
is
set
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
$num_files
=
0
;
foreach
(
$node
->
files
as
$file
)
{
if
(
$file
->
list
)
{
...
...
@@ -81,7 +81,7 @@ function upload_menu($may_cache) {
}
else
{
// Add handlers for previewing new uploads.
if
(
$_SESSION
[
'file_previews'
])
{
if
(
isset
(
$_SESSION
[
'file_previews'
])
)
{
foreach
(
$_SESSION
[
'file_previews'
]
as
$fid
=>
$file
)
{
$filename
=
file_create_filename
(
$file
->
filename
,
file_create_path
());
if
(
variable_get
(
'file_downloads'
,
FILE_DOWNLOADS_PUBLIC
)
==
FILE_DOWNLOADS_PRIVATE
)
{
...
...
@@ -405,8 +405,8 @@ function upload_nodeapi(&$node, $op, $teaser) {
case
'load'
:
if
(
variable_get
(
"upload_
$node->type
"
,
1
)
==
1
)
{
$output
[
'files'
]
=
upload_load
(
$node
);
return
$output
;
}
return
$output
;
break
;
case
'prepare'
:
...
...
@@ -418,7 +418,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
break
;
case
'view'
:
if
(
is
_array
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
if
(
is
set
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
// Manipulate so that inline references work in preview
if
(
!
variable_get
(
'clean_url'
,
0
))
{
$previews
=
array
();
...
...
modules/upload/upload.module
View file @
7c05eaa9
...
...
@@ -45,7 +45,7 @@ function upload_link($type, $node = 0, $main = 0) {
$links
=
array
();
// Display a link with the number of attachments
if
(
$main
&&
$type
==
'node'
&&
is
_array
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
if
(
$main
&&
$type
==
'node'
&&
is
set
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
$num_files
=
0
;
foreach
(
$node
->
files
as
$file
)
{
if
(
$file
->
list
)
{
...
...
@@ -81,7 +81,7 @@ function upload_menu($may_cache) {
}
else
{
// Add handlers for previewing new uploads.
if
(
$_SESSION
[
'file_previews'
])
{
if
(
isset
(
$_SESSION
[
'file_previews'
])
)
{
foreach
(
$_SESSION
[
'file_previews'
]
as
$fid
=>
$file
)
{
$filename
=
file_create_filename
(
$file
->
filename
,
file_create_path
());
if
(
variable_get
(
'file_downloads'
,
FILE_DOWNLOADS_PUBLIC
)
==
FILE_DOWNLOADS_PRIVATE
)
{
...
...
@@ -405,8 +405,8 @@ function upload_nodeapi(&$node, $op, $teaser) {
case
'load'
:
if
(
variable_get
(
"upload_
$node->type
"
,
1
)
==
1
)
{
$output
[
'files'
]
=
upload_load
(
$node
);
return
$output
;
}
return
$output
;
break
;
case
'prepare'
:
...
...
@@ -418,7 +418,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
break
;
case
'view'
:
if
(
is
_array
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
if
(
is
set
(
$node
->
files
)
&&
user_access
(
'view uploaded files'
))
{
// Manipulate so that inline references work in preview
if
(
!
variable_get
(
'clean_url'
,
0
))
{
$previews
=
array
();
...
...
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