fixed: FunctionParser skipped a function name after an item (file) if the name was not a name for a function

it should report a 404 in such a case


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@771 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2011-09-28 22:24:24 +00:00
parent 968593106e
commit 9dae2de2fa
2 changed files with 441 additions and 6 deletions

View File

@ -73,13 +73,16 @@ void FunctionParser::ParseDirsItemFunction()
if( CheckAddItem() )
{
ReadName();
CheckAddFunction();
SkipSlashes();
if( !cur->request->function && *path && *path!='#' && *path!='?' )
if( !name.empty() )
{
log << log3 << "FP: unknown function: " << name << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
CheckAddFunction();
if( !cur->request->function )
{
log << log3 << "FP: unknown function: " << name << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
}
}
}
}

View File

@ -125,5 +125,437 @@ padding-right: 2em;
p {
margin: 0.5em 0 0.5em 0;
}
}
/* */
p.withnext {
margin: 1em 0 0 0;
width: 520px;
}
p.iteminfo {
font-size: 0.7em;
color: #AAAAAA;
margin: 0.4em 0 1.8em 0;
}
p.itemtabinfo {
font-size: 0.7em;
color: #AAAAAA;
margin: 0 0 1em 0;
padding: 0.5em 0 0 0;
}
p.itemtabinfo2 {
font-size: 0.7em;
color: #AAAAAA;
margin: 0 0 1em 0;
padding: 1.5em 0 0 0;
}
.error {
color: red;
font-weight: bold;
}
#additem legend {
display: none;
}
#additem .edit {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 530px;
}
#additem .editshort {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 250px;
}
#additem .check {
vertical-align: middle;
}
#additem label {
vertical-align: top;
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
display: block;
}
#additem select {
border: 1px solid #dedede;
width: 100px;
margin: 0.3em 0 0.3em 0;
}
#additem select.contenttype {
width: 150px;
}
#additem select.template {
width: 200px;
}
#additem .privileges {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 100px;
}
#additem .multitext {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 100%;
}
#additem .multitextfull {
margin: 0.5em 0 0.5em 0;
border: 1px solid #dedede;
display: block;
width: 100%;
}
#additem .submit {
margin: 1.5em 0 0.5em 0;
display: block;
width: 10em;
padding: 0.2em;
}
div.itemoptions {
clear: both;
border-top: 1px solid #D1D1E1;
padding: 1em;
margin: 5em 0 1em 0;
}
div.itemoptions h2 {
margin-top: 0;
font-size: 1.1em;
}
ul.itemmenu {
overflow: hidden;
margin: 1em 0 2em 0;
display: block;
}
/* ie6 has some problems */
* html ul.itemmenu {
overflow: visible;
height: 1em;
}
ul.itemmenu li {
display: block;
margin-right: 2em;
font-size: 0.8em;
line-height: 1.8em;
}
div.threadbox {
padding: 0.2em 1em 1em 1em;
}
div.threadboxcolor {
background: #F4F4F4;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
div.threadbox a.threadedit {
margin: 0.5em 0 0 0;
float: right;
font-size: 0.8em;
}
table.forum {
border: 1px solid #D1D1E1;
}
table.forum th {
border: 1px solid #D1D1E1;
}
table.forum td {
border: 1px solid #D1D1E1;
}
table.forum a {
display: block;
padding: 0 4px 0 4px;
}
.smallfont {
font-size: 0.7em;
}
table.tickettab {
border: 1px solid #D1D1E1;
}
table.tickettab th {
font-weight: bold;
}
table.tickettab th, table.tickettab td {
text-align: center;
border: 0;
font-size: 0.7em;
border: 1px solid #D1D1E1;
vertical-align: middle;
}
table.tickettab td.tickettabtitle {
font-size: 1em;
text-align: left;
padding: 0 4px 0 4px;
}
table.tickettab a {
display: block;
padding: 0 4px 0 4px;
}
table.ticket {
margin: 1em 0 1em 0;
}
table.ticket th {
text-align: left;
font-weight: normal;
padding: 0 1em 0 0;
}
table.ticket th, table.ticket td {
border: 0;
vertical-align: middle;
}
table.ticket input {
margin: 0.3em 0 0.3em 0;
padding: 0.2em;
border: 1px solid #dedede;
display: block;
width: 100px;
}
div.ticketinfo {
background: #FFFED5;
padding: 2em;
border: 1px dotted #AFAFAF;
}
div.ticketinfo table th {
text-align: left;
border: 0;
padding: 0 1em 0 0;
}
div.ticketinfo table td {
border: 0;
}
div.ticketinfo p.edit {
font-size: 0.8em;
text-align: right;
float: right;
}
ul.ls_browse li {
display: block;
float: left;
margin: 10px;
list-style-type: none;
}
strong {
font-weight: bold;
}
img.catimage {
max-width: 600px;
}
pre.nowinixbreak {
display: inline;
white-space: normal;
}
/*
from bbcode
*/
span.bbitalic {
font-style: italic;
}
span.bbunderline {
text-decoration: underline;
}
span.bbstrike {
text-decoration: line-through;
}
div.bbquote {
display: block;
padding: 0.5em;
margin: 0.5em 0 1em 0;
border: 1px solid #C3C3C3;
background: #F0F0F0;
}
div.bbquote span.bbquotewho {
font-size: 0.8em;
color: #BABABA;
}
code.bbcode {
display: block;
background-color: #fafafa;
padding: 1em;
font-size: 0.8em;
}
ul.bblist {
margin-left: 2em;
}
ul.bblist li {
list-style-type: disc;
}
span.bbcolyellow {
color: yellow;
}
span.bbcolred {
color: red;
}
span.bbcolgreen {
color: green;
}
span.bbcolblue {
color: blue;
}
span.bbcolbrown {
color: brown;
}
span.bbcolblack {
color: black;
}
ul.galleryimages li {
display: block;
float: left;
margin: 0 0 6px 10px;
}
ul.galleryimages a, ul.galleryimages a:hover, ul.galleryimages a:focus, ul.galleryimages a:active {
background: none;
}
ul.galleryimages img {
background: none;
}
table.mountpoints {
}
table.mountpoints th {
font-weight: bold;
white-space: normal;
text-align: center;
}
table.slog th, table.slog td {
border: 0;
}
td.slogerror {
background: red;
color: white;
}
ul#sortable li{
list-style-type: none;
display: block;
padding: 0.2em 1em 0.2em 1em;
border: 1px solid #D3D3D3;
background: #EDEDED;
margin: 0.3em 0 0.3em 0;
}
ul#sortable input{
width: 30px;
margin: 0 10px 0 0;
}
ul#sortable img {
height: 50px;
}
div#fileupload {
font-size: 0.8em;
}