# You should have received a copy of the GNU Affero General Public License
# along with Serve0. If not, see <http://www.gnu.org/licenses/>.
+directory="$(invalidate "${_GET[d]}" '(.*/)?\.\.(/.*)?|' /)"
+page_link="p=browse&d=$(urlsafe "$directory")&"
+
. $_EXEC/pages/common.sh
-directory="$(invalidate "${_GET[d]}" '(.*/)?\.\.(/.*)?|' /)"
[ -d "${treeroot%/}${directory%/}/.index" ] && indexed=true || indexed=false
filters="${_GET[f]}"
debug "FILTERS: $filters"
-page_link="p=browse&d=$(urlsafe "$directory")&${page_link}"
-
present_filter(){
printf %s\\n "$*" \
| sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^;\n;g' \
cat <<VIDEOend
<li id="${location}" class="thumb">
<button class="watchlink" name="${location}" formaction="?action=watch&l=${location}">
- <img src="${thumblocation}" alt="Preview not yet available">
+ <img src="${thumblocation}" width="212" height="162" alt="Preview not yet available">
</button>
<h2><a href="?action=watch&l=${location}">${display}</a></h2>
case "$order" in
Name)
find -L "$dir" -mindepth 1 -maxdepth 1 -type d \! -name ".index" -print0 \
- | sort -z \
+ | sort -fz \
| xargs -0 printf 'directory %s\n'
find -L "$dir" -mindepth 1 -maxdepth 1 \! -type d -print0 \
| grep -ziE "$file_pattern" \
- | sort -z \
+ | sort -fz \
| xargs -0 printf 'video %s\n'
find -L "$dir" -mindepth 1 -maxdepth 1 \! -type d -print0 \
| grep -zviE "$file_pattern" \
- | sort -z \
+ | sort -fz \
| xargs -0 printf 'plain %s\n'
;;
Date)