Fossil SCM
More improvements to login redirects. See the discussion on the [forum:/forumpost/f81625500d96cc0f|forum thread f81625500d96cc0f].
Commit
e5c16594b3e2f8662b895c75311d03e286c55acb274b96dce8cfa06de304774f
Parent
4291b9c87f2508f…
3 files changed
+1
-1
+1
-1
+1
-1
+1
-1
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -283,11 +283,11 @@ | ||
| 283 | 283 | CX("{"); |
| 284 | 284 | } |
| 285 | 285 | CX("\"isError\": true, \"xfrom\": null,"); |
| 286 | 286 | CX("\"mtime\": %!j, \"lmtime\": %!j,", zTime, zTime); |
| 287 | 287 | CX("\"xmsg\": \"Missing permissions or not logged in. " |
| 288 | - "Try <a href='%R/login?g=%R/chat'>logging in</a>.\""); | |
| 288 | + "Try <a href='%R/login?g=chat'>logging in</a>.\""); | |
| 289 | 289 | if(fAsMessageList){ |
| 290 | 290 | CX("}]}"); |
| 291 | 291 | }else{ |
| 292 | 292 | CX("}"); |
| 293 | 293 | } |
| 294 | 294 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -283,11 +283,11 @@ | |
| 283 | CX("{"); |
| 284 | } |
| 285 | CX("\"isError\": true, \"xfrom\": null,"); |
| 286 | CX("\"mtime\": %!j, \"lmtime\": %!j,", zTime, zTime); |
| 287 | CX("\"xmsg\": \"Missing permissions or not logged in. " |
| 288 | "Try <a href='%R/login?g=%R/chat'>logging in</a>.\""); |
| 289 | if(fAsMessageList){ |
| 290 | CX("}]}"); |
| 291 | }else{ |
| 292 | CX("}"); |
| 293 | } |
| 294 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -283,11 +283,11 @@ | |
| 283 | CX("{"); |
| 284 | } |
| 285 | CX("\"isError\": true, \"xfrom\": null,"); |
| 286 | CX("\"mtime\": %!j, \"lmtime\": %!j,", zTime, zTime); |
| 287 | CX("\"xmsg\": \"Missing permissions or not logged in. " |
| 288 | "Try <a href='%R/login?g=chat'>logging in</a>.\""); |
| 289 | if(fAsMessageList){ |
| 290 | CX("}]}"); |
| 291 | }else{ |
| 292 | CX("}"); |
| 293 | } |
| 294 |
+1
-1
| --- src/pikchrshow.c | ||
| +++ src/pikchrshow.c | ||
| @@ -249,11 +249,11 @@ | ||
| 249 | 249 | | PIKCHR_PROCESS_SRC |
| 250 | 250 | | PIKCHR_PROCESS_ERR_PRE; |
| 251 | 251 | |
| 252 | 252 | login_check_credentials(); |
| 253 | 253 | if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){ |
| 254 | - cgi_redirectf("%R/login?g=%R/pikchrshow"); | |
| 254 | + cgi_redirectf("%R/login?g=pikchrshow"); | |
| 255 | 255 | } |
| 256 | 256 | zContent = PD("content",P("p")); |
| 257 | 257 | if(P("ajax")!=0){ |
| 258 | 258 | /* Called from the JS-side preview updater. |
| 259 | 259 | TODO: respond with JSON instead.*/ |
| 260 | 260 |
| --- src/pikchrshow.c | |
| +++ src/pikchrshow.c | |
| @@ -249,11 +249,11 @@ | |
| 249 | | PIKCHR_PROCESS_SRC |
| 250 | | PIKCHR_PROCESS_ERR_PRE; |
| 251 | |
| 252 | login_check_credentials(); |
| 253 | if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){ |
| 254 | cgi_redirectf("%R/login?g=%R/pikchrshow"); |
| 255 | } |
| 256 | zContent = PD("content",P("p")); |
| 257 | if(P("ajax")!=0){ |
| 258 | /* Called from the JS-side preview updater. |
| 259 | TODO: respond with JSON instead.*/ |
| 260 |
| --- src/pikchrshow.c | |
| +++ src/pikchrshow.c | |
| @@ -249,11 +249,11 @@ | |
| 249 | | PIKCHR_PROCESS_SRC |
| 250 | | PIKCHR_PROCESS_ERR_PRE; |
| 251 | |
| 252 | login_check_credentials(); |
| 253 | if( !g.perm.RdWiki && !g.perm.Read && !g.perm.RdForum ){ |
| 254 | cgi_redirectf("%R/login?g=pikchrshow"); |
| 255 | } |
| 256 | zContent = PD("content",P("p")); |
| 257 | if(P("ajax")!=0){ |
| 258 | /* Called from the JS-side preview updater. |
| 259 | TODO: respond with JSON instead.*/ |
| 260 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | } |
| 126 | 126 | if( zIndexPage ){ |
| 127 | 127 | cgi_redirectf("%R/%s", zIndexPage); |
| 128 | 128 | } |
| 129 | 129 | if( !g.perm.RdWiki ){ |
| 130 | - cgi_redirectf("%R/login?g=%R/home"); | |
| 130 | + cgi_redirectf("%R/login?g=home"); | |
| 131 | 131 | } |
| 132 | 132 | if( zPageName ){ |
| 133 | 133 | login_check_credentials(); |
| 134 | 134 | g.zExtra = zPageName; |
| 135 | 135 | cgi_set_parameter_nocopy("name", g.zExtra, 1); |
| 136 | 136 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | } |
| 126 | if( zIndexPage ){ |
| 127 | cgi_redirectf("%R/%s", zIndexPage); |
| 128 | } |
| 129 | if( !g.perm.RdWiki ){ |
| 130 | cgi_redirectf("%R/login?g=%R/home"); |
| 131 | } |
| 132 | if( zPageName ){ |
| 133 | login_check_credentials(); |
| 134 | g.zExtra = zPageName; |
| 135 | cgi_set_parameter_nocopy("name", g.zExtra, 1); |
| 136 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | } |
| 126 | if( zIndexPage ){ |
| 127 | cgi_redirectf("%R/%s", zIndexPage); |
| 128 | } |
| 129 | if( !g.perm.RdWiki ){ |
| 130 | cgi_redirectf("%R/login?g=home"); |
| 131 | } |
| 132 | if( zPageName ){ |
| 133 | login_check_credentials(); |
| 134 | g.zExtra = zPageName; |
| 135 | cgi_set_parameter_nocopy("name", g.zExtra, 1); |
| 136 |