X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=globals.sh;fp=globals.sh;h=1bc1ae92bbcbdbba139015894a12f71c4b9a8f0f;hb=093397475107223bd25698f6f3eeaed6334619c7;hp=1445d48e4efceaf049180bca1d1c6a27e24412cb;hpb=1f1889fbe25a680b6e2c6b22a576a2192ee1bcaa;p=serve0 diff --git a/globals.sh b/globals.sh index 1445d48..1bc1ae9 100755 --- a/globals.sh +++ b/globals.sh @@ -17,7 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with Serve0. If not, see . - alias _wiki="stx2any --no-template --link-abbrevs --quote -T html" file_pattern='^.*(mov|ts|mpg|mpeg|mp4|m4v|avi|mkv|flv|sfv|wmv|ogm|webm|iso|rmvb)$' @@ -25,12 +24,8 @@ data_dirs cache meta mp4 videos thumbs trash by_length transcoded PAGE="${_GET[p]:-${PAGE:-list}}" -cgi_cookie -validate(){ printf '%s\n' "$1" |sed -rn '2q;/^('"$2"')$/{p;q};a'"$3"; } - _GET[o]=$( validate "${_GET[o]}" 'Name|Date|Length' Name) _GET[pn]=$(validate "${_GET[pn]}" '[1-9][0-9]*' 1) +cgi_cookie _COOKIE[pagesize]=$(validate "${_COOKIE[pagesize]}" '[1-9][0-9]*' 50) - -