[ Index ]
 

Code source de DokuWiki 2006-11-06

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/inc/ -> pageutils.php (sommaire)

Utilities for handling pagenames

Author: Andreas Gohr <andi@splitbrain.org>
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
Poids: 478 lignes (12 kb)
Inclus ou requis: 9 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 17 fonctions

  getID()
  cleanID()
  getNS()
  noNS()
  wikiFN()
  wikiLockFN()
  metaFN()
  metaFiles()
  mediaFN()
  localeFN()
  resolve_id()
  resolve_mediaid()
  resolve_pageid()
  getCacheName()
  isHiddenPage()
  isVisiblePage()
  http_conditionalRequest()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

getID($param='id',$clean=true)   X-Ref
Fetch the an ID from request

Uses either standard $_REQUEST variable or extracts it from
the full request URI when userewrite is set to 2

For $param='id' $conf['start'] is returned if no id was found.
If the second parameter is true (default) the ID is cleaned.

author: Andreas Gohr <andi@splitbrain.org>

cleanID($raw_id,$ascii=false)   X-Ref
Remove unwanted chars from ID

Cleans a given ID to only use allowed characters. Accented characters are
converted to unaccented ones

author: Andreas Gohr <andi@splitbrain.org>
param: string  $raw_id    The pageid to clean
param: boolean $ascii     Force ASCII

getNS($id)   X-Ref
Return namespacepart of a wiki ID

author: Andreas Gohr <andi@splitbrain.org>

noNS($id)   X-Ref
Returns the ID without the namespace

author: Andreas Gohr <andi@splitbrain.org>

wikiFN($raw_id,$rev='',$clean=true)   X-Ref
returns the full path to the datafile specified by ID and
optional revision

The filename is URL encoded to protect Unicode chars

author: Andreas Gohr <andi@splitbrain.org>

wikiLockFN($id)   X-Ref
Returns the full path to the file for locking the page while editing.

author: Ben Coburn <btcoburn@silicodon.net>

metaFN($id,$ext)   X-Ref
returns the full path to the meta file specified by ID and extension

The filename is URL encoded to protect Unicode chars

author: Steven Danz <steven-danz@kc.rr.com>

metaFiles($id)   X-Ref
returns an array of full paths to all metafiles of a given ID

author: Esther Brunner <esther@kaffeehaus.ch>

mediaFN($id)   X-Ref
returns the full path to the mediafile specified by ID

The filename is URL encoded to protect Unicode chars

author: Andreas Gohr <andi@splitbrain.org>

localeFN($id)   X-Ref
Returns the full filepath to a localized textfile if local
version isn't found the english one is returned

author: Andreas Gohr <andi@splitbrain.org>

resolve_id($ns,$id,$clean=true)   X-Ref
Resolve relative paths in IDs

Do not call directly use resolve_mediaid or resolve_pageid
instead

Partyly based on a cleanPath function found at
http://www.php.net/manual/en/function.realpath.php#57016

author: <bart at mediawave dot nl>

resolve_mediaid($ns,&$page,&$exists)   X-Ref
Returns a full media id

author: Andreas Gohr <andi@splitbrain.org>

resolve_pageid($ns,&$page,&$exists)   X-Ref
Returns a full page id

author: Andreas Gohr <andi@splitbrain.org>

getCacheName($data,$ext='')   X-Ref
Returns the name of a cachefile from given data

The needed directory is created by this function!

author: Andreas Gohr <andi@splitbrain.org>
param: string $data  This data is used to create a unique md5 name
param: string $ext   This is appended to the filename if given
return: string       The filename of the cachefile

isHiddenPage($id)   X-Ref
Checks a pageid against $conf['hidepages']

author: Andreas Gohr <gohr@cosmocode.de>

isVisiblePage($id)   X-Ref
Reverse of isHiddenPage

author: Andreas Gohr <gohr@cosmocode.de>

http_conditionalRequest($timestamp)   X-Ref
Checks and sets HTTP headers for conditional HTTP requests

returns: void or void with previously header() commands executed
author: Simon Willison <swillison@gmail.com>
param: timestamp $timestamp lastmodified time of the cache file



Généré le : Tue Apr 3 20:47:31 2007 par Balluche grâce à PHPXref 0.7