cvs: functable / table.php
| From: | Hartmut Holzgraefe | Date: | Fri, 11 May 2001 15:21:02 +0000 |
| Subject: | cvs: functable / table.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5661@lists.php.net to get a copy of this message | ||
hholzgra Fri May 11 08:21:02 2001 EDT
Modified files:
/functable table.php
Log:
added new statistics page: all_aliases
(plus some minur issues)
Index: functable/table.php
diff -u functable/table.php:1.6 functable/table.php:1.7
--- functable/table.php:1.6 Thu Nov 23 04:52:14 2000
+++ functable/table.php Fri May 11 08:21:01 2001
@@ -26,6 +26,7 @@
$bgcolor="$color1";
// ... may be overwritten by stylefile
+
if(isset($argv[1])) {
if(file_exists("styles/$argv[1].php")) {
include "styles/$argv[1].php";
@@ -173,21 +174,27 @@
if(!isset($docfile[$function])) return false;
- switch($language) {
- case "de":
- case "german":
- $url = "http://www.dynamic-webpages.de/php/function.$docname.php";
- break;
- case "en":
- case "yes":
- case false:
- #$url="../phpdoc/html/function.$docname.html";
- $url="http://php.net/manual/function.$docname.php";
- break;
- default:
- $url = "http://php.net/manual/$language/html/function.$docname.html";
- break;
+ if(function_exists("custom_manual")) {
+ $url=custom_manual($docname,$language);
+ }
+
+ if(!isset($url)||empty($url)) {
+ switch($language) {
+ case "de":
+ case "german":
+ $url = "http://www.dynamic-webpages.de/php/function.$docname.php";
+ break;
+ case "en":
+ case "yes":
+ case false:
+ //$url="../phpdoc/html/function.$docname.html";
+ $url="http://php.net/manual/function.$docname.php";
+ break;
+ default:
+ $url = "http://php.net/manual/$language/html/function.$docname.html";
+ break;
}
+ }
$alt = (($language=="yes")||empty($language))?"en":$language;
@@ -433,7 +440,15 @@
reset($translation);
while(list($language,)=each($translation)) {
echo "... $language\n";
- $result = mysql_query("select q1.function as function from quickref q1, quickref q2 where
q1.function=q2.function and q1.language='en' and q2.language='$language' and
q1.descr<>q2.descr order by q1.function");
+ $result = mysql_query("SELECT q1.function AS function
+ FROM quickref q1
+ , quickref q2
+ WHERE q1.function = q2.function
+ AND q1.language ='en'
+ AND q2.language ='$language'
+ AND q1.descr <> q2.descr
+ ORDER BY q1.function
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result))
{
@@ -739,7 +754,7 @@
if(isset($file4[$function])) {
$module = explode("/",$file4[$function]);
$module = $module[count($module)-2];
- head(false,false,"Function Details","$what $function (<a
class=\"headLink\" href=\"extension.$module.$ext\">$module</a>)");
+ head(false,false,"Function Details","$what $function (<a
href=\"extension.$module.$ext\">$module</a>)");
} else {
head(false,false,"Function Details","$what $function");
}
@@ -1073,6 +1088,32 @@
# }}}
+
+# {{{ total aliases
+
+head(false,false,"Statistics","Aliases");
+print( "<table><tr
bgcolor=\"$bgcolor\"><th>alias</th><th>file</th><th>orig.
function</th></tr>\n");
+$result=mysql_query("select distinct funclist.function as fname
+ , funclist.filename as file
+ , funclist.alias_for as aname
+ , funclist.lineno as lineno
+ from funclist
+ where funclist.versionid=499 and funclist.alias_for is not null
+ order by funclist.filename, funclist.function
+ ");
+$count['all_aliases']=mysql_num_rows($result);
+while($row=mysql_fetch_array($result))
+{
+ bg_toggle();
+ print("<tr
bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td><td>".fpage($row["aname"])."</td></tr>\n");
+}
+mysql_free_result($result);
+print( "</table>\n");
+foot("$outdir/all_aliases.$ext");
+
+
+# }}}
+
# {{{ statistics page