Skip to content
Snippets Groups Projects
Commit 615e3522 authored by Tim Steiner's avatar Tim Steiner
Browse files

Updates for ZF 0.6.0 compatibility

parent 0f565387
No related branches found
No related tags found
No related merge requests found
Showing with 96 additions and 21 deletions
<?php <?php
require_once('Zend.php'); require_once 'Zend.php';
Zend::loadInterface( 'Nmc_Auth_Interface' ); require_once 'Nmc/Auth/Interface.php';
class Nmc_Auth_Ldap implements Nmc_Auth_Interface class Nmc_Auth_Ldap implements Nmc_Auth_Interface
{ {
......
<?php <?php
require_once('Zend.php'); require_once 'Zend.php';
Zend::loadInterface('Nmc_Auth_Interface'); require_once 'Nmc/Auth/Interface.php';
class Nmc_Auth_Multi implements Nmc_Auth_Interface class Nmc_Auth_Multi implements Nmc_Auth_Interface
{ {
......
<?php <?php
require_once('Zend.php'); require_once('Zend.php');
Zend::loadInterface('Nmc_Auth_Interface'); require_once 'Nmc/Auth/Interface.php';
class Nmc_Auth_Mysql implements Nmc_Auth_Interface class Nmc_Auth_Mysql implements Nmc_Auth_Interface
{ {
......
...@@ -32,11 +32,6 @@ abstract class Nmc_Controller_Action extends Zend_Controller_Action { ...@@ -32,11 +32,6 @@ abstract class Nmc_Controller_Action extends Zend_Controller_Action {
*/ */
protected $_pluginBroker; protected $_pluginBroker;
public function __construct()
{
parent::__construct();
}
public function run(Zend_Controller_Dispatcher_Interface $dispatcher, public function run(Zend_Controller_Dispatcher_Interface $dispatcher,
Zend_Controller_Dispatcher_Token $action) Zend_Controller_Dispatcher_Token $action)
{ {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* @since File available since Release 0.0.1 * @since File available since Release 0.0.1
*/ */
Zend::loadInterface('Nmc_Controller_Action_Plugin_Interface'); require_once 'Nmc/Controller/Action/Plugin/Interface.php';
/** /**
* * Nmc_Controller_Action_Plugin_Broker * * Nmc_Controller_Action_Plugin_Broker
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
*/ */
require_once('Zend.php'); require_once('Zend.php');
Zend::loadInterface('Nmc_SingletonInterface'); require_once 'Nmc/SingletonInterface.php';
/** /**
* Nmc_Db_RowManager - Keeps track of Nmc_Db_Table_Row instances * Nmc_Db_RowManager - Keeps track of Nmc_Db_Table_Row instances
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require_once('Zend.php'); require_once('Zend.php');
Zend::loadInterface('Nmc_SingletonInterface'); require_once 'Nmc/SingletonInterface.php';
Zend::loadClass('Zend_Db_Table'); Zend::loadClass('Zend_Db_Table');
abstract class Nmc_Db_Table abstract class Nmc_Db_Table
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require_once('Zend.php'); require_once('Zend.php');
Zend::loadInterface('Nmc_Db_Table_Relation_Interface'); require_once 'Nmc/Db/Table/Relation/Interface.php';
/** /**
* Nmc_Db_Table_Relation_Abstract * Nmc_Db_Table_Relation_Abstract
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* @since File available since Release 0.0.1 * @since File available since Release 0.0.1
*/ */
Zend::loadInterface('Nmc_EqualToInterface'); require_once 'Nmc/EqualToInterface.php';
Zend::loadClass('Zend_Db_Table_Row'); Zend::loadClass('Zend_Db_Table_Row');
/** /**
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @since File available since Release 0.0.1 * @since File available since Release 0.0.1
*/ */
Zend::loadInterface('Nmc_Registry_Interface'); require_once 'Nmc/Registry/Interface.php';
/** /**
* NMC Request Registry Class: stores information for the duration of the requst. * NMC Request Registry Class: stores information for the duration of the requst.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @since File available since Release 0.0.1 * @since File available since Release 0.0.1
*/ */
Zend::loadInterface('Nmc_Registry_Interface'); require_once 'Nmc/Registry/Interface.php';
/** /**
* NMC Request Registry Class: stores information for the duration of the requst. * NMC Request Registry Class: stores information for the duration of the requst.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* @since File available since Release 0.0.1 * @since File available since Release 0.0.1
*/ */
Zend::loadInterface('Nmc_Registry_Interface'); require_once 'Nmc/Registry/Interface.php';
/** /**
* NMC Request Registry Class: stores information for the duration of the requst. * NMC Request Registry Class: stores information for the duration of the requst.
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
*/ */
require_once('Zend.php'); require_once('Zend.php');
Zend::loadInterface('Nmc_Model_UserInterface'); require_once 'Nmc/Model/UserInterface.php';
/** /**
* Nmc_User - General user class, use to get info about current user * Nmc_User - General user class, use to get info about current user
......
...@@ -45,7 +45,11 @@ class Nmc_View extends Zend_View { ...@@ -45,7 +45,11 @@ class Nmc_View extends Zend_View {
$this->js_files[] = '/javascript/index.js'; $this->js_files[] = '/javascript/index.js';
} }
public function render($name = 'index.xhtml') { public function render($name) {
if($name == '') {
$name = 'index.xhtml';
}
if($this->page != '') { if($this->page != '') {
$this->css_files[] = '/css/' . $this->page . '.css'; $this->css_files[] = '/css/' . $this->page . '.css';
$this->js_files[] = '/javascript/' . $this->page . '.js'; $this->js_files[] = '/javascript/' . $this->page . '.js';
......
...@@ -25,7 +25,7 @@ class Nmc_View_Unl extends Zend_View ...@@ -25,7 +25,7 @@ class Nmc_View_Unl extends Zend_View
$this->css_files[] = $fileName; $this->css_files[] = $fileName;
} }
public function render($name = 'unl_index.xhtml') public function render($name)
{ {
if($name == null) { if($name == null) {
$name = 'unl_index.xhtml'; $name = 'unl_index.xhtml';
......
Binary files Zend/.DS_Store and Zend.new/.DS_Store differ
Binary files Zend/Controller/.DS_Store and Zend.new/Controller/.DS_Store differ
diff -ruN Zend/Db/Adapter/Abstract.php Zend.new/Db/Adapter/Abstract.php
--- Zend/Db/Adapter/Abstract.php 2006-11-15 11:45:10.000000000 -0600
+++ Zend.new/Db/Adapter/Abstract.php 2007-01-03 15:42:03.000000000 -0600
@@ -217,10 +217,14 @@
{
// col names come from the array keys
$cols = array_keys($bind);
+ $quotedCols = array();
+ foreach($cols as $key => $value) {
+ $quotedCols[$key] = $this->quoteIdentifier($value);
+ }
// build the statement
$sql = "INSERT INTO $table "
- . '(' . implode(', ', $cols) . ') '
+ . '(' . implode(', ', $quotedCols) . ') '
. 'VALUES (:' . implode(', :', $cols) . ')';
// execute the statement and return the number of affected rows
@@ -242,7 +246,8 @@
// build "col = :col" pairs for the statement
$set = array();
foreach ($bind as $col => $val) {
- $set[] = "$col = :$col";
+ $quotedCol = $this->quoteIdentifier($col);
+ $set[] = "$quotedCol = :$col";
}
// build the statement
diff -ruN Zend/Db/Select.php Zend.new/Db/Select.php
--- Zend/Db/Select.php 2006-11-15 11:45:10.000000000 -0600
+++ Zend.new/Db/Select.php 2007-01-03 15:42:03.000000000 -0600
@@ -205,8 +205,10 @@
*/
public function from($name, $cols = '*')
{
+ $quotedName = $this->_adapter->quoteIdentifier($name);
+
// add the table to the 'from' list
- $this->_parts['from'][$name] = null;
+ $this->_parts['from'][$quotedName] = null;
// add to the columns from this table
$this->_tableCols($name, $cols);
@@ -232,9 +234,11 @@
$type = null;
}
+ $quotedName = $this->_adapter->quoteIdentifier($name);
+
$this->_parts['join'][] = array(
'type' => $type,
- 'name' => $name,
+ 'name' => $quotedName,
'cond' => $cond
);
@@ -514,8 +518,15 @@
settype($cols, 'array');
}
+ $quotedTbl = $this->_adapter->quoteIdentifier($tbl);
+
foreach ($cols as $col) {
- $this->_parts['cols'][] = trim($col);
+ if($col != '*') {
+ $quotedCol = $this->_adapter->quoteIdentifier(trim($col));
+ } else {
+ $quotedCol = '*';
+ }
+ $this->_parts['cols'][] = $quotedTbl . '.' . $quotedCol;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment