Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre Metafox/lib/DB.php medzi verziami 1.5 a 1.6

verzia 1.5, 2017/06/09 15:05:06 verzia 1.6, 2024/11/20 15:48:03
Riadok 592  class DB
Riadok 592  class DB
      */       */
     public static function isError($value)      public static function isError($value)
     {      {
         return is_object($value) && is_a($value, 'DB_Error');          return is_object($value) && is_a($value, 'DB_Error');
     }      }
   
     // }}}      // }}}
Riadok 772  class DB
Riadok 772  class DB
             $parsed['dbsyntax'] = $str;              $parsed['dbsyntax'] = $str;
         }          }
   
         if (!count($dsn)) {          if (!strlen($dsn))
                   {
             return $parsed;              return $parsed;
         }          }
   
Riadok 865  class DB
Riadok 866  class DB
          * defined, and means that we deal with strings and array in the same           * defined, and means that we deal with strings and array in the same
          * manner. */           * manner. */
         $dsnArray = DB::parseDSN($dsn);          $dsnArray = DB::parseDSN($dsn);
   
         if ($hidePassword) {          if ($hidePassword) {
             $dsnArray['password'] = 'PASSWORD';              $dsnArray['password'] = 'PASSWORD';
         }          }
Riadok 875  class DB
Riadok 876  class DB
         if (is_string($dsn) && strpos($dsn, 'tcp') === false && $dsnArray['protocol'] == 'tcp') {          if (is_string($dsn) && strpos($dsn, 'tcp') === false && $dsnArray['protocol'] == 'tcp') {
             $dsnArray['protocol'] = false;              $dsnArray['protocol'] = false;
         }          }
   
         // Now we just have to construct the actual string. This is ugly.          // Now we just have to construct the actual string. This is ugly.
         $dsnString = $dsnArray['phptype'];          $dsnString = $dsnArray['phptype'];
         if ($dsnArray['dbsyntax']) {          if ($dsnArray['dbsyntax']) {
Riadok 898  class DB
Riadok 899  class DB
             $dsnString .= ':'.$dsnArray['port'];              $dsnString .= ':'.$dsnArray['port'];
         }          }
         $dsnString .= '/'.$dsnArray['database'];          $dsnString .= '/'.$dsnArray['database'];
   
         /* Option handling. Unfortunately, parseDSN simply places options into          /* Option handling. Unfortunately, parseDSN simply places options into
          * the top-level array, so we'll first get rid of the fields defined by           * the top-level array, so we'll first get rid of the fields defined by
          * DB and see what's left. */           * DB and see what's left. */
Riadok 925  class DB
Riadok 926  class DB
   
         return $dsnString;          return $dsnString;
     }      }
   
     // }}}      // }}}
 }  }
   

Legend:
Odstranené z verzie1.5  
zmenené riadky
  Pridané vo verzii1.6

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok