Changeset 1583
- Timestamp:
- 25.02.2010 15:03:39 (5 months ago)
- Location:
- branches/1.5/runtime/lib
- Files:
-
- 3 modified
-
Propel.php (modified) (1 diff)
-
config/PropelConfiguration.php (modified) (2 diffs)
-
query/ModelCriteria.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/runtime/lib/Propel.php
r1582 r1583 460 460 } 461 461 462 if (! array_key_exists($name, self::$dbMaps)) {462 if (!isset(self::$dbMaps[$name])) { 463 463 $clazz = self::$databaseMapClass; 464 464 self::$dbMaps[$name] = new $clazz($name); -
branches/1.5/runtime/lib/config/PropelConfiguration.php
r1347 r1583 60 60 public function offsetExists($offset) 61 61 { 62 return isset($this->parameter[$offset]) ||array_key_exists($offset, $this->parameters);62 return array_key_exists($offset, $this->parameters); 63 63 } 64 64 … … 100 100 $parts = explode('.', $name); //name.space.name 101 101 while ($part = array_shift($parts)) { 102 if ( array_key_exists($part, $ret)) {102 if (isset($ret[$part])) { 103 103 $ret = $ret[$part]; 104 104 } else { -
branches/1.5/runtime/lib/query/ModelCriteria.php
r1580 r1583 481 481 list($fullName, $relationAlias) = self::getClassAndAlias($relation); 482 482 if (strpos($fullName, '.') === false) { 483 $tableMap = $this->getTableMap();483 // simple relation name, refers to the current table 484 484 $leftName = $this->getModelAliasOrName(); 485 485 $relationName = $fullName; 486 486 $previousJoin = null; 487 $tableMap = $this->getTableMap(); 487 488 } else { 488 489 list($leftName, $relationName) = explode('.', $fullName); … … 491 492 $previousJoin = null; 492 493 $tableMap = $this->getTableMap(); 493 } elseif ( array_key_exists($leftName, $this->joins)) {494 } elseif (isset($this->joins[$leftName])) { 494 495 $previousJoin = $this->joins[$leftName]; 495 496 $tableMap = $previousJoin->getTableMap(); … … 498 499 } 499 500 } 500 $leftTableAlias = array_key_exists($leftName, $this->aliases) ? $leftName : null;501 $leftTableAlias = isset($this->aliases[$leftName]) ? $leftName : null; 501 502 502 503 // find the RelationMap in the TableMap using the $relationName … … 589 590 public function with($relation) 590 591 { 591 if (! array_key_exists($relation, $this->joins)) {592 if (!isset($this->joins[$relation])) { 592 593 throw new PropelException('Unknown relation name or alias ' . $relation); 593 594 } … … 665 666 public function useQuery($relationName, $secondaryCriteriaClass = null) 666 667 { 667 if (! array_key_exists($relationName, $this->joins)) {668 if (!isset($this->joins[$relationName])) { 668 669 throw new PropelException('Unknown class or alias ' . $name); 669 670 } … … 691 692 public function endUse() 692 693 { 693 if ( array_key_exists($this->modelAlias, $this->aliases)) {694 if (isset($this->aliases[$this->modelAlias])) { 694 695 unset($this->aliases[$this->modelAlias]); 695 696 } … … 1451 1452 // column of the Criteria's model 1452 1453 $tableMap = $this->getTableMap(); 1453 } elseif ( array_key_exists($class, $this->joins)) {1454 } elseif (isset($this->joins[$class])) { 1454 1455 // column of a relations's model 1455 1456 $tableMap = $this->joins[$class]->getTableMap(); … … 1464 1465 if ($tableMap->hasColumnByPhpName($phpName)) { 1465 1466 $column = $tableMap->getColumnByPhpName($phpName); 1466 if ( array_key_exists($class, $this->aliases)) {1467 if (isset($this->aliases[$class])) { 1467 1468 $this->currentAlias = $class; 1468 1469 $realColumnName = $class . '.' . $column->getName();