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
dbb00abc
Commit
dbb00abc
authored
19 years ago
by
Esther Brunner
Browse files
Options
Downloads
Patches
Plain Diff
Namespace filtering for recent changes
darcs-hash:20050830202115-283c4-2a186854aa11e2e6e5a12da39dcd90c8723e2c90.gz
parent
a15ce62d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
feed.php
+5
-5
5 additions, 5 deletions
feed.php
inc/common.php
+5
-9
5 additions, 9 deletions
inc/common.php
inc/html.php
+3
-3
3 additions, 3 deletions
inc/html.php
with
13 additions
and
17 deletions
feed.php
+
5
−
5
View file @
dbb00abc
...
...
@@ -52,7 +52,7 @@
// create new feed
$rss
=
new
DokuWikiFeedCreator
();
$rss
->
title
=
$conf
[
'title'
];
$rss
->
title
=
$conf
[
'title'
]
.
((
$ns
)
?
' '
.
$ns
:
''
)
;
$rss
->
link
=
DOKU_URL
;
$rss
->
syndicationURL
=
DOKU_URL
.
'feed.php'
;
$rss
->
cssStyleSheet
=
DOKU_URL
.
'lib/styles/feed.css'
;
...
...
@@ -66,7 +66,7 @@
if
(
$mode
==
'list'
){
rssListNamespace
(
$rss
,
$ns
);
}
else
{
rssRecentChanges
(
$rss
,
$num
,
$ltype
);
rssRecentChanges
(
$rss
,
$num
,
$ltype
,
$ns
);
}
$feed
=
$rss
->
createFeed
(
$type
,
'utf-8'
);
...
...
@@ -85,11 +85,11 @@
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
rssRecentChanges
(
&
$rss
,
$num
,
$ltype
){
function
rssRecentChanges
(
&
$rss
,
$num
,
$ltype
,
$ns
){
global
$conf
;
if
(
!
$num
)
$num
=
$conf
[
'recent'
];
if
(
!
$num
)
$num
=
$conf
[
'recent'
];
$recents
=
getRecents
(
0
,
$num
);
$recents
=
getRecents
(
0
,
$num
,
false
,
$ns
);
//this can take some time if a lot of recaching has to be done
@
set_time_limit
(
90
);
// set max execution time
...
...
This diff is collapsed.
Click to expand it.
inc/common.php
+
5
−
9
View file @
dbb00abc
...
...
@@ -582,7 +582,6 @@ function dbg($msg,$hidden=false){
*/
function
addLogEntry
(
$date
,
$id
,
$summary
=
""
){
global
$conf
;
$id
=
cleanID
(
$id
);
//FIXME not needed anymore?
if
(
!@
is_writable
(
$conf
[
'changelog'
])){
msg
(
$conf
[
'changelog'
]
.
' is not writable!'
,
-
1
);
...
...
@@ -594,13 +593,7 @@ function addLogEntry($date,$id,$summary=""){
$user
=
$_SERVER
[
'REMOTE_USER'
];
$logline
=
join
(
"
\t
"
,
array
(
$date
,
$remote
,
$id
,
$user
,
$summary
))
.
"
\n
"
;
//FIXME: use adjusted io_saveFile instead
$fh
=
fopen
(
$conf
[
'changelog'
],
'a'
);
if
(
$fh
){
fwrite
(
$fh
,
$logline
);
fclose
(
$fh
);
}
io_saveFile
(
$conf
[
'changelog'
],
$logline
,
true
);
}
/**
...
...
@@ -611,7 +604,7 @@ function addLogEntry($date,$id,$summary=""){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
getRecents
(
$first
,
$num
,
$incdel
=
false
){
function
getRecents
(
$first
,
$num
,
$incdel
=
false
,
$ns
=
''
){
global
$conf
;
$recent
=
array
();
$names
=
array
();
...
...
@@ -636,6 +629,9 @@ function getRecents($first,$num,$incdel=false){
(
@
file_exists
(
wikiFN
(
$info
[
2
]))
||
$incdel
)
&&
(
auth_quickaclcheck
(
$info
[
2
])
>=
AUTH_READ
)
){
// filter namespace
if
((
$ns
)
&&
(
strpos
(
$info
[
2
],
$ns
.
':'
)
!==
0
))
continue
;
$names
[
$info
[
2
]]
=
1
;
if
(
--
$first
>=
0
)
continue
;
/* skip "first" entries */
...
...
This diff is collapsed.
Click to expand it.
inc/html.php
+
3
−
3
View file @
dbb00abc
...
...
@@ -450,15 +450,15 @@ function html_revisions(){
function
html_recent
(
$first
=
0
){
global
$conf
;
global
$lang
;
global
$ID
;
/* we need to get one additionally log entry to be able to
* decide if this is the last page or is there another one.
* This is the cheapest solution to get this information.
*/
$recents
=
getRecents
(
$first
,
$conf
[
'recent'
]
+
1
,
true
);
$recents
=
getRecents
(
$first
,
$conf
[
'recent'
]
+
1
,
true
,
getNS
(
$ID
)
);
if
(
count
(
$recents
)
==
0
&&
$first
!=
0
){
$first
=
0
;
$recents
=
getRecents
(
0
,
$conf
[
'recent'
]
+
1
,
true
);
$recents
=
getRecents
(
0
,
$conf
[
'recent'
]
+
1
,
true
,
getNS
(
$ID
)
);
}
$cnt
=
count
(
$recents
)
<=
$conf
[
'recent'
]
?
count
(
$recents
)
:
$conf
[
'recent'
];
...
...
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