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

version» Context lines:

Roxen.git/server/modules/tags/indirect_href.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //   // This module makes it possible to write symbolic names instead of   // absoulte hrefs.   //   // made by Mattias Wingstedt      #pragma strict_types    - constant cvs_version = "$Id: indirect_href.pike,v 1.28 2001/06/26 17:48:45 nilsson Exp $"; + constant cvs_version = "$Id: indirect_href.pike,v 1.29 2001/08/17 18:41:59 nilsson Exp $";   constant thread_safe = 1;   #include <module.h>      inherit "module";      void create()   {    defvar( "hrefs", "roxen = http://www.roxen.com\n"    "community = http://community.roxen.com", "Indirect hrefs",    TYPE_TEXT_FIELD, "The URL database with the syntax:<br>\n"
Roxen.git/server/modules/tags/indirect_href.pike:69:    array do_return() {    if(!args->name || !sizeof(hrefs)) {    result = content;    return 0;    }       if(!(hrefs->random) && args->name=="random")    args->href=values(hrefs)[random(sizeof(hrefs))];    else    args->href=hrefs[args->name]; -  m_delete(args, "name"); +  m_delete([mapping(string:string)]args, "name");    -  result = Roxen.make_container("a", [mapping(string:string)]args, content); +  result = Roxen.make_container("a", [mapping(string:string)]args, [string]content);    return 0;    }    }   }      TAGDOCUMENTATION;   #ifdef manual   constant tagdoc=([    "ai":#"<desc cont='cont'><p><short>    Makes it possible to use a database of links.</short> Each link is referred