SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Joseph W. <zo...@us...> - 2002年09月24日 01:12:32
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv8853/lib
Modified Files:
	stdlib.php 
Log Message:
Added some PHPDoc comments
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -2 -b -p -d -r1.126 -r1.127
--- stdlib.php	18 Sep 2002 15:17:12 -0000	1.126
+++ stdlib.php	24 Sep 2002 01:12:28 -0000	1.127
@@ -76,4 +76,13 @@ function MangleXmlIdentifier($str) 
 
 
+/**
+* Generates a valid URL for a given Wiki pagename.
+* @param mixed $pagename If a string this will be the name of the Wiki page to link to.
+* 			 If a WikiDB_Page object function will extract the name to link to.
+* 			 If a WikiDB_PageRevision object function will extract the name to link to.
+* @param array $args 
+* @param boolean $get_abs_url Default value is false.
+* @return string The absolute URL to the page passed as $pagename.
+*/
 function WikiURL($pagename, $args = '', $get_abs_url = false) {
 $anchor = false;
@@ -120,4 +129,11 @@ function WikiURL($pagename, $args = '', 
 }
 
+/**
+* Generates icon in front of links.
+* @param string $protocol_or_url URL or protocol to determine which icon to use.
+* @return HtmlElement HtmlElement object that contains data to create img link to
+* icon for use with url or protocol passed to the function. False if no img to be
+* displayed
+*/
 function IconForLink($protocol_or_url) {
 global $Theme;
@@ -139,8 +155,20 @@ function IconForLink($protocol_or_url) {
 }
 
+/**
+* Determines if the url passed to function is safe, by detecting if the characters
+* '<', '>', or '"' are present.
+* @param string $url URL to check for unsafe characters.
+* @return boolean True if same, false else.
+*/
 function IsSafeURL($url) {
 return !ereg('[<>"]', $url);
 }
 
+/**
+* Generates an HtmlElement object to store data for a link.
+* @param string $url URL that the link will point to.
+* @param string $linktext Text to be displayed as link.
+* @return HtmlElement HtmlElement object that contains data to construct an html link.
+*/
 function LinkURL($url, $linktext = '') {
 // FIXME: Is this needed (or sufficient?)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /