Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
fb52c666
Commit
fb52c666
authored
14 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
coding style cleanup in lib/exe/detail.php
parent
658296ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/exe/detail.php
+33
-41
33 additions, 41 deletions
lib/exe/detail.php
with
33 additions
and
41 deletions
lib/exe/detail.php
+
33
−
41
View file @
fb52c666
<?php
if
(
!
defined
(
'DOKU_INC'
))
define
(
'DOKU_INC'
,
dirname
(
__FILE__
)
.
'/../../'
);
define
(
'DOKU_MEDIADETAIL'
,
1
);
require_once
(
DOKU_INC
.
'inc/init.php'
);
//close session
session_write_close
();
$IMG
=
getID
(
'media'
);
$ID
=
cleanID
(
$_REQUEST
[
'id'
]);
if
(
$conf
[
'allowdebug'
]
&&
$_REQUEST
[
'debug'
]){
print
'<pre>'
;
foreach
(
explode
(
' '
,
'basedir userewrite baseurl useslash'
)
as
$x
){
print
'$'
.
"conf['
$x
'] = '"
.
$conf
[
$x
]
.
"';
\n
"
;
}
foreach
(
explode
(
' '
,
'DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '
.
'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED'
)
as
$x
){
print
'$'
.
"_SERVER['
$x
'] = '"
.
$_SERVER
[
$x
]
.
"';
\n
"
;
}
print
"getID('media'): "
.
getID
(
'media'
)
.
"
\n
"
;
print
"getID('media',false): "
.
getID
(
'media'
,
false
)
.
"
\n
"
;
print
'</pre>'
;
}
$ERROR
=
false
;
// check image permissions
$AUTH
=
auth_quickaclcheck
(
$IMG
);
if
(
$AUTH
>=
AUTH_READ
){
if
(
!
defined
(
'DOKU_INC'
))
define
(
'DOKU_INC'
,
dirname
(
__FILE__
)
.
'/../../'
);
define
(
'DOKU_MEDIADETAIL'
,
1
);
require_once
(
DOKU_INC
.
'inc/init.php'
);
//close session
session_write_close
();
$IMG
=
getID
(
'media'
);
$ID
=
cleanID
(
$_REQUEST
[
'id'
]);
if
(
$conf
[
'allowdebug'
]
&&
$_REQUEST
[
'debug'
]){
print
'<pre>'
;
foreach
(
explode
(
' '
,
'basedir userewrite baseurl useslash'
)
as
$x
){
print
'$'
.
"conf['
$x
'] = '"
.
$conf
[
$x
]
.
"';
\n
"
;
}
foreach
(
explode
(
' '
,
'DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '
.
'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED'
)
as
$x
){
print
'$'
.
"_SERVER['
$x
'] = '"
.
$_SERVER
[
$x
]
.
"';
\n
"
;
}
print
"getID('media'): "
.
getID
(
'media'
)
.
"
\n
"
;
print
"getID('media',false): "
.
getID
(
'media'
,
false
)
.
"
\n
"
;
print
'</pre>'
;
}
$ERROR
=
false
;
// check image permissions
$AUTH
=
auth_quickaclcheck
(
$IMG
);
if
(
$AUTH
>=
AUTH_READ
){
// check if image exists
$SRC
=
mediaFN
(
$IMG
);
if
(
!@
file_exists
(
$SRC
)){
//doesn't exist!
//doesn't exist!
}
}
else
{
}
else
{
// no auth
$ERROR
=
p_locale_xhtml
(
'denied'
);
}
/*if(!$ERROR){
// load EXIF/IPTC/image details
$INFO = array();
$INFO['std']['']
imagesize
}*/
}
//start output and load template
header
(
'Content-Type: text/html; charset=utf-8'
);
include
(
template
(
'detail.php'
));
//start output and load template
header
(
'Content-Type: text/html; charset=utf-8'
);
include
(
template
(
'detail.php'
));
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment