Roxen.git / server / modules / tags / killframe.pike

version» Context lines:

Roxen.git/server/modules/tags/killframe.pike:5:    *    * Will also remove occuranses of "indexfiles" from the end of the URL.    *    * made by Peter Bortas <peter@idonex.se> Januari -97    *    * Thanks for suggestions and bugreports:    * Barry Treahy <treahy@allianceelec.com>    * Chris Burgess <chris@ibex.co.nz>    */    - constant cvs_version = "$Id: killframe.pike,v 1.22 1999/07/21 05:12:03 nilsson Exp $"; + constant cvs_version = "$Id: killframe.pike,v 1.23 1999/11/29 16:49:19 nilsson Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";      void create()   { -  defvar( "killindex", 1, "Kill trailing 'indexfiles'?", TYPE_FLAG|VAR_MORE, +  defvar( "killindex", 1, "Kill trailing 'indexfiles'?", TYPE_FLAG,    "When set, the killframe module will remove occurrences of "    "'indexfiles' (as set in the active directory module) from "    "the end of the URL, leaving only a slash." );   }      mixed register_module()   {    return ({    MODULE_PARSER,    "Killframe tag",
Roxen.git/server/modules/tags/killframe.pike:65:    if( sscanf(id->raw_url, "/(%s)", tmp) )    prestate = "("+ tmp +")/";       if( sscanf(my_url, "%s:80/", tmp ) )    my_url = tmp +"/"+ (prestate?prestate:"") + id->not_query[1..];    else    my_url += (prestate?prestate:"") + id->not_query[1..];       // Links to index.html are ugly. All pages deserve a uniqe URL, and for    // index-pages that URL in /. -  if( query("killindex") ) +  if( query("killindex") || m->killindex )    {    //Get indexfiles from the directory-module if there is one.    array indexfiles = ({});    if( id->conf->dir_module )    indexfiles = id->conf->dir_module->query("indexfiles");       int l=strlen(my_url)-1;       foreach( indexfiles, string index )    if( my_url[l-strlen(index)..] == "/" +index )
Roxen.git/server/modules/tags/killframe.pike:96:    javascript = ( " if(top.location != \""+ my_url +"\")\n"    " top.location = \""+ my_url +"\";\n" );    else    javascript = ( " if(top.frames.length>1)\n"    " top.location = \""+ my_url +"\";\n" );       return("<script language=\"javascript\"><!--\n"    + javascript    + "//--></script>\n");   } -  - mapping query_tag_callers() - { -  return ([ "killframe" : tag_killframe ]); - } +