summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqiang.xue <>2009-05-24 20:30:26 +0000
committerqiang.xue <>2009-05-24 20:30:26 +0000
commit21f4a4c546091fd0bd0059c8c17b89f17810492d (patch)
tree1289f285cb049412c2837da56e21272fbc05e318
parent5005e7cb3a65b717d07e4740159b245291ecb8c1 (diff)
prepare for release.3.1.5
-rw-r--r--.gitattributes3
-rw-r--r--HISTORY4
-rw-r--r--buildscripts/texbuilder/quickstart/quickstart.tex2
-rw-r--r--framework/Data/Common/IbmDb2/TIbmColumnMetaData.php156
-rw-r--r--framework/Data/Common/IbmDb2/TIbmMetaData.php112
-rw-r--r--framework/Data/Common/IbmDb2/TIbmMetaDataInspector.php112
-rw-r--r--framework/PradoBase.php2
-rw-r--r--index.html8
8 files changed, 9 insertions, 390 deletions
diff --git a/.gitattributes b/.gitattributes
index 41f1f980..ffd8639a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2121,9 +2121,6 @@ framework/Data/ActiveRecord/TActiveRecordConfig.php -text
framework/Data/ActiveRecord/TActiveRecordCriteria.php -text
framework/Data/ActiveRecord/TActiveRecordGateway.php -text
framework/Data/ActiveRecord/TActiveRecordManager.php -text
-framework/Data/Common/IbmDb2/TIbmColumnMetaData.php -text
-framework/Data/Common/IbmDb2/TIbmMetaData.php -text
-framework/Data/Common/IbmDb2/TIbmMetaDataInspector.php -text
framework/Data/Common/Mssql/TMssqlCommandBuilder.php -text
framework/Data/Common/Mssql/TMssqlMetaData.php -text
framework/Data/Common/Mssql/TMssqlTableColumn.php -text
diff --git a/HISTORY b/HISTORY
index 761a44c2..5fdcdd25 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,4 +1,4 @@
-Version 3.1.5 (to be released)
+Version 3.1.5 May 24, 2009
BUG: Issue#55 - TPropertyAccess.get and has don't recognize magic getter __get (Yves)
BUG: Issue#68 - TSqlMapConfig::createSqlMapGateway(): assign current connection to cached TSqlMapManager to avoid loosing active transaction (Yves)
BUG: Issue#87 - TinyMCE : empty string disapears after encoding JS, that's a problem! (Christophe)
@@ -35,7 +35,7 @@ ENH: Issue#74 - Introduce a new property 'InvalidFinderResult' (related enum TAc
CHG: Issue#7 - Clients Scripts are not combined anymore in Debug application mode (Christophe)
ENH: Added caching of message files to TException (Michael)
ENH: Updated to scriptaculous 1.8.2 & Prototype 1.6.0.3
-ENH: clientscripts.php Updated to JSMin 1.1.1 - According to author 15% faster with 94% less memory usage (Yves)
+ENH: clientscripts.php Updated to JSMin 1.1.1 - According to author 15% faster with 94% less memory usage (Yves)
ENH: replace is_null() function calls with native language constuct (Yves)
ENH: replace array_push() function calls with native language constuct if make sense (Yves)
ENH: TBrowserLogRoute: add table-layout:auto and explicit set column with to avoid bad render behavior in table-layout:fixed environment, explicit set text color to increase readability (Yves)
diff --git a/buildscripts/texbuilder/quickstart/quickstart.tex b/buildscripts/texbuilder/quickstart/quickstart.tex
index de3d2a07..b1bf467e 100644
--- a/buildscripts/texbuilder/quickstart/quickstart.tex
+++ b/buildscripts/texbuilder/quickstart/quickstart.tex
@@ -52,7 +52,7 @@
%----------------- TITLE --------------
-\title{\Huge \bfseries PRADO v3.1.4 Quickstart Tutorial
+\title{\Huge \bfseries PRADO v3.1.5 Quickstart Tutorial
\thanks{Copyright 2004-2009. All Rights Reserved.}
}
\author{Qiang Xue and Wei Zhuo}
diff --git a/framework/Data/Common/IbmDb2/TIbmColumnMetaData.php b/framework/Data/Common/IbmDb2/TIbmColumnMetaData.php
deleted file mode 100644
index 3b7001ab..00000000
--- a/framework/Data/Common/IbmDb2/TIbmColumnMetaData.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-/**
- * TIbmColumnMetaData class file.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id: TIbmColumnMetaData.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- */
-
-/**
- * TIbmColumnMetaData class.
- *
- * Column details for IBM DB2 database. Using php_pdo_ibm.dll extension.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @version $Id: TIbmColumnMetaData.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- * @since 3.1
- */
-class TIbmColumnMetaData extends TComponent
-{
- private $_name;
- private $_type;
- private $_length;
- private $_autoIncrement;
- private $_default;
- private $_notNull=true;
-
- private $_isPrimary=null;
-
- private $_property;
-
- /**
- * Initialize column meta data.
- *
- * @param string column name.
- * @param string column data type.
- * @param string column data length.
- * @param boolean column can not be null.
- * @param string serial name.
- * @param string default value.
- */
- public function __construct($name,$type,$length,$notNull,$autoIncrement,$default,$primary)
- {
- $this->_property=$name;
- $this->_name=$name;
- $this->_type=$type;
- $this->_length=$length;
- $this->_notNull=$notNull;
- $this->_autoIncrement=$autoIncrement;
- $this->_default=$default;
- $this->_isPrimary=$primary;
- }
-
- /**
- * @return string quoted column name.
- */
- public function getName()
- {
- return $this->_name;
- }
-
- /**
- * @return integer length.
- */
- public function getLength()
- {
- return $this->_length;
- }
-
- /**
- * @return string active record property name
- */
- public function getProperty()
- {
- return $this->_property;
- }
-
- /**
- * @return boolean true if column is a sequence, false otherwise.
- */
- public function hasSequence()
- {
- return $this->_autoIncrement;
- }
-
- /**
- * @return null no sequence name.
- */
- public function getSequenceName()
- {
- return null;
- }
-
- /**
- * @return boolean true if the column is a primary key, or part of a composite primary key.
- */
- public function getIsPrimaryKey()
- {
- return $this->_isPrimary;
- }
-
- /**
- * @return string column type
- */
- public function getType()
- {
- return $this->_type;
- }
-
-
- /**
- * @return boolean false if column can be null, true otherwise.
- */
- public function getNotNull()
- {
- return $this->_notNull;
- }
-
- /**
- * @return boolean true if column has default value, false otherwise.
- */
- public function hasDefault()
- {
- return $this->_default !== null;
- }
-
- /**
- * @return string default column value.
- */
- public function getDefaultValue()
- {
- return $this->_default;
- }
-
- /**
- * @return string PHP primative type derived from the column type.
- */
- public function getPHPType()
- {
- switch(strtolower($this->_type))
- {
- case 'smallint': case 'integer':
- return 'integer';
- case 'real': case 'float': case 'double': case 'decimal': case 'bigint':
- return 'float';
- default:
- return 'string';
- }
- }
-
-}
-
diff --git a/framework/Data/Common/IbmDb2/TIbmMetaData.php b/framework/Data/Common/IbmDb2/TIbmMetaData.php
deleted file mode 100644
index 496bb12f..00000000
--- a/framework/Data/Common/IbmDb2/TIbmMetaData.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-
-/**
- * TIbmMetaData class file.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id: TIbmMetaData.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- */
-Prado::using('System.Data.ActiveRecord.Vendor.TDbMetaDataCommon');
-
-/**
- * TIbmMetaData class.
- *
- * Column details for IBM DB2 database. Using php_pdo_ibm.dll extension.
- *
- * Does not support LIMIT and OFFSET criterias.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @version $Id: TIbmMetaData.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- * @since 3.1
- */
-class TIbmMetaData extends TDbMetaDataCommon
-{
- /**
- * Build the SQL search string from the criteria object for IBM DB2 database.
- * @param TDbConnection database connection.
- * @param TActiveRecordCriteria search criteria.
- * @return string SQL search.
- */
- protected function getSqlFromCriteria($conn, $criteria)
- {
- if($criteria===null) return '';
- $sql = '';
- if(($condition = $criteria->getCondition())!==null)
- $sql .= ' WHERE '.$condition;
- $orders=array();
- foreach($criteria->getOrdersBy() as $by=>$ordering)
- $orders[] = $this->getOrdering($by, $ordering);
- if(count($orders) > 0)
- $sql .= ' ORDER BY '.implode(', ', $orders);
- //if(($limit = $criteria->getLimit())!==null)
- //{
- // $sql .= ' FETCH FIRST '.intval($limit).' ROWS ONLY';
- //}
- return strlen($sql) > 0 ? $sql : '';
- }
-
- /**
- * Lowercase the data keys, IBM DB2 returns uppercase column names
- * @param mixed record row
- * @return array record row
- */
- public function postQueryRow($row)
- {
- if(!is_array($row)) return $row;
- $result=array();
- foreach($row as $k=>$v)
- $result[strtolower($k)]=$v;
- return $result;
- }
-
- /**
- * Lowercase the data keys, IBM DB2 returns uppercase column names
- * @param mixed record row
- * @return array record row
- */
- public function postQuery($rows)
- {
- $data = array();
- foreach($rows as $k=>$v)
- $data[$k] = $this->postQueryRow($v);
- return $data;
- }
-
- public function getSearchRegExpCriteria($fields, $keywords)
- {
- if(strlen(trim($keywords)) == 0) return '';
- $words = array();
- preg_match_all('/([a-zA-Z0-9-+]+)/', $keywords, $words);
- $result = array();
- foreach($fields as $field)
- {
- $column = $this->getColumn($field);
- if($this->isSearchableColumn($column))
- $result[] = $this->getLikeCriteriaStr($column->getName(), $words[0]);
- }
- $a = '('.implode(' OR ', $result).')';
- error_log($a);
- return '('.implode(' OR ', $result).')';
- }
-
- protected function isSearchableColumn($column)
- {
- $type = strtolower($column->getType());
- return $type === 'char' || $type === 'varchar';
- }
-
- protected function getLikeCriteriaStr($column, $words)
- {
- $result=array();
- foreach($words as $word)
- $result[] = "{$column} LIKE '%{$word}%'";
- return '('.implode(' AND ', $result).')';
- }
-
-
-}
diff --git a/framework/Data/Common/IbmDb2/TIbmMetaDataInspector.php b/framework/Data/Common/IbmDb2/TIbmMetaDataInspector.php
deleted file mode 100644
index a37fad6e..00000000
--- a/framework/Data/Common/IbmDb2/TIbmMetaDataInspector.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * TIbmMetaDataInspector class file.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id: TIbmMetaDataInspector.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- */
-Prado::using('System.Data.ActiveRecord.Vendor.TDbMetaDataInspector');
-Prado::using('System.Data.ActiveRecord.Vendor.TIbmColumnMetaData');
-Prado::using('System.Data.ActiveRecord.Vendor.TIbmMetaData');
-
-/**
- * TIbmMetaDataInspector class.
- *
- * Column details for IBM DB2 database. Using php_pdo_ibm.dll extension.
- *
- * @author Cesar Ramos <cramos[at]gmail[dot]com>
- * @version $Id: TIbmMetaDataInspector.php 1807 2007-03-31 06:42:15Z wei $
- * @package System.Data.ActiveRecord.Vendor
- * @since 3.1
- */
-class TIbmMetaDataInspector extends TDbMetaDataInspector
-{
- private $_schema;
-
- /**
- * @param string default schema.
- */
- public function setSchema($schema)
- {
- $this->_schema=$schema;
- }
-
- /**
- * @return string default schema.
- */
- public function getSchema()
- {
- return $this->_schema;
- }
- /**
- * Get the column definitions for given table.
- * @param string table name.
- * @return array column name value pairs of column meta data.
- */
- protected function getColumnDefinitions($table)
- {
- if(count($parts= explode('.', $table)) > 1)
- {
- $tablename = $parts[1];
- $schema = $parts[0];
- }
- else
- {
- $tablename = $parts[0];
- $schema = $this->getSchema();
- }
- $sql="SELECT * FROM SYSCAT.COLUMNS WHERE TABNAME='".strtoupper($tablename)."'";
- if ($schema)
- $sql=$sql." AND TABSCHEMA='".strtoupper($schema)."'";
-
- $conn = $this->getDbConnection();
- $conn->setActive(true);
- $command = $conn->createCommand($sql);
- $command->prepare();
- $result=$command->query($sql);
- foreach ($result as $col)
- $cols[strtolower($col['COLNAME'])] = $this->getColumnMetaData($col);
- return $cols;
- }
-
- protected function getColumnMetaData($col)
- {
- $name = strtolower($col['COLNAME']);
- $type = $col['TYPENAME'];
- $length = $col['LENGTH'];
- $notNull = $col['NULLS']==='N'?1:0;
- $autoIncrement=$col['IDENTITY']==='Y'?1:0;
- $default = $col['DEFAULT'];
- $primaryKey = $col['KEYSEQ']?1:0;
- return new TIbmColumnMetaData($name,$type,$length,$notNull,$autoIncrement,$default,$primaryKey);
- }
-
- /**
- * Not implemented, IBM does not always have foreign key constraints.
- */
- protected function getConstraintKeys($table)
- {
- return array('primary'=>array(), 'foreign'=>array());
- }
-
- /**
- * Create a new instance of meta data.
- * @param string table name
- * @param array column meta data
- * @param array primary key meta data
- * @param array foreign key meta data.
- * @return TDbMetaData table meta data.
- */
- protected function createMetaData($table, $columns, $primary, $foreign)
- {
- $pks = array();
- foreach($columns as $name=>$column)
- if($column->getIsPrimaryKey())
- $pks[] = $name;
- return new TIbmMetaData($table,$columns,$pks);
- }
-}
diff --git a/framework/PradoBase.php b/framework/PradoBase.php
index 17f7b53c..37321afa 100644
--- a/framework/PradoBase.php
+++ b/framework/PradoBase.php
@@ -66,7 +66,7 @@ class PradoBase
*/
public static function getVersion()
{
- return '3.1.5a';
+ return '3.1.5';
}
/**
diff --git a/index.html b/index.html
index 231de79b..d1ce75b4 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
<body>
<h1>PRADO Framework for PHP 5 </h1>
-<p>Version 3.1.4, January 11, 2009<br>
+<p>Version 3.1.5, May 24, 2009<br>
Copyright&copy; 2004-2009 by <a href="http://www.pradosoft.com/">Prado Software</a><br>
All Rights Reserved.
</p>
@@ -86,12 +86,12 @@ PRADO component tags when you use it to edit PRADO templates.
<li><a href="mailto:qiang.xue@gmail.com">Qiang Xue</a></li>
<li><a href="mailto:weizhuo@gmail.com">Xiang Wei Zhuo</a></li>
<li><a href="mailto:jrags@jasrags.net">Jason Ragsdale</a></li>
-<li><a href="mailto:nyeholt@optushome.com.au">Marcus Nyeholt</a></li>
<li><a href="mailto:carlgmathisen@gmail.com">Carl Mathisen</a></li>
-<li><a href="mailto:compte_messagerie@hotmail.com">Alban Hanry</a></li>
<li><a href="mailto:knut.urdalen@gmail.com">Knut Urdalen</a></li>
<li><a href="mailto:Christophe.Boulain@gmail.com">Christophe Boulain</a></li>
<li><a href="mailto:haertl.mike@googlemail.com">Michael Härtl</a></li>
+<li><a href="mailto:eirikhm@gmail.com">Eirik Hoem</a></li>
+<li><a href="mailto:godzilla80@gmx.net">Yves Berkholz</a></li>
</ul>
<h3>Translations</h3>
@@ -110,6 +110,8 @@ PRADO component tags when you use it to edit PRADO templates.
<h3>Past Team Members</h3>
<ul>
+<li><a href="mailto:nyeholt@optushome.com.au">Marcus Nyeholt</a></li>
+<li><a href="mailto:compte_messagerie@hotmail.com">Alban Hanry</a></li>
<li><a href="mailto:alex@linium.net">Alex Flint</a></li>
<li><a href="mailto:luftyluft@gmail.com">Brian Luft</a></li>
<li><a href="mailto:j.todd.patrick@gmail.com">Todd Patrick</a></li>