]> git.plutz.net Git - serve0/blobdiff - pages/browse.sh
send reference to return page for various actions
[serve0] / pages / browse.sh
index adde4d8f2c2f06ad579e493e08a5316a9f3eaf94..eba470b045463e8d14f229d1701560b05c297134 100755 (executable)
 # 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' \