|
[dokuwiki]
||
[Date Prev]
[03-2007 Date Index]
[Date Next]
||
[Thread Prev]
[03-2007 Thread Index]
[Thread Next]
[dokuwiki] Re: Namespace linking from URL (fix for #991)
- From: Guy Brand <gb@xxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 13 Mar 2007 14:43:37 +0100
On 28 January at 13:00, Andreas Gohr wrote:
> > Attached is a single-line patch which allows namespace auto-linking
> > from URL requests (http://bugs.splitbrain.org/?do=details&id=991).
>
> It breaks a test case:
>
> FAIL->./cases/inc/pageutils_getid.test.php->init_getid_test->test2->Equal
> expectation fails at character 4 with [wiki:discussion:button-dw.png]
> and [wiki/discussion/button-dw.png] at line [46] 1/1 test cases
> complete: 2 passes, 1 fails.
>
> The problem is probably that the resolve call does always do an ID
> cleaning.
Attached is a new patch for this issue. Tested against darcs
revision with all combinations of userewrite and useslash.
No regression observed on the tests.
Comments welcome.
--
bug
New patches:
[Namespace autolinking from URL (FS#991 fix)
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070313132928
You can now request doku.php?id=ns: or doku.php?id=ns/ if you have the
useslash option activated and have DokuWiki return the $conf['start']
page from that namespace. See issue #991.
] {
hunk ./inc/pageutils.php 55
+
+ if(substr($id,-1) == ':' || ($conf['useslash'] && substr($id,-1) == '/')){
+ if(@file_exists(wikiFN($id.$conf['start']))){
+ // start page inside namespace
+ $id = $id.$conf['start'];
+ }elseif(@file_exists(wikiFN($id.noNS(cleanID($id))))){
+ // page named like the NS inside the NS
+ $id = $id.noNS(cleanID($id));
+ }elseif(@file_exists(wikiFN($id))){
+ // page like namespace exists
+ $id = $id;
+ }else{
+ // fall back to default
+ $id = $id.$conf['start'];
+ }
+ }
+
}
Context:
[SimplePie update
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070311215020]
[always have a trailing newline in JavaScript output
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070308224331
This may fix https://bugzilla.mozilla.org/show_bug.cgi?id=316033
]
[js_compress updates
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070308223644
This ports the fixes from the original python code to DokuWiki's js_compress
functions. The unit tests now pass.
]
[Latvian language updates
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070307211110]
[FS#1011-fix
bernd@xxxxxxx**20070306005940]
[dbg_backtrace() function added
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070305223458
This adds a useful debugging function for printing function call backtraces.
]
[added JsStrip unit test files
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070305223025
This patch adds unit test files from the new release of JsStrip [1]. Some of
the tests
currently fail pointing to bugs which are fixed in the new JsStrip release.
The fixes
need to be ported to DokuWiki's js_compress function.
This patch also adds a way to output additional info when a test fails. It
misuses
SimpleTest's signalling which is probably a bad idea but works for now.
http://code.google.com/p/jsstrip/
]
[Several small french language corrections
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070305165211]
[French lang for revert plugin
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070305163850]
[French language update
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070305140920]
[unit test for auth_aclcheck
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303225338]
[fixed warning whith no search results FS#1088
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303220143]
[added getFormat() function to renderer
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303214102
Each renderer has to supply a getFormat() function returning the format it
produces. Usually this is the same as the classname of the renderer (or Plugin)
says but it does not need to be necessarily.
Fixes a problem with the wrong format being reported to plugins when a
render plugin was used.
]
[never build instructions twice in the same run FS#1090
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303202232
When a page was called with purge=1 the instructions were built multiple
times for the multiple renderers. This is not only an unnessary ressource hog
it could also make certain plugins fail which. This patch makes sure that
instructions for a source file are not built more than once per run.
]
[only debug when in xhtml mode in parserutils.php
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303195008]
[improved writability check for sitemap FS#1093
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070303192836]
[bulgarian translation
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070302180103]
[skip images in links for metadata renderer
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070302102035]
[Fix broken if in previous patch
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070302100506]
[Allow @USER@ variable in ACLs
Guy Brand <gb@xxxxxxxxxxxxxxxxx>**20070301230309
This saves a lot of ACL lines for users namespaces for example:
users:* @ALL 1
users:@USER@ @USER@ 8
]
[fix pass by reference problem in indexer.php
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070301211751]
[TAG develsnap 2007-03-01
Andreas Gohr <andi@xxxxxxxxxxxxxx>**20070301000001]
Patch bundle hash:
aa26ad3036998e7941df5de2e6790b178519692d
|