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@roxen.com> 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.35 2001/09/21 15:58:16 jhs Exp $"; + constant cvs_version = "$Id: killframe.pike,v 1.36 2004/05/24 23:14:51 mani Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";      void create()   {    defvar( "killindex", 1, "Remove index files from the URL", TYPE_FLAG,    "If set, the module will remove occurrences of any index file from "    "the end of the URL, leaving only a slash. The index file "
Roxen.git/server/modules/tags/killframe.pike:45: Inside #if defined(manual)
  <attr name='killindex'><p>    Removes trailing index.html from the URL.</p>   </attr>",    ]);   #endif      string tag_killframe( string tag, mapping m, object id )   {    NOCACHE();    -  if( !id->supports->javascript ) return ""; -  +     string javascript;       while( id->misc->orig )    id = id->misc->orig;       // Some versions of IE will choke on :80. (Reload and repeat..)    string tmp;    string prestate;    string my_url = id->conf->query("MyWorldLocation");   
Roxen.git/server/modules/tags/killframe.pike:86:       foreach( indexfiles, string index )    if( my_url[l-strlen(index)..] == "/" +index )    my_url = my_url[..l-strlen(index)];    }       // Put back the variables if there were any.    if(id->query)    my_url += "?"+ id->query;    -  //top.location = self.location breaks some versions of IE. -  //Mozilla 3 on Solaris cows with top.frames.length +  // top.location = self.location breaks some versions of IE. +  // Mozilla 3 on Solaris cows with top.frames.length    if( id->client && id->client[0][..8] == "Mozilla/3" )    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");   }