[PHPLIB-DEV] cvs commit From: kir (phplib-dev <email protected>)
Date: 03/29/00

From: kir
Date: Wed Mar 29 15:54:00 2000
Modified files:
      php-lib/CHANGES
      php-lib/php/db_oracle.inc
      php-lib/php/tmpl_control.inc

Log message:

29-Mar-2000 kir
  - Make Tmpl_Control::set_file() compatible with Template::set_file()
  - Some reformatting on db_oracle.inc - remove tabs.
  - Supress warning in db_oracle.inc num_rows function in ereg_replace

Index: php-lib/CHANGES
diff -u php-lib/CHANGES:1.164 php-lib/CHANGES:1.165
--- php-lib/CHANGES:1.164 Sat Mar 25 03:24:26 2000
+++ php-lib/CHANGES Wed Mar 29 15:53:28 2000
@@ -1,4 +1,9 @@
-$Id: CHANGES,v 1.164 2000/03/25 02:24:26 ssilk Exp $
+$Id: CHANGES,v 1.165 2000/03/29 13:53:28 kir Exp $
+
+29-Mar-2000 kir
+ - Make Tmpl_Control::set_file() compatible with Template::set_file()
+ - Some reformatting on db_oracle.inc - remove tabs.
+ - Supress warning in db_oracle.inc num_rows function in ereg_replace
 
 25-Mar-2000 ssilk
   - Big changes to query_sql.inc
Index: php-lib/php/db_oracle.inc
diff -u php-lib/php/db_oracle.inc:1.22 php-lib/php/db_oracle.inc:1.23
--- php-lib/php/db_oracle.inc:1.22 Thu Dec 16 13:07:15 1999
+++ php-lib/php/db_oracle.inc Wed Mar 29 15:53:29 2000
@@ -4,7 +4,7 @@
  *
  * Copyright (c) 1998,1999 Luis Francisco Gonzalez Hernandez
  *
- * $Id: db_oracle.inc,v 1.22 1999/12/16 12:07:15 kir Exp $
+ * $Id: db_oracle.inc,v 1.23 2000/03/29 13:53:29 kir Exp $
  *
  */
 
@@ -94,7 +94,7 @@
           $this->halt("connect() Link-ID == false " .
                  "($this->Link_ID), ora_plogon failed");
         } else {
- //echo "commit on<p>";
+ //echo "commit on<p>";
           ora_commiton($this->Link_ID);
         }
         if($this->Debug) {
@@ -102,7 +102,7 @@
         }
         ## Execute Connect Query
         if ($this->ConnectQuery) {
- $this->query($this->ConnectQuery);
+ $this->query($this->ConnectQuery);
         }
       }
   }
@@ -122,7 +122,7 @@
       $this->lastQuery=$Query_String;
 
       if (!$this->Query_ID) {
- $this->Query_ID= ora_open($this->Link_ID);
+ $this->Query_ID= ora_open($this->Link_ID);
       }
       if($this->Debug) {
         printf("Debug: query = %s<br>\n", $Query_String);
@@ -158,7 +158,7 @@
             // but dosn't work in all cases (complicated selects)
             // and it is very slow here
           }
- $this->Row +=1;
+ $this->Row +=1;
           
           $errno=ora_errorcode($this->Query_ID);
           if(1403 == $errno) { # 1043 means no more records found
@@ -198,7 +198,7 @@
       if ($this->Row - 1 == $pos) {
         $this->ora_no_next_fetch=true;
       } elseif ($this->Row == $pos ) {
- ## do nothing
+ ## do nothing
       } else {
         $this->halt("Invalid seek(): Position is cannot be handled by API.<BR>".
               "Only a seek to the last element is allowed in this version<BR>".
@@ -292,43 +292,43 @@
         $res[$i]["index"] = $this->Record[index_name];
         $res[$i]["chars"] = $this->Record[char_col_decl_length];
         if ($full) {
- $j=$res[$i]["name"];
- $res["meta"][$j] = $i;
- $res["meta"][strtoupper($j)] = $i;
- switch ($res[$i]["type"]) {
- case "VARCHAR2" :
- case "VARCHAR" :
- case "CHAR" :
- $res["php_type"]="string";
- $res["php_subtype"]="";
- break;
- case "DATE" :
- $res["php_type"]="string";
- $res["php_subtype"]="date";
- break;
- case "BLOB" :
- case "CLOB" :
- case "BFILE" :
- case "RAW" :
- case "LONG" :
- case "LONG RAW" :
- $res["php_type"]="string";
- $res["php_subtype"]="blob";
- break;
- case "NUMBER" :
- if ($res[$i]["format"]) {
- $res["php_type"]="double";
- $res["php_subtype"]="";
- } else {
- $res["php_type"]="int";
- $res["php_subtype"]="";
- }
- break;
- default :
- $this->halt("metadata(): Type is not a valid value: '$res[$i][type]'");
- break;
- }
+ $j=$res[$i]["name"];
+ $res["meta"][$j] = $i;
+ $res["meta"][strtoupper($j)] = $i;
+ switch ($res[$i]["type"]) {
+ case "VARCHAR2" :
+ case "VARCHAR" :
+ case "CHAR" :
+ $res["php_type"]="string";
+ $res["php_subtype"]="";
+ break;
+ case "DATE" :
+ $res["php_type"]="string";
+ $res["php_subtype"]="date";
+ break;
+ case "BLOB" :
+ case "CLOB" :
+ case "BFILE" :
+ case "RAW" :
+ case "LONG" :
+ case "LONG RAW" :
+ $res["php_type"]="string";
+ $res["php_subtype"]="blob";
+ break;
+ case "NUMBER" :
+ if ($res[$i]["format"]) {
+ $res["php_type"]="double";
+ $res["php_subtype"]="";
+ } else {
+ $res["php_type"]="int";
+ $res["php_subtype"]="";
+ }
+ break;
+ default :
+ $this->halt("metadata(): Type is not a valid value: '$res[$i][type]'");
+ break;
         }
+ }
         if ($full) $res["meta"][$res[$i]["name"]] = $i;
         $i++;
       }
@@ -363,7 +363,7 @@
       # and remove ORDER BY (if any) for speed
       # I like regular expressions too ;-)))
       $q = sprintf("SELECT COUNT(*) FROM (%s)",
- eregi_Replace("ORDER[[:space:]]+BY[^\)]*(\)*)", "\\1",
+  <email protected>("ORDER[[:space:]]+BY[^\)]*(\)*)", "\\1",
                 $this->lastQuery)
                   );
 
@@ -438,10 +438,10 @@
       else {
         $next_id = 0;
       }
- if ( Query_ID > 0 ) {
- ora_close(Query_ID);
+ if ( $Query_ID > 0 ) {
+ ora_close($Query_ID);
       }
-
+
       return $next_id;
   }
 
Index: php-lib/php/tmpl_control.inc
diff -u php-lib/php/tmpl_control.inc:1.2 php-lib/php/tmpl_control.inc:1.3
--- php-lib/php/tmpl_control.inc:1.2 Thu Jan 27 20:08:47 2000
+++ php-lib/php/tmpl_control.inc Wed Mar 29 15:53:29 2000
@@ -149,7 +149,7 @@
    * varname: varname for a filename,
    * filename: name of template file
    */
- function set_file($parent, $varname, $filename = "") {
+ function set_file($varname, $filename = "", $parent = "") {
     if (!is_array($varname)) {
     
       if ($filename == "") {

-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.