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
9afe4dbf
Commit
9afe4dbf
authored
20 years ago
by
jan
Browse files
Options
Downloads
Patches
Plain Diff
Replace .* files by _*
darcs-hash:20050330095025-45605-5b5e82865c7fba8e88c43511ae4bf28ebf334d1b.gz
parent
2120eac4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
inc/auth.php
+2
-2
2 additions, 2 deletions
inc/auth.php
inc/common.php
+1
-1
1 addition, 1 deletion
inc/common.php
inc/format.php
+8
-8
8 additions, 8 deletions
inc/format.php
inc/io.php
+2
-2
2 additions, 2 deletions
inc/io.php
with
13 additions
and
13 deletions
inc/auth.php
+
2
−
2
View file @
9afe4dbf
...
...
@@ -143,7 +143,7 @@ function auth_browseruid(){
* Creates a random key to encrypt the password in cookies
*
* This function tries to read the password for encrypting
* cookies from $conf['datadir'].'/
.
cache/
.
htcookiesalt'
* cookies from $conf['datadir'].'/
_
cache/
_
htcookiesalt'
* if no such file is found a random key is created and
* and stored in this file.
*
...
...
@@ -153,7 +153,7 @@ function auth_browseruid(){
*/
function
auth_cookiesalt
(){
global
$conf
;
$file
=
$conf
[
'datadir'
]
.
'/
.
cache/
.
htcookiesalt'
;
$file
=
$conf
[
'datadir'
]
.
'/
_
cache/
_
htcookiesalt'
;
$salt
=
io_readFile
(
$file
);
if
(
empty
(
$salt
)){
$salt
=
uniqid
(
rand
(),
true
);
...
...
This diff is collapsed.
Click to expand it.
inc/common.php
+
1
−
1
View file @
9afe4dbf
...
...
@@ -712,7 +712,7 @@ function saveWikiText($id,$text,$summary){
//purge cache on add by updating the purgefile
if
(
$conf
[
'purgeonadd'
]
&&
(
!
$old
||
$del
)){
io_saveFile
(
$conf
[
'datadir'
]
.
'/
.
cache/purgefile'
,
time
());
io_saveFile
(
$conf
[
'datadir'
]
.
'/
_
cache/purgefile'
,
time
());
}
}
...
...
This diff is collapsed.
Click to expand it.
inc/format.php
+
8
−
8
View file @
9afe4dbf
...
...
@@ -486,13 +486,13 @@ function img_cache(&$csrc,&$src,&$w,&$h,$cachemode){
//download external images if allowed
if
(
$isurl
&&
$isimg
&&
$cachemode
!=
'nocache'
){
$cache
=
$conf
[
'mediadir'
]
.
"/
.
cache/
$md5
.
$ext
"
;
$cache
=
$conf
[
'mediadir'
]
.
"/
_
cache/
$md5
.
$ext
"
;
if
(
(
$cachemode
==
'recache'
&&
download
(
$src
,
$cache
))
||
@
file_exists
(
$cache
)
||
download
(
$src
,
$cache
)){
$f
[
'full'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
"/
.
cache/
$md5
.
$ext
"
;
$f
[
'resz'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
"/
.
cache/
$md5
.
$ext
"
;
$f
[
'full'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
"/
.
cache/
$md5
.
$ext
"
;
$f
[
'resz'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
"/
.
cache/
$md5
.
$ext
"
;
$f
[
'full'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
"/
_
cache/
$md5
.
$ext
"
;
$f
[
'resz'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
"/
_
cache/
$md5
.
$ext
"
;
$f
[
'full'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
"/
_
cache/
$md5
.
$ext
"
;
$f
[
'resz'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
"/
_
cache/
$md5
.
$ext
"
;
$isurl
=
false
;
}
}
...
...
@@ -505,15 +505,15 @@ function img_cache(&$csrc,&$src,&$w,&$h,$cachemode){
if
(
!
$h
){
$h
=
round
((
$w
*
$info
[
1
])
/
$info
[
0
]);
}
$cache
=
$conf
[
'mediadir'
]
.
'/
.
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
$cache
=
$conf
[
'mediadir'
]
.
'/
_
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
//delete outdated cachefile
if
(
@
file_exists
(
$cache
)
&&
(
filemtime
(
$cache
)
<
filemtime
(
$f
[
'full'
][
'fs'
]))){
unlink
(
$cache
);
}
//check if a resized cachecopy exists else create one
if
(
@
file_exists
(
$cache
)
||
img_resize
(
$ext
,
$f
[
'full'
][
'fs'
],
$info
[
0
],
$info
[
1
],
$cache
,
$w
,
$h
)){
$f
[
'resz'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
'/
.
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
$f
[
'resz'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
'/
.
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
$f
[
'resz'
][
'web'
]
=
$conf
[
'mediaweb'
]
.
'/
_
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
$f
[
'resz'
][
'fs'
]
=
$conf
[
'mediadir'
]
.
'/
_
cache/'
.
$md5
.
'.'
.
$w
.
'x'
.
$h
.
'.'
.
$ext
;
}
}
else
{
//if no new size was given just return the img size
...
...
This diff is collapsed.
Click to expand it.
inc/io.php
+
2
−
2
View file @
9afe4dbf
...
...
@@ -21,9 +21,9 @@ function io_cacheParse($file){
global
$CACHEGROUP
;
global
$parser
;
//we read parser options
$parsed
=
''
;
$cache
=
$conf
[
'datadir'
]
.
'/
.
cache/'
;
$cache
=
$conf
[
'datadir'
]
.
'/
_
cache/'
;
$cache
.
=
md5
(
$file
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'SERVER_PORT'
]
.
$CACHEGROUP
);
$purge
=
$conf
[
'datadir'
]
.
'/
.
cache/purgefile'
;
$purge
=
$conf
[
'datadir'
]
.
'/
_
cache/purgefile'
;
// check if cache can be used
$cachetime
=
@
filemtime
(
$cache
);
...
...
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