minor improvements
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 27 Apr 2007 17:01:52 +0000 (17:01 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 27 Apr 2007 17:01:52 +0000 (17:01 +0000)
IkiWiki.pm
doc/plugins/testpagespec.mdwn
doc/todo/fileupload.mdwn

index 212b0de08e050eded0c1e42af53a03dd4250d2a9..6fcd69a231fd3264cd9252bf1dc38e05358cadf9 100644 (file)
@@ -1012,8 +1012,8 @@ sub pagespec_match ($$;@) { #{{{
 package IkiWiki::FailReason;
 
 use overload (
 package IkiWiki::FailReason;
 
 use overload (
-       '""'    => sub { return ${$_[0]} },
-       '0+'    => sub { return 0 },
+       '""'    => sub { ${$_[0]} },
+       '0+'    => sub { 0 },
        '!'     => sub { bless $_[0], 'IkiWiki::SuccessReason'},
        fallback => 1,
 );
        '!'     => sub { bless $_[0], 'IkiWiki::SuccessReason'},
        fallback => 1,
 );
@@ -1025,8 +1025,8 @@ sub new {
 package IkiWiki::SuccessReason;
 
 use overload (
 package IkiWiki::SuccessReason;
 
 use overload (
-       '""'    => sub { return ${$_[0]} },
-       '0+'    => sub { return 1 },
+       '""'    => sub { ${$_[0]} },
+       '0+'    => sub { 1 },
        '!'     => sub { bless $_[0], 'IkiWiki::FailReason'},
        fallback => 1,
 );
        '!'     => sub { bless $_[0], 'IkiWiki::FailReason'},
        fallback => 1,
 );
index c5155129dcdb53bddd90a7e5a442556101f911d5..3d35d70ad2f1b61fccb0cd84a4aaeb17a4f91c2d 100644 (file)
@@ -13,10 +13,10 @@ highlighting which part of the [[PageSpec]] is causing the match to fail.
        
        \[[testpagespec pagespec="foopage or !bar*" match="barpage"]]
 
        
        \[[testpagespec pagespec="foopage or !bar*" match="barpage"]]
 
-This will print out something like "no match: bar* matches barpage", since the part
-of the [[PageSpec]] that fails is this negated match.
+This will print out something like "no match: bar* matches barpage", since
+the part of the [[PageSpec]] that fails is this negated match.
        
        \[[testpagespec pagespec="foopage or barpage" match="barpage"]]
 
 This will print out something like "match: barpage matches barpage",
        
        \[[testpagespec pagespec="foopage or barpage" match="barpage"]]
 
 This will print out something like "match: barpage matches barpage",
-indicating the part of the [[PageSpec]] that did match.
+indicating the part of the [[PageSpec]] that caused it to match.
index 3a8bd2c19b506cda189a4b552aff1a1d05ebb927..1962d6b400cc6bf2270032ba90b5c31194c23867 100644 (file)
@@ -54,4 +54,10 @@ That would obsolete the current simple admin prefs for banned users and
 locked pages. Suddenly all the access controls live in one place.
 Wonderbar!
 
 locked pages. Suddenly all the access controls live in one place.
 Wonderbar!
 
+(Note that pagespec_match will now return an object that stringifies to a
+message indicating why the pagespec matched, or failed to match, so if a
+pagespec lock like the above prevents an edit or upload from happening,
+ikiwiki could display a reasonable message to the user, indicating what
+they've done wrong.)
+
 [[tag soc]]
 [[tag soc]]