Fixed bug #15047 Remove trailing whitespaces in front of EOL (Thanks to Nikolas Hagel...
authorSteffen Kamper <info@sk-typo3.de>
Fri, 9 Jul 2010 07:23:33 +0000 (07:23 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 9 Jul 2010 07:23:33 +0000 (07:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8143 709f56b5-9817-0410-a4d7-c38de5d9e867

38 files changed:
ChangeLog
t3lib/class.t3lib_clipboard.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_spritemanager.php
t3lib/class.t3lib_tstemplate.php
t3lib/stddb/tables.php
typo3/alt_file_navframe.php
typo3/classes/class.clearcachemenu.php
typo3/db_new.php
typo3/file_list.php
typo3/install/index.php
typo3/mod/tools/em/class.em_index.php
typo3/mod/web/perm/index.php
typo3/sysext/adodb/adodb/adodb-active-recordx.inc.php
typo3/sysext/adodb/adodb/adodb-errorhandler.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-netezza.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbtp.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_pgsql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sqlanywhere.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php
typo3/sysext/beuser/mod/index.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Persistence/LazyLoadingProxy.php
typo3/sysext/extbase/Classes/Persistence/QOM/QueryObjectModelFactory.php
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php
typo3/sysext/extbase/Tests/MVC/Controller/ActionController_testcase.php
typo3/sysext/extbase/Tests/MVC/Web/Routing/UriBuilder_testcase.php
typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
typo3/sysext/lang/lang.php
typo3/sysext/statictemplates/class.tx_statictemplates.php

index 6e607f8..ad01a49 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-09  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #15047 Remove trailing whitespaces in front of EOL (Thanks to Nikolas Hagelstein)
+
 2010-07-08  Susanne Moog  <typo3@susanne-moog.de>
 
        * Follow-up to #14719: Wrong code comment (QUICKSTART/FIRST_INSTALL) (thanks to Steffen Gebert)
index 6dab430..8d71460 100644 (file)
@@ -366,7 +366,7 @@ class t3lib_clipboard {
                                '</td>
                                <td>'.
                                '<a href="'.htmlspecialchars($rmall_url).'#clip_head">'.
-                                       t3lib_iconWorks::getSpriteIcon('actions-document-close', array('title' => $LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear', TRUE))) . 
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-close', array('title' => $LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear', TRUE))) .
                                '</a></td>
                        </tr>';
 
index 7dd28b7..9f90713 100644 (file)
@@ -751,7 +751,7 @@ class t3lib_htmlmail {
                        $theParts = explode('/',$this->auto_respond_msg,2);
                        $theParts[0] = str_replace('###SUBJECT###', $this->subject, $theParts[0]);
                        $theParts[1] = str_replace("/",LF,$theParts[1]);
-                       $theParts[1] = str_replace("###MESSAGE###", $this->getContent('plain'), $theParts[1]);                  
+                       $theParts[1] = str_replace("###MESSAGE###", $this->getContent('plain'), $theParts[1]);
                        if ($returnPathPossible) {
                                $mailWasSent = t3lib_utility_Mail::mail($this->from_email,
                                        $theParts[0],
index d4cd163..fe0e043 100644 (file)
@@ -201,4 +201,4 @@ class t3lib_SpriteManager {
        }
 }
 
-?>
+?>
\ No newline at end of file
index 2ea0f41..ca46069 100644 (file)
@@ -572,7 +572,7 @@ class t3lib_TStemplate      {
                                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
                                }
                        } else {
-                                       // Normal Operation, which is to include the "based-on" sys_templates, 
+                                       // Normal Operation, which is to include the "based-on" sys_templates,
                                        // if they are not already included, and maintaining the sorting of the templates
                                $basedOnIds = t3lib_div::intExplode(',', $row['basedOn']);
 
@@ -591,7 +591,7 @@ class t3lib_TStemplate      {
                                );
 
                                        // traversing list again to ensure the sorting of the templates
-                               foreach ($basedOnIds as $id) { 
+                               foreach ($basedOnIds as $id) {
                                        if (is_array($subTemplates[$id])) {
                                                $this->versionOL($subTemplates[$id]);
                                                $this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
index c63d885..7676f63 100644 (file)
@@ -179,7 +179,7 @@ $TCA['pages'] = array(
                        'contains-board' => 'apps-pagetree-folder-contains-board',
                        'contains-news' => 'apps-pagetree-folder-contains-news',
                        'default' => 'apps-pagetree-page-default',
-                       
+
                ),
                'typeicons' => array(
                        '1' => 'pages.gif',
@@ -329,7 +329,7 @@ $TCA['be_users'] = array(
                        '0' => 'status-user-backend',
                        '1' => 'status-user-admin',
                        'default' => 'status-user-backend',
-               ), 
+               ),
                'mainpalette' => '1',
                'useColumnsForDefaultValues' => 'usergroup,lockToDomain,options,db_mountpoints,file_mountpoints,fileoper_perms,userMods',
                'dividers2tabs' => true,
@@ -361,7 +361,7 @@ $TCA['be_groups'] = array(
                ),
                'typeicon_classes' => array(
                        'default' => 'status-user-group-backend',
-               ), 
+               ),
                'enablecolumns' => array(
                        'disabled' => 'hidden'
                ),
@@ -417,7 +417,7 @@ $TCA['sys_language'] = array(
                ),
                'typeicon_classes' => array(
                        'default' => 'mimetypes-x-sys_language',
-               ), 
+               ),
                'dynamicConfigFile' => 'T3LIB:tbl_be.php',
                'versioningWS_alwaysAllowLiveEdit' => TRUE
        )
index 0c642dd..537ea9b 100644 (file)
@@ -274,7 +274,7 @@ class SC_alt_file_navframe {
 
                        // Refresh
                $buttons['refresh'] = '<a href="' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')) . '">' .
-                               t3lib_iconWorks::getSpriteIcon('actions-system-refresh') . 
+                               t3lib_iconWorks::getSpriteIcon('actions-system-refresh') .
                '</a>';
 
                        // CSH
index b2030ec..8d525e2 100644 (file)
@@ -138,7 +138,7 @@ class ClearCacheMenu implements backend_toolbarItem {
                $cacheMenu = array();
 
                $cacheMenu[] = '<a href="#" class="toolbar-item">' .
-                       t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-cache', array('title' => $title)) . 
+                       t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-cache', array('title' => $title)) .
                        '</a>';
 
                $cacheMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
index 9762730..03c47d6 100644 (file)
@@ -381,7 +381,7 @@ class SC_db_new {
                $table = 'pages';
                $v = $GLOBALS['TCA'][$table];
                $pageIcon = t3lib_iconWorks::getSpriteIconForRecord($table,array());
-                                               
+
                $newPageIcon = t3lib_iconWorks::getSpriteIcon('actions-page-new');
                $rowContent = $firstLevel . $newPageIcon . '&nbsp;<strong>' . $GLOBALS['LANG']->getLL('createNewPage') . '</strong>';
 
index acf3229..28dd0b4 100644 (file)
@@ -411,11 +411,11 @@ class SC_file_list {
                $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE);
 
                        // upload button
-               $buttons['upload'] = '<a href="' . $BACK_PATH . 'file_upload.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" id="button-upload" title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload',1)).'">' . 
+               $buttons['upload'] = '<a href="' . $BACK_PATH . 'file_upload.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" id="button-upload" title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.upload',1)).'">' .
                        t3lib_iconWorks::getSpriteIcon('actions-edit-upload') .
                '</a>';
 
-               $buttons['new'] = '<a href="' . $BACK_PATH . 'file_newfolder.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new',1)).'">' . 
+               $buttons['new'] = '<a href="' . $BACK_PATH . 'file_newfolder.php?target=' . rawurlencode($this->id) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.new',1)).'">' .
                        t3lib_iconWorks::getSpriteIcon('actions-document-new') .
                '</a>';
 
index f88dd15..4b016ad 100755 (executable)
@@ -81,7 +81,7 @@ if (1==2 || !is_file($enableInstallToolFile)) {
                '../contrib/prototype/prototype.js"></script>' . LF;
        $javascript .= '<script type="text/javascript" src="' .
                '../sysext/install/Resources/Public/Javascript/install.js"></script>';
-       
+
                // Get the template file
        $template = @file_get_contents($PATH_site . '/typo3/templates/install.html');
                // Define the markers content
@@ -95,12 +95,12 @@ if (1==2 || !is_file($enableInstallToolFile)) {
                        </p>
                        <ul>
                                <li>
-                                       In the typo3conf/ folder, create a file named ENABLE_INSTALL_TOOL. The file name is 
+                                       In the typo3conf/ folder, create a file named ENABLE_INSTALL_TOOL. The file name is
                                        case sensitive, but the file itself can simply be an empty file.
                                </li>
                                <li class="t3-install-locked-user-settings">
                                        Alternatively, in the Backend, go to <a href="../sysext/setup/mod/index.php">User tools &gt; User settings</a>
-                                       and let TYPO3 create this file for you. When you\'re finished, you can also visit 
+                                       and let TYPO3 create this file for you. When you\'re finished, you can also visit
                                        <a href="../sysext/setup/mod/index.php">User tools &gt; User settings</a> and delete the file from there.
                                </li>
                        </ul>
index f4b0f51..7b0d80a 100644 (file)
@@ -3637,7 +3637,7 @@ EXTENSION KEYS:
         * @return      string          <img> + text string.
         */
        function noImportMsg()  {
-               return t3lib_iconWorks::getSpriteIcon('status-dialog-warning') . 
+               return t3lib_iconWorks::getSpriteIcon('status-dialog-warning') .
                        '<strong>' . $GLOBALS['LANG']->getLL('helperFunction_import_not_possible') . '</strong>';
        }
 
@@ -5434,7 +5434,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                                        <td><img src="clear.gif" width="10" height="1" alt="" /></td>
                                                        <td nowrap="nowrap">' .
                                                                ($exist ?
-                                                                       t3lib_iconWorks::getSpriteIcon('status-dialog-warning') . 
+                                                                       t3lib_iconWorks::getSpriteIcon('status-dialog-warning') .
                                                                        $GLOBALS['LANG']->getLL('checkDBupdates_table_exists')
                                                                        : '') .
                                                        '</td>
index 4cf2158..1236d15 100755 (executable)
@@ -602,7 +602,7 @@ class SC_mod_web_perm_index {
                                        <td align="center">' . $LANG->getLL('Everybody', TRUE) . '</td>
                                        <td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
                                        <td align="center">' . $LANG->getLL('EditLock', TRUE) . '</td>
-                               </tr>   
+                               </tr>
                        ';
                } else {
                        $code.='
index 6d270b6..2d9c521 100644 (file)
@@ -3,18 +3,18 @@
 
 @version V5.06 29 Sept 2008   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
   Latest version is available at http://adodb.sourceforge.net
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
+
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence.
-  
+
   Active Record implementation. Superset of Zend Framework's.
-  
-  This is "Active Record eXtended" to support JOIN, WORK and LAZY mode by Chris Ravenscroft  chris#voilaweb.com 
-  
+
+  This is "Active Record eXtended" to support JOIN, WORK and LAZY mode by Chris Ravenscroft  chris#voilaweb.com
+
   Version 0.9
-  
-  See http://www-128.ibm.com/developerworks/java/library/j-cb03076/?ca=dgr-lnxw01ActiveRecord 
+
+  See http://www-128.ibm.com/developerworks/java/library/j-cb03076/?ca=dgr-lnxw01ActiveRecord
        for info on Ruby on Rails Active Record implementation
 */
 
@@ -63,29 +63,29 @@ class ADODB_Active_Table {
 function ADODB_SetDatabaseAdapter(&$db)
 {
        global $_ADODB_ACTIVE_DBS;
-       
+
                foreach($_ADODB_ACTIVE_DBS as $k => $d) {
                        if (PHP_VERSION >= 5) {
                                if ($d->db === $db) return $k;
                        } else {
-                               if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) 
+                               if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database)
                                        return $k;
                        }
                }
-               
+
                $obj = new ADODB_Active_DB();
                $obj->db = $db;
                $obj->tables = array();
-               
+
                $_ADODB_ACTIVE_DBS[] = $obj;
-               
+
                return sizeof($_ADODB_ACTIVE_DBS)-1;
 }
 
 
 class ADODB_Active_Record {
        static $_changeNames = true; // dynamically pluralize table names
-       static $_foreignSuffix = '_id'; // 
+       static $_foreignSuffix = '_id'; //
        var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat]
        var $_table; // tablename, if set in class definition then use it as table name
        var $_sTable; // singularized table name
@@ -106,18 +106,18 @@ class ADODB_Active_Record {
        }
 
        // should be static
-       static function SetDatabaseAdapter(&$db) 
+       static function SetDatabaseAdapter(&$db)
        {
                return ADODB_SetDatabaseAdapter($db);
        }
-       
-       
+
+
        public function __set($name, $value)
        {
                $name = str_replace(' ', '_', $name);
                $this->$name = $value;
        }
-       
+
        // php5 constructor
        // Note: if $table is defined, then we will use it as our table name
        // Otherwise we will use our classname...
@@ -131,12 +131,12 @@ class ADODB_Active_Record {
        function __construct($table = false, $pkeyarr=false, $db=false, $options=array())
        {
        global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS;
-       
+
                if ($db == false && is_object($pkeyarr)) {
                        $db = $pkeyarr;
                        $pkeyarr = false;
                }
-               
+
                if($table)
                {
                        // table argument exists. It is expected to be
@@ -159,10 +159,10 @@ class ADODB_Active_Record {
                        $this->_dbat = ADODB_Active_Record::SetDatabaseAdapter($db);
                } else
                        $this->_dbat = sizeof($_ADODB_ACTIVE_DBS)-1;
-               
-               
+
+
                if ($this->_dbat < 0) $this->Error("No database connection set; use ADOdb_Active_Record::SetDatabaseAdapter(\$db)",'ADODB_Active_Record::__constructor');
-               
+
                $this->_tableat = $this->_table; # reserved for setting the assoc value to a non-table name, eg. the sql string in future
 
                // CFR: Just added this option because UpdateActiveTable() can refresh its information
@@ -178,13 +178,13 @@ class ADODB_Active_Record {
                        $table->_belongsTo = array();
                }
        }
-       
+
        function __wakeup()
        {
                $class = get_class($this);
                new $class;
        }
-       
+
        // CFR: Constants found in Rails
        static $IrregularP = array(
                'PERSON'    => 'people',
@@ -231,26 +231,26 @@ class ADODB_Active_Record {
                $lastc2 = substr($ut,$len-2);
                switch ($lastc) {
                case 'S':
-                       return $table.'es';     
+                       return $table.'es';
                case 'Y':
                        return substr($table,0,$len-1).'ies';
-               case 'X':       
+               case 'X':
                        return $table.'es';
-               case 'H': 
+               case 'H':
                        if ($lastc2 == 'CH' || $lastc2 == 'SH')
                                return $table.'es';
                default:
                        return $table.'s';
                }
        }
-       
+
        // CFR Lamest singular inflector ever - @todo Make it real!
        // Note: There is an assumption here...and it is that the argument's length >= 4
        function _singularize($table)
        {
-       
+
                if (!ADODB_Active_Record::$_changeNames) return $table;
-       
+
                $ut = strtoupper($table);
                if(isset(self::$WeIsI[$ut]))
                {
@@ -320,7 +320,7 @@ class ADODB_Active_Record {
                $ar->foreignName = $foreignRef;
                $ar->UpdateActiveTable();
                $ar->foreignKey = ($foreignKey) ? $foreignKey : $ar->foreignName . self::$_foreignSuffix;
-               
+
                $table =& $this->TableInfo();
                if(!isset($table->_belongsTo[$foreignRef]))
                {
@@ -332,8 +332,8 @@ class ADODB_Active_Record {
 
        /**
         * __get Access properties - used for lazy loading
-        * 
-        * @param mixed $name 
+        *
+        * @param mixed $name
         * @access protected
         * @return void
         */
@@ -348,12 +348,12 @@ class ADODB_Active_Record {
                if($offset >= 0) $extras['offset'] = $offset;
                if($limit >= 0) $extras['limit'] = $limit;
                $table =& $this->TableInfo();
-               
-               if (strlen($whereOrderBy)) 
+
+               if (strlen($whereOrderBy))
                        if (!preg_match('/^[ \n\r]*AND/i',$whereOrderBy))
                                if (!preg_match('/^[ \n\r]*ORDER[ \n\r]/i',$whereOrderBy))
                                        $whereOrderBy = 'AND '.$whereOrderBy;
-                                       
+
                if(!empty($table->_belongsTo[$name]))
                {
                        $obj = $table->_belongsTo[$name];
@@ -366,7 +366,7 @@ class ADODB_Active_Record {
                                        $belongsToId = $k;
                                else
                                        $belongsToId = 'id';
-                               
+
                                $arrayOfOne =
                                        $obj->Find(
                                                $belongsToId.'='.$this->$columnName.' '.$whereOrderBy, false, false, $extras);
@@ -380,7 +380,7 @@ class ADODB_Active_Record {
                        if(($k = reset($table->keys)))
                                $hasManyId   = $k;
                        else
-                               $hasManyId   = 'id';                    
+                               $hasManyId   = 'id';
 
                        $this->$name =
                                $obj->Find(
@@ -389,7 +389,7 @@ class ADODB_Active_Record {
                }
        }
        //////////////////////////////////
-       
+
        // update metadata
        function UpdateActiveTable($pkeys=false,$forceUpdate=false)
        {
@@ -405,14 +405,14 @@ class ADODB_Active_Record {
 
                        $tobj = $tables[$tableat];
                        foreach($tobj->flds as $name => $fld) {
-                       if ($ADODB_ACTIVE_DEFVALS && isset($fld->default_value)) 
+                       if ($ADODB_ACTIVE_DEFVALS && isset($fld->default_value))
                                $this->$name = $fld->default_value;
                        else
                                $this->$name = null;
                        }
                        return;
                }
-               
+
                $db = $activedb->db;
                $fname = $ADODB_CACHE_DIR . '/adodb_' . $db->databaseType . '_active_'. $table . '.cache';
                if (!$forceUpdate && $ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR && file_exists($fname)) {
@@ -420,11 +420,11 @@ class ADODB_Active_Record {
                        @flock($fp, LOCK_SH);
                        $acttab = unserialize(fread($fp,100000));
                        fclose($fp);
-                       if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) { 
+                       if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) {
                                // abs(rand()) randomizes deletion, reducing contention to delete/refresh file
                                // ideally, you should cache at least 32 secs
                                $activedb->tables[$table] = $acttab;
-                               
+
                                //if ($db->debug) ADOConnection::outp("Reading cached active record file: $fname");
                                return;
                        } else if ($db->debug) {
@@ -433,18 +433,18 @@ class ADODB_Active_Record {
                }
                $activetab = new ADODB_Active_Table();
                $activetab->name = $table;
-               
+
                $save = $ADODB_FETCH_MODE;
                $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
                if ($db->fetchMode !== false) $savem = $db->SetFetchMode(false);
-               
+
                $cols = $db->MetaColumns($table);
-               
+
                if (isset($savem)) $db->SetFetchMode($savem);
                $ADODB_FETCH_MODE = $save;
-               
+
                if (!$cols) {
-                       $this->Error("Invalid table name: $table",'UpdateActiveTable'); 
+                       $this->Error("Invalid table name: $table",'UpdateActiveTable');
                        return false;
                }
                $fld = reset($cols);
@@ -454,17 +454,17 @@ class ADODB_Active_Record {
                                foreach($cols as $name => $fld) {
                                        if (!empty($fld->primary_key)) $pkeys[] = $name;
                                }
-                       } else  
+                       } else
                                $pkeys = $this->GetPrimaryKeys($db, $table);
                }
                if (empty($pkeys)) {
                        $this->Error("No primary key found for table $table",'UpdateActiveTable');
                        return false;
                }
-               
+
                $attr = array();
                $keys = array();
-               
+
                switch($ADODB_ASSOC_CASE) {
                case 0:
                        foreach($cols as $name => $fldobj) {
@@ -479,18 +479,18 @@ class ADODB_Active_Record {
                                $keys[strtolower($name)] = strtolower($name);
                        }
                        break;
-                       
-               case 1: 
+
+               case 1:
                        foreach($cols as $name => $fldobj) {
                                $name = strtoupper($name);
-               
+
                 if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value))
                     $this->$name = $fldobj->default_value;
                 else
                                        $this->$name = null;
                                $attr[$name] = $fldobj;
                        }
-                       
+
                        foreach($pkeys as $k => $name) {
                                $keys[strtoupper($name)] = strtoupper($name);
                        }
@@ -498,7 +498,7 @@ class ADODB_Active_Record {
                default:
                        foreach($cols as $name => $fldobj) {
                                $name = ($fldobj->name);
-                
+
                 if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value))
                     $this->$name = $fldobj->default_value;
                 else
@@ -510,7 +510,7 @@ class ADODB_Active_Record {
                        }
                        break;
                }
-               
+
                $activetab->keys = $keys;
                $activetab->flds = $attr;
                $activetab->updateColsCount();
@@ -523,58 +523,58 @@ class ADODB_Active_Record {
                }
                if (isset($activedb->tables[$table])) {
                        $oldtab = $activedb->tables[$table];
-               
+
                        if ($oldtab) $activetab->_belongsTo = $oldtab->_belongsTo;
                        if ($oldtab) $activetab->_hasMany = $oldtab->_hasMany;
                }
                $activedb->tables[$table] = $activetab;
        }
-       
+
        function GetPrimaryKeys(&$db, $table)
        {
                return $db->MetaPrimaryKeys($table);
        }
-       
-       // error handler for both PHP4+5. 
+
+       // error handler for both PHP4+5.
        function Error($err,$fn)
        {
        global $_ADODB_ACTIVE_DBS;
-       
+
                $fn = get_class($this).'::'.$fn;
                $this->_lasterr = $fn.': '.$err;
-               
+
                if ($this->_dbat < 0) $db = false;
                else {
                        $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
                        $db = $activedb->db;
                }
-               
-               if (function_exists('adodb_throw')) {   
+
+               if (function_exists('adodb_throw')) {
                        if (!$db) adodb_throw('ADOdb_Active_Record', $fn, -1, $err, 0, 0, false);
                        else adodb_throw($db->databaseType, $fn, -1, $err, 0, 0, $db);
                } else
                        if (!$db || $db->debug) ADOConnection::outp($this->_lasterr);
-               
+
        }
-       
+
        // return last error message
        function ErrorMsg()
        {
                if (!function_exists('adodb_throw')) {
                        if ($this->_dbat < 0) $db = false;
                        else $db = $this->DB();
-               
+
                        // last error could be database error too
                        if ($db && $db->ErrorMsg()) return $db->ErrorMsg();
                }
                return $this->_lasterr;
        }
-       
-       function ErrorNo() 
+
+       function ErrorNo()
        {
                if ($this->_dbat < 0) return -9999; // no database connection...
                $db = $this->DB();
-               
+
                return (int) $db->ErrorNo();
        }
 
@@ -583,7 +583,7 @@ class ADODB_Active_Record {
        function DB()
        {
        global $_ADODB_ACTIVE_DBS;
-       
+
                if ($this->_dbat < 0) {
                        $false = false;
                        $this->Error("No database connection set: use ADOdb_Active_Record::SetDatabaseAdaptor(\$db)", "DB");
@@ -593,18 +593,18 @@ class ADODB_Active_Record {
                $db = $activedb->db;
                return $db;
        }
-       
+
        // retrieve ADODB_Active_Table
        function &TableInfo()
        {
        global $_ADODB_ACTIVE_DBS;
-       
+
                $activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
                $table = $activedb->tables[$this->_tableat];
                return $table;
        }
-       
-       
+
+
        // I have an ON INSERT trigger on a table that sets other columns in the table.
        // So, I find that for myTable, I want to reload an active record after saving it. -- Malcolm Cook
        function Reload()
@@ -615,21 +615,21 @@ class ADODB_Active_Record {
                return($this->Load($where));
        }
 
-       
+
        // set a numeric array (using natural table field ordering) as object properties
        function Set(&$row)
        {
        global $ACTIVE_RECORD_SAFETY;
-       
+
                $db = $this->DB();
-               
+
                if (!$row) {
-                       $this->_saved = false;          
+                       $this->_saved = false;
                        return false;
                }
-               
+
                $this->_saved = true;
-               
+
                $table = $this->TableInfo();
                $sizeofFlds = sizeof($table->flds);
                $sizeofRow  = sizeof($row);
@@ -687,7 +687,7 @@ class ADODB_Active_Record {
         # </AP>
                return true;
        }
-       
+
        // get last inserted id for INSERT
        function LastInsertID(&$db,$fieldname)
        {
@@ -695,14 +695,14 @@ class ADODB_Active_Record {
                        $val = $db->Insert_ID($this->_table,$fieldname);
                else
                        $val = false;
-                       
+
                if (is_null($val) || $val === false) {
                        // this might not work reliably in multi-user environment
                        return $db->GetOne("select max(".$fieldname.") from ".$this->_table);
                }
                return $val;
        }
-       
+
        // quote data in where clause
        function doquote(&$db, $val,$t)
        {
@@ -710,13 +710,13 @@ class ADODB_Active_Record {
                case 'D':
                case 'T':
                        if (empty($val)) return 'null';
-                       
+
                case 'C':
                case 'X':
                        if (is_null($val)) return 'null';
-                       
-                       if (strlen($val)>1 && 
-                               (strncmp($val,"'",1) != 0 || substr($val,strlen($val)-1,1) != "'")) { 
+
+                       if (strlen($val)>1 &&
+                               (strncmp($val,"'",1) != 0 || substr($val,strlen($val)-1,1) != "'")) {
                                return $db->qstr($val);
                                break;
                        }
@@ -725,13 +725,13 @@ class ADODB_Active_Record {
                        break;
                }
        }
-       
+
        // generate where clause for an UPDATE/SELECT
        function GenWhere(&$db, &$table)
        {
                $keys = $table->keys;
                $parr = array();
-               
+
                foreach($keys as $k) {
                        $f = $table->flds[$k];
                        if ($f) {
@@ -740,15 +740,15 @@ class ADODB_Active_Record {
                }
                return implode(' and ', $parr);
        }
-       
-       
+
+
        //------------------------------------------------------------ Public functions below
-       
+
        function Load($where=null,$bindarr=false)
        {
                $db = $this->DB(); if (!$db) return false;
                $this->_where = $where;
-               
+
                $save = $db->SetFetchMode(ADODB_FETCH_NUM);
                $qry = "select * from ".$this->_table;
                $table =& $this->TableInfo();
@@ -757,7 +757,7 @@ class ADODB_Active_Record {
                        $hasManyId   = $k;
                else
                        $hasManyId   = 'id';
-               
+
                foreach($table->_belongsTo as $foreignTable)
                {
                        if(($k = reset($foreignTable->TableInfo()->keys)))
@@ -780,7 +780,7 @@ class ADODB_Active_Record {
                }
                if($where)
                        $qry .= ' WHERE '.$where;
-               
+
                // Simple case: no relations. Load row and return.
                if((count($table->_hasMany) + count($table->_belongsTo)) < 1)
                {
@@ -790,7 +790,7 @@ class ADODB_Active_Record {
                        $db->SetFetchMode($save);
                        return $this->Set($row);
                }
-               
+
                // More complex case when relations have to be collated
                $rows = $db->GetAll($qry,$bindarr);
                if(!$rows)
@@ -800,7 +800,7 @@ class ADODB_Active_Record {
                        return false;
                $class = get_class($this);
                $isFirstRow = true;
-               
+
                if(($k = reset($this->TableInfo()->keys)))
                        $myId   = $k;
                else
@@ -819,7 +819,7 @@ class ADODB_Active_Record {
                }
                if(!$found)
                        $this->outp_throw("Unable to locate key $myId for $class in Load()",'Load');
-               
+
                foreach($rows as $row)
                {
                        $rowId = intval($row[$index]);
@@ -873,21 +873,21 @@ class ADODB_Active_Record {
                                                        }
                                                }
                                        }
-                               }                               
+                               }
                        }
                }
                return true;
        }
-       
+
        // false on error
        function Save()
        {
                if ($this->_saved) $ok = $this->Update();
                else $ok = $this->Insert();
-               
+
                return $ok;
        }
-       
+
        // CFR: Sometimes we may wish to consider that an object is not to be replaced but inserted.
        // Sample use case: an 'undo' command object (after a delete())
        function Dirty()
@@ -901,7 +901,7 @@ class ADODB_Active_Record {
                $db = $this->DB(); if (!$db) return false;
                $cnt = 0;
                $table = $this->TableInfo();
-               
+
                $valarr = array();
                $names = array();
                $valstr = array();
@@ -915,7 +915,7 @@ class ADODB_Active_Record {
                                $cnt += 1;
                        }
                }
-               
+
                if (empty($names)){
                        foreach($table->flds as $name=>$fld) {
                                $valarr[] = null;
@@ -926,7 +926,7 @@ class ADODB_Active_Record {
                }
                $sql = 'INSERT INTO '.$this->_table."(".implode(',',$names).') VALUES ('.implode(',',$valstr).')';
                $ok = $db->Execute($sql,$valarr);
-               
+
                if ($ok) {
                        $this->_saved = true;
                        $autoinc = false;
@@ -941,23 +941,23 @@ class ADODB_Active_Record {
                                $this->$k = $this->LastInsertID($db,$k);
                        }
                }
-               
+
                $this->_original = $valarr;
                return !empty($ok);
        }
-       
+
        function Delete()
        {
                $db = $this->DB(); if (!$db) return false;
                $table = $this->TableInfo();
-               
+
                $where = $this->GenWhere($db,$table);
                $sql = 'DELETE FROM '.$this->_table.' WHERE '.$where;
                $ok = $db->Execute($sql);
-               
+
                return $ok ? true : false;
        }
-       
+
        // returns an array of active record objects
        function Find($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array())
        {
@@ -967,7 +967,7 @@ class ADODB_Active_Record {
                        array('foreignName'=>$this->foreignName, 'belongsTo'=>$table->_belongsTo, 'hasMany'=>$table->_hasMany));
                return $arr;
        }
-       
+
        // CFR: In introduced this method to ensure that inner workings are not disturbed by
        // subclasses...for instance when GetActiveRecordsClass invokes Find()
        // Why am I not invoking parent::Find?
@@ -985,12 +985,12 @@ class ADODB_Active_Record {
        function Replace()
        {
        global $ADODB_ASSOC_CASE;
-               
+
                $db = $this->DB(); if (!$db) return false;
                $table = $this->TableInfo();
-               
+
                $pkey = $table->keys;
-               
+
                foreach($table->flds as $name=>$fld) {
                        $val = $this->$name;
                        /*
@@ -1010,17 +1010,17 @@ class ADODB_Active_Record {
                        $arr[$name] = $this->doquote($db,$val,$t);
                        $valarr[] = $val;
                }
-               
+
                if (!is_array($pkey)) $pkey = array($pkey);
-               
-               
-               if ($ADODB_ASSOC_CASE == 0) 
+
+
+               if ($ADODB_ASSOC_CASE == 0)
                        foreach($pkey as $k => $v)
                                $pkey[$k] = strtolower($v);
-               elseif ($ADODB_ASSOC_CASE == 1) 
+               elseif ($ADODB_ASSOC_CASE == 1)
                        foreach($pkey as $k => $v)
                                $pkey[$k] = strtoupper($v);
-                               
+
                $ok = $db->Replace($this->_table,$arr,$pkey);
                if ($ok) {
                        $this->_saved = true; // 1= update 2=insert
@@ -1037,9 +1037,9 @@ class ADODB_Active_Record {
                                        $this->$k = $this->LastInsertID($db,$k);
                                }
                        }
-                       
+
                        $this->_original = $valarr;
-               } 
+               }
                return $ok;
        }
 
@@ -1048,14 +1048,14 @@ class ADODB_Active_Record {
        {
                $db = $this->DB(); if (!$db) return false;
                $table = $this->TableInfo();
-               
+
                $where = $this->GenWhere($db, $table);
-               
+
                if (!$where) {
                        $this->error("Where missing for table $table", "Update");
                        return false;
                }
-               $valarr = array(); 
+               $valarr = array();
                $neworig = array();
                $pairs = array();
                $i = -1;
@@ -1064,11 +1064,11 @@ class ADODB_Active_Record {
                        $i += 1;
                        $val = $this->$name;
                        $neworig[] = $val;
-                       
+
                        if (isset($table->keys[$name])) {
                                continue;
                        }
-                       
+
                        if (is_null($val)) {
                                if (isset($fld->not_null) && $fld->not_null) {
                                        if (isset($fld->default_value) && strlen($fld->default_value)) continue;
@@ -1078,16 +1078,16 @@ class ADODB_Active_Record {
                                        }
                                }
                        }
-                       
+
                        if (isset($this->_original[$i]) && $val == $this->_original[$i]) {
                                continue;
-                       }                       
+                       }
                        $valarr[] = $val;
                        $pairs[] = $name.'='.$db->Param($cnt);
                        $cnt += 1;
                }
-               
-               
+
+
                if (!$cnt) return -1;
                $sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where;
                $ok = $db->Execute($sql,$valarr);
@@ -1097,23 +1097,23 @@ class ADODB_Active_Record {
                }
                return 0;
        }
-       
+
        function GetAttributeNames()
        {
                $table = $this->TableInfo();
                if (!$table) return false;
                return array_keys($table->flds);
        }
-       
+
 };
 
 function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bindarr, $primkeyArr,
                        $extra, $relations)
 {
        global $_ADODB_ACTIVE_DBS;
-       
+
                if (empty($extra['loading'])) $extra['loading'] = ADODB_LAZY_AR;
-               
+
                $save = $db->SetFetchMode(ADODB_FETCH_NUM);
                $table = &$tableObj->_table;
                $tableInfo =& $tableObj->TableInfo();
@@ -1135,7 +1135,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                }
                if(!$found)
                        $db->outp_throw("Unable to locate key $myId for $class in GetActiveRecordsClass()",'GetActiveRecordsClass');
-               
+
                $qry = "select * from ".$table;
                if(ADODB_JOIN_AR == $extra['loading'])
                {
@@ -1192,19 +1192,19 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                        }
                } else
                        $rows = $db->GetAll($qry,$bindarr);
-                       
+
                $db->SetFetchMode($save);
-               
+
                $false = false;
-               
-               if ($rows === false) {  
+
+               if ($rows === false) {
                        return $false;
                }
-               
-               
+
+
                if (!isset($_ADODB_ACTIVE_DBS)) {
                        include(ADODB_DIR.'/adodb-active-record.inc.php');
-               }       
+               }
                if (!class_exists($class)) {
                        $db->outp_throw("Unknown class $class in GetActiveRecordsClass()",'GetActiveRecordsClass');
                        return $false;
@@ -1218,7 +1218,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                $arrRef = array();
                $bTos = array(); // Will store belongTo's indices if any
                foreach($rows as $row) {
-               
+
                        $obj = new $class($table,$primkeyArr,$db);
                        if ($obj->ErrorNo()){
                                $db->_errorMsg = $obj->ErrorMsg();
@@ -1268,7 +1268,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                        {
                                if(ADODB_JOIN_AR == $extra['loading'])
                                {
-                                       $isNewObj = !isset($uniqArr['_'.$row[0]]); 
+                                       $isNewObj = !isset($uniqArr['_'.$row[0]]);
                                        if($isNewObj)
                                                $uniqArr['_'.$row[0]] = $obj;
 
@@ -1322,7 +1322,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                                                }
                                        }
                                        if(!$isNewObj)
-                                               unset($obj); // We do not need this object itself anymore and do not want it re-added to the main array                                 
+                                               unset($obj); // We do not need this object itself anymore and do not want it re-added to the main array
                                }
                                else if(ADODB_LAZY_AR == $extra['loading'])
                                {
@@ -1382,7 +1382,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                                                array_push($arrRef[$obj->$dbClassRef]->$foreignName, $obj);
                                        }
                                }
-                               
+
                        }
                        if(!empty($relations['belongsTo']))
                        {
@@ -1398,7 +1398,7 @@ function adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bind
                                        else
                                        {
                                                $belongsToId = 'id';
-                                       }                                               
+                                       }
                                        $origObjsArr = $bTos[$foreignTableRef];
                                        $bTosString = implode(',', array_keys($bTos[$foreignTableRef]));
                                        $foreignName = $foreignTable->foreignName;
index 3cf68a4..10079a8 100644 (file)
@@ -13,7 +13,7 @@
 
 
 // added Claudio Bustos  clbustos#entelchile.net
-if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR); 
+if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR);
 
 if (!defined('ADODB_ERROR_HANDLER')) define('ADODB_ERROR_HANDLER','ADODB_Error_Handler');
 
@@ -74,6 +74,6 @@ function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnec
 
 
        //print "<p>$s</p>";
-       trigger_error($s,ADODB_ERROR_HANDLER_TYPE); 
+       trigger_error($s,ADODB_ERROR_HANDLER_TYPE);
 }
 ?>
index 8b78943..5b92519 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
   V5.10 10 Nov 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+
   First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com
  Based on the previous postgres drivers.
  http://www.netezza.com/
@@ -20,7 +20,7 @@ if (!defined('ADODB_DIR')) die();
 include_once(ADODB_DIR.'/drivers/adodb-postgres64.inc.php');
 
 class ADODB_netezza extends ADODB_postgres64 {
-    var $databaseType = 'netezza';     
+    var $databaseType = 'netezza';
        var $dataProvider = 'netezza';
        var $hasInsertID = false;
        var $_resultid = false;
@@ -34,11 +34,11 @@ class ADODB_netezza extends ADODB_postgres64 {
        var $blobEncodeType = 'C';
        var $metaColumnsSQL = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum";
        var $metaColumnsSQL1 = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum";
-       // netezza doesn't have keys. it does have distributions, so maybe this is 
+       // netezza doesn't have keys. it does have distributions, so maybe this is
        // something that can be pulled from the system tables
        var $metaKeySQL = "";
        var $hasAffectedRows = true;
-       var $hasLimit = true;   
+       var $hasLimit = true;
        var $true = 't';                // string that represents TRUE for a database
        var $false = 'f';               // string that represents FALSE for a database
        var $fmtDate = "'Y-m-d'";       // used by DBDate() as the default date format used by the database
@@ -47,52 +47,52 @@ class ADODB_netezza extends ADODB_postgres64 {
        var $autoRollback = true; // apparently pgsql does not autorollback properly before 4.3.4
                                                        // http://bugs.php.net/bug.php?id=25404
 
-                                                       
-       function ADODB_netezza() 
+
+       function ADODB_netezza()
        {
-       
+
        }
-       
-       function MetaColumns($table,$upper=true) 
+
+       function MetaColumns($table,$upper=true)
        {
-       
+
        // Changed this function to support Netezza which has no concept of keys
        // could posisbly work on other things from the system table later.
-       
+
        global $ADODB_FETCH_MODE;
-       
+
                $table = strtolower($table);
 
                $save = $ADODB_FETCH_MODE;
                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
-               
+
                $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table,$table));
                if (isset($savem)) $this->SetFetchMode($savem);
                $ADODB_FETCH_MODE = $save;
-               
+
                if ($rs === false) return false;
 
                $retarr = array();
-               while (!$rs->EOF) {     
+               while (!$rs->EOF) {
                        $fld = new ADOFieldObject();
                        $fld->name = $rs->fields[0];
-                       
-                       // since we're returning type and length as one string, 
+
+                       // since we're returning type and length as one string,
                        // split them out here.
-                       
+
                        if ($first = strstr($rs->fields[1], "(")) {
                         $fld->max_length = trim($first, "()");
                        } else {
                         $fld->max_length = -1;
                        }
-               
+
                        if ($first = strpos($rs->fields[1], "(")) {
                         $fld->type = substr($rs->fields[1], 0, $first);
                        } else {
                         $fld->type = $rs->fields[1];
                        }
-                       
+
                        switch ($fld->type) {
                         case "byteint":
                         case "boolean":
@@ -116,20 +116,20 @@ class ADODB_netezza extends ADODB_postgres64 {
                         $fld->max_length = 12;
                         break;
                        }
-                       
-                       if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;     
+
+                       if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;
                        else $retarr[($upper) ? strtoupper($fld->name) : $fld->name] = $fld;
-                       
+
                        $rs->MoveNext();
                }
                $rs->Close();
-               return $retarr; 
-               
+               return $retarr;
+
        }
 
-               
+
 }
-       
+
 /*--------------------------------------------------------------------------------------
         Class Name: Recordset
 --------------------------------------------------------------------------------------*/
@@ -138,10 +138,10 @@ class ADORecordSet_netezza extends ADORecordSet_postgres64
 {
        var $databaseType = "netezza";
        var $canSeek = true;
-       
-       function ADORecordSet_netezza($queryID,$mode=false) 
+
+       function ADORecordSet_netezza($queryID,$mode=false)
        {
-               if ($mode === false) { 
+               if ($mode === false) {
                        global $ADODB_FETCH_MODE;
                        $mode = $ADODB_FETCH_MODE;
                }
@@ -149,7 +149,7 @@ class ADORecordSet_netezza extends ADORecordSet_postgres64
                {
                case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break;
                case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break;
-               
+
                case ADODB_FETCH_DEFAULT:
                case ADODB_FETCH_BOTH:
                default: $this->fetchMode = PGSQL_BOTH; break;
@@ -157,7 +157,7 @@ class ADORecordSet_netezza extends ADORecordSet_postgres64
                $this->adodbFetchMode = $mode;
                $this->ADORecordSet($queryID);
        }
-       
+
        // _initrs modified to disable blob handling
        function _initrs()
        {
index 299bf70..5f55cdc 100644 (file)
@@ -61,23 +61,23 @@ class ADODB_odbtp extends ADOConnection{
        {
                if (empty($d) && $d !== 0) return 'null';
                if ($isfld) return "convert(date, $d, 120)";
-               
+
                if (is_string($d)) $d = ADORecordSet::UnixDate($d);
                $d = adodb_date($this->fmtDate,$d);
-               return "convert(date, $d, 120)"; 
+               return "convert(date, $d, 120)";
        }
-       
+
        function DBTimeStamp($d,$isfld=false)
        {
                if (empty($d) && $d !== 0) return 'null';
                if ($isfld) return "convert(datetime, $d, 120)";
-               
+
                if (is_string($d)) $d = ADORecordSet::UnixDate($d);
                $d = adodb_date($this->fmtDate,$d);
-               return "convert(datetime, $d, 120)"; 
+               return "convert(datetime, $d, 120)";
        }
 */
-       
+
        function _insertid()
        {
        // SCOPE_IDENTITY()
@@ -177,9 +177,9 @@ class ADODB_odbtp extends ADOConnection{
                        $this->_errorMsg = $this->ErrorMsg() ;
                        return false;
                }
-               
+
                odbtp_convert_datetime($this->_connectionID,true);
-               
+
                if ($this->_dontPoolDBC) {
                        if (function_exists('odbtp_dont_pool_dbc'))
                                @odbtp_dont_pool_dbc($this->_connectionID);
@@ -190,7 +190,7 @@ class ADODB_odbtp extends ADOConnection{
                $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID);
                $dbms = strtolower(@odbtp_get_attr(ODB_ATTR_DBMSNAME, $this->_connectionID));
                $this->odbc_name = $dbms;
-               
+
                // Account for inconsistent DBMS names
                if( $this->odbc_driver == ODB_DRIVER_ORACLE )
                        $dbms = 'oracle';
@@ -295,7 +295,7 @@ class ADODB_odbtp extends ADOConnection{
                $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
                return true;
        }
-       
+
        function MetaTables($ttype='',$showSchema=false,$mask=false)
        {
        global $ADODB_FETCH_MODE;
@@ -303,9 +303,9 @@ class ADODB_odbtp extends ADOConnection{
                $savem = $ADODB_FETCH_MODE;
                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false);
-               
+
                $arr = $this->GetArray("||SQLTables||||$ttype");
-               
+
                if (isset($savefm)) $this->SetFetchMode($savefm);
                $ADODB_FETCH_MODE = $savem;
 
@@ -317,7 +317,7 @@ class ADODB_odbtp extends ADOConnection{
                }
                return $arr2;
        }
-       
+
        function MetaColumns($table,$upper=true)
        {
        global $ADODB_FETCH_MODE;
@@ -329,9 +329,9 @@ class ADODB_odbtp extends ADOConnection{
                $savem = $ADODB_FETCH_MODE;
                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false);
-               
+
                $rs = $this->Execute( "||SQLColumns||$schema|$table" );
-               
+
                if (isset($savefm)) $this->SetFetchMode($savefm);
                $ADODB_FETCH_MODE = $savem;
 
@@ -399,7 +399,7 @@ class ADODB_odbtp extends ADOConnection{
                        $false = false;
                        return $false;
                }
-               
+
                $arr2 = array();
 
                foreach($arr as $k => $v) {
@@ -460,10 +460,10 @@ class ADODB_odbtp extends ADOConnection{
        function Prepare($sql)
        {
                if (! $this->_bindInputArray) return $sql; // no binding
-               
+
         $this->_errorMsg = false;
                $this->_errorCode = false;
-               
+
                $stmt = @odbtp_prepare($sql,$this->_connectionID);
                if (!$stmt) {
                //      print "Prepare Error for ($sql) ".$this->ErrorMsg()."<br>";
@@ -478,7 +478,7 @@ class ADODB_odbtp extends ADOConnection{
 
         $this->_errorMsg = false;
                $this->_errorCode = false;
-               
+
                $stmt = @odbtp_prepare_proc($sql,$this->_connectionID);
                if (!$stmt) return false;
                return array($sql,$stmt);
@@ -550,16 +550,16 @@ class ADODB_odbtp extends ADOConnection{
                                return array();
                }
        }
-       
+
        function MetaIndexes_mssql($table,$primary=false)
        {
                $table = strtolower($this->qstr($table));
 
-               $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, 
+               $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno,
                        CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK,
                        CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique
-                       FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id 
-                       INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid 
+                       FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id
+                       INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid
                        INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid
                        WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND lower(O.Name) = $table
                        ORDER BY O.name, I.Name, K.keyno";
@@ -570,7 +570,7 @@ class ADODB_odbtp extends ADOConnection{
         if ($this->fetchMode !== FALSE) {
                $savem = $this->SetFetchMode(FALSE);
         }
-        
+
         $rs = $this->Execute($sql);
         if (isset($savem)) {
                $this->SetFetchMode($savem);
@@ -584,13 +584,13 @@ class ADODB_odbtp extends ADOConnection{
                $indexes = array();
                while ($row = $rs->FetchRow()) {
                        if ($primary && !$row[5]) continue;
-                       
+
             $indexes[$row[0]]['unique'] = $row[6];
             $indexes[$row[0]]['columns'][] = $row[1];
        }
         return $indexes;
        }
-       
+
        function IfNull( $field, $ifNull )
        {
                switch( $this->odbc_driver ) {
@@ -605,10 +605,10 @@ class ADODB_odbtp extends ADOConnection{
        function _query($sql,$inputarr=false)
        {
        global $php_errormsg;
-       
+
         $this->_errorMsg = false;
                $this->_errorCode = false;
-               
+
                if ($inputarr) {
                        if (is_array($sql)) {
                                $stmtid = $sql[1];
@@ -625,7 +625,7 @@ class ADODB_odbtp extends ADOConnection{
                                @odbtp_input( $stmtid, $param );
                                @odbtp_set( $stmtid, $param, $inputarr[$param-1] );
                        }*/
-                       
+
                        $param = 1;
                        foreach($inputarr as $v) {
                                @odbtp_input( $stmtid, $param );
@@ -633,7 +633,7 @@ class ADODB_odbtp extends ADOConnection{
                                $param += 1;
                                if ($param > $num_params) break;
                        }
-                       
+
                        if (!@odbtp_execute($stmtid) ) {
                                return false;
                        }
index a7e6462..9ead5ad 100644 (file)
@@ -2,45 +2,45 @@
 
 /*
 V5.10 10 Nov 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence.
   Set tabs to 8.
-*/ 
+
+*/
 
 class ADODB_pdo_pgsql extends ADODB_pdo {
        var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
     var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
        and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
-        'sql_packages', 'sql_sizing', 'sql_sizing_profiles') 
-       union 
+        'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
+       union
         select viewname,'V' from pg_views where viewname not like 'pg\_%'";
        //"select tablename from pg_tables where tablename not like 'pg_%' order by 1";
        var $isoDates = true; // accepts dates in ISO format
        var $sysDate = "CURRENT_DATE";
        var $sysTimeStamp = "CURRENT_TIMESTAMP";
        var $blobEncodeType = 'C';
-       var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum 
-               FROM pg_class c, pg_attribute a,pg_type t 
+       var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum
+               FROM pg_class c, pg_attribute a,pg_type t
                WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
 AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
 
        // used when schema defined
-       var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum 
-FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n 
+       var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum
+FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n
 WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
- and c.relnamespace=n.oid and n.nspname='%s' 
-       and a.attname not like '....%%' AND a.attnum > 0 
+ and c.relnamespace=n.oid and n.nspname='%s'
+       and a.attname not like '....%%' AND a.attnum > 0
        AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
-       
+
        // get primary key etc -- from Freek Dijkstra
-       var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key 
+       var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key
        FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'";
-       
+
        var $hasAffectedRows = true;
        var $hasLimit = false;  // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10
-       // below suggested by Freek Dijkstra 
+       // below suggested by Freek Dijkstra
        var $true = 't';                // string that represents TRUE for a database
        var $false = 'f';               // string that represents FALSE for a database
        var $fmtDate = "'Y-m-d'";       // used by DBDate() as the default date format used by the database
@@ -53,23 +53,23 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
        var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum";
        var $random = 'random()';               /// random function
        var $concat_operator='||';
-       
+
        function _init($parentDriver)
        {
-       
+
                $parentDriver->hasTransactions = false; ## <<< BUG IN PDO pgsql driver
                $parentDriver->hasInsertID = true;
                $parentDriver->_nestedSQL = true;
        }
-       
+
        function ServerInfo()
        {
                $arr['description'] = ADOConnection::GetOne("select version()");
                $arr['version'] = ADOConnection::_findvers($arr['description']);
                return $arr;
        }
-       
-       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+
+       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
        {
                 $offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
                 $limitStr  = ($nrows >= 0)  ? " LIMIT $nrows" : '';
@@ -77,17 +77,17 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
                        $rs = $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
                 else
                        $rs = $this->Execute($sql."$limitStr$offsetStr",$inputarr);
-               
+
                return $rs;
        }
-       
-       function MetaTables($ttype=false,$showSchema=false,$mask=false) 
+
+       function MetaTables($ttype=false,$showSchema=false,$mask=false)
        {
                $info = $this->ServerInfo();
                if ($info['version'] >= 7.3) {
                $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
                          and schemaname  not in ( 'pg_catalog','information_schema')
-       union 
+       union
         select viewname,'V' from pg_views where viewname not like 'pg\_%'  and schemaname  not in ( 'pg_catalog','information_schema') ";
                }
                if ($mask) {
@@ -95,59 +95,59 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
                        $mask = $this->qstr(strtolower($mask));
                        if ($info['version']>=7.3)
                                $this->metaTablesSQL = "
-select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')  
- union 
+select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')
+ union
 select viewname,'V' from pg_views where viewname like $mask and schemaname  not in ( 'pg_catalog','information_schema')  ";
                        else
                                $this->metaTablesSQL = "
-select tablename,'T' from pg_tables where tablename like $mask 
- union 
+select tablename,'T' from pg_tables where tablename like $mask
+ union
 select viewname,'V' from pg_views where viewname like $mask";
                }
                $ret = ADOConnection::MetaTables($ttype,$showSchema);
-               
+
                if ($mask) {
                        $this->metaTablesSQL = $save;
                }
                return $ret;
        }
-       
-       function MetaColumns($table,$normalize=true) 
+
+       function MetaColumns($table,$normalize=true)
        {
        global $ADODB_FETCH_MODE;
-       
+
                $schema = false;
                $this->_findschema($table,$schema);
-               
+
                if ($normalize) $table = strtolower($table);
 
                $save = $ADODB_FETCH_MODE;
                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
-               
+
                if ($schema) $rs = $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema));
                else $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table,$table));
                if (isset($savem)) $this->SetFetchMode($savem);
                $ADODB_FETCH_MODE = $save;
-               
+
                if ($rs === false) {
                        $false = false;
                        return $false;
                }
                if (!empty($this->metaKeySQL)) {
                        // If we want the primary keys, we have to issue a separate query
-                       // Of course, a modified version of the metaColumnsSQL query using a 
-                       // LEFT JOIN would have been much more elegant, but postgres does 
+                       // Of course, a modified version of the metaColumnsSQL query using a
+                       // LEFT JOIN would have been much more elegant, but postgres does
                        // not support OUTER JOINS. So here is the clumsy way.
-                       
+
                        $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
-                       
+
                        $rskey = $this->Execute(sprintf($this->metaKeySQL,($table)));
                        // fetch all result in once for performance.
                        $keys = $rskey->GetArray();
                        if (isset($savem)) $this->SetFetchMode($savem);
                        $ADODB_FETCH_MODE = $save;
-                       
+
                        $rskey->Close();
                        unset($rskey);
                }
@@ -159,7 +159,7 @@ select viewname,'V' from pg_views where viewname like $mask";
                        $rsdef = $this->Execute($sql);
                        if (isset($savem)) $this->SetFetchMode($savem);
                        $ADODB_FETCH_MODE = $save;
-                       
+
                        if ($rsdef) {
                                while (!$rsdef->EOF) {
                                        $num = $rsdef->fields['num'];
@@ -177,9 +177,9 @@ select viewname,'V' from pg_views where viewname like $mask";
                        }
                        unset($rsdef);
                }
-       
+
                $retarr = array();
-               while (!$rs->EOF) {     
+               while (!$rs->EOF) {
                        $fld = new ADOFieldObject();
                        $fld->name = $rs->fields[0];
                        $fld->type = $rs->fields[1];
@@ -201,28 +201,28 @@ select viewname,'V' from pg_views where viewname like $mask";
                        if ($rs->fields[4] == $this->true) {
                                $fld->not_null = true;
                        }
-                       
+
                        // Freek
                        if (is_array($keys)) {
                                foreach($keys as $key) {
-                                       if ($fld->name == $key['column_name'] AND $key['primary_key'] == $this->true) 
+                                       if ($fld->name == $key['column_name'] AND $key['primary_key'] == $this->true)
                                                $fld->primary_key = true;
-                                       if ($fld->name == $key['column_name'] AND $key['unique_key'] == $this->true) 
+                                       if ($fld->name == $key['column_name'] AND $key['unique_key'] == $this->true)
                                                $fld->unique = true; // What name is more compatible?
                                }
                        }
-                       
-                       if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;     
+
+                       if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;
                        else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld;
-                       
+
                        $rs->MoveNext();
                }
                $rs->Close();
                if (empty($retarr)) {
                        $false = false;
                        return $false;
-               } else return $retarr;  
-               
+               } else return $retarr;
+
        }
 
 }
index 2229323..e53bc5e 100644 (file)
@@ -1,10 +1,10 @@
 <?php
-/* 
+/*
 version V5.06 16 Oct 2008  (c) 2000-2009  John Lim (jlim#natsoft.com).  All rights
 reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
 Set tabs to 4 for best viewing.
 
   Latest version is available at http://adodb.sourceforge.net
@@ -30,7 +30,7 @@ Set tabs to 4 for best viewing.
                .
           'VALUES (\'test\', ' . $blobVarName . ')');
 
-        instead of loading blob from a file, you can also load from 
+        instead of loading blob from a file, you can also load from
          an unformatted (raw) blob variable:
          $dbcon->load_blobvar_from_var($blobVarName, $varName);
 
@@ -53,9 +53,9 @@ if (!defined('ADODB_SYBASE_SQLANYWHERE')){
  define('ADODB_SYBASE_SQLANYWHERE',1);
 
  class ADODB_sqlanywhere extends ADODB_odbc {
-       var $databaseType = "sqlanywhere";      
+       var $databaseType = "sqlanywhere";
        var $hasInsertID = true;
-       
+
        function ADODB_sqlanywhere()
        {
                $this->ADODB_odbc();
@@ -152,9 +152,9 @@ if (!defined('ADODB_SYBASE_SQLANYWHERE')){
   }
  }; //class
 
- class  ADORecordSet_sqlanywhere extends ADORecordSet_odbc {   
+ class  ADORecordSet_sqlanywhere extends ADORecordSet_odbc {
 
-  var $databaseType = "sqlanywhere";           
+  var $databaseType = "sqlanywhere";
 
  function ADORecordSet_sqlanywhere($id,$mode=false)
  {
index 46bf827..e561a72 100644 (file)
@@ -1,25 +1,25 @@
 <?php
-/* 
+/*
 V5.10 10 Nov 2009   (c) 2000-2009 John Lim. All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence. 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
   Set tabs to 4 for best viewing.
-  
+
   Latest version is available at http://adodb.sourceforge.net
-  
+
   Sybase driver contributed by Toni (toni.tunkkari@finebyte.com)
-  
+
   - MSSQL date patch applied.
-  
+
   Date patch by Toni 15 Feb 2002
 */
+
  // security - hide paths
 if (!defined('ADODB_DIR')) die();
 
 class ADODB_sybase extends ADOConnection {
-       var $databaseType = "sybase";   
+       var $databaseType = "sybase";
        var $dataProvider = 'sybase';
        var $replaceQuote = "''"; // string to use to replace quotes
        var $fmtDate = "'Y-m-d'";
@@ -30,20 +30,20 @@ class ADODB_sybase extends ADOConnection {
        // see http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8
        var $metaColumnsSQL = "SELECT c.column_name, c.column_type, c.width FROM syscolumn c, systable t WHERE t.table_name='%s' AND c.table_id=t.table_id AND t.table_type='BASE'";
        /*
-       "select c.name,t.name,c.length from 
-       syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id 
+       "select c.name,t.name,c.length from
+       syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id
        where o.name='%s'";
        */
-       var $concat_operator = '+'; 
+       var $concat_operator = '+';
        var $arrayClass = 'ADORecordSet_array_sybase';
        var $sysDate = 'GetDate()';
        var $leftOuter = '*=';
        var $rightOuter = '=*';
-       
-       function ADODB_sybase() 
-       {                       
+
+       function ADODB_sybase()
+       {
        }
+
        // might require begintrans -- committrans
        function _insertid()
        {
@@ -55,28 +55,28 @@ class ADODB_sybase extends ADOConnection {
           return $this->GetOne('select @@rowcount');
        }
 
-                         
+
        function BeginTrans()
-       {       
-       
+       {
+
                if ($this->transOff) return true;
                $this->transCnt += 1;
-                  
+
                $this->Execute('BEGIN TRAN');
                return true;
        }
-       
-       function CommitTrans($ok=true) 
-       { 
+
+       function CommitTrans($ok=true)
+       {
                if ($this->transOff) return true;
-               
+
                if (!$ok) return $this->RollbackTrans();
-       
+
                $this->transCnt -= 1;
                $this->Execute('COMMIT TRAN');
                return true;
        }
-       
+
        function RollbackTrans()
        {
                if ($this->transOff) return true;
@@ -84,30 +84,30 @@ class ADODB_sybase extends ADOConnection {
                $this->Execute('ROLLBACK TRAN');
                return true;
        }
-       
+
        // http://www.isug.com/Sybase_FAQ/ASE/section6.1.html#6.1.4
-       function RowLock($tables,$where,$col='top 1 null as ignore') 
+       function RowLock($tables,$where,$col='top 1 null as ignore')
        {
                if (!$this->_hastrans) $this->BeginTrans();
                $tables = str_replace(',',' HOLDLOCK,',$tables);
                return $this->GetOne("select $col from $tables HOLDLOCK where $where");
-               
-       }       
-               
-       function SelectDB($dbName) 
+
+       }
+
+       function SelectDB($dbName)
        {
                $this->database = $dbName;
                $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
                if ($this->_connectionID) {
-                       return @sybase_select_db($dbName);              
+                       return @sybase_select_db($dbName);
                }
-               else return false;      
+               else return false;
        }
 
        /*      Returns: the last error message from previous database operation
-               Note: This function is NOT available for Microsoft SQL Server.  */      
+               Note: This function is NOT available for Microsoft SQL Server.  */
+
 
-       
        function ErrorMsg()
        {
                if ($this->_logsql) return $this->_errorMsg;
@@ -122,7 +122,7 @@ class ADODB_sybase extends ADOConnection {
        function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
        {
                if (!function_exists('sybase_connect')) return null;
-               
+
                if ($this->charSet) {
                        $this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword, $this->charSet);
                } else {
@@ -132,13 +132,13 @@ class ADODB_sybase extends ADOConnection {
                $this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword);
                if ($this->_connectionID === false) return false;
                if ($argDatabasename) return $this->SelectDB($argDatabasename);
-               return true;    
+               return true;
        }
        // returns true or false
        function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
        {
                if (!function_exists('sybase_connect')) return null;
-               
+
                if ($this->charSet) {
                        $this->_connectionID = sybase_pconnect($argHostname,$argUsername,$argPassword, $this->charSet);
                } else {
@@ -146,58 +146,58 @@ class ADODB_sybase extends ADOConnection {
                }
                if ($this->_connectionID === false) return false;
                if ($argDatabasename) return $this->SelectDB($argDatabasename);
-               return true;    
+               return true;
        }
-       
+
        // returns query ID if successful, otherwise false
        function _query($sql,$inputarr=false)
        {
        global $ADODB_COUNTRECS;
-       
+
                if ($ADODB_COUNTRECS == false && ADODB_PHPVER >= 0x4300)
                        return sybase_unbuffered_query($sql,$this->_connectionID);
                else
                        return sybase_query($sql,$this->_connectionID);
        }
-       
+
        // See http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12
-       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
        {
                if ($secs2cache > 0) {// we do not cache rowcount, so we have to load entire recordset
                        $rs = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
                        return $rs;
                }
-               
+
                $nrows = (integer) $nrows;
                $offset = (integer) $offset;
-               
+
                $cnt = ($nrows >= 0) ? $nrows : 999999999;
                if ($offset > 0 && $cnt) $cnt += $offset;
-               
-               $this->Execute("set rowcount $cnt"); 
+
+               $this->Execute("set rowcount $cnt");
                $rs = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0);
                $this->Execute("set rowcount 0");
-               
+
                return $rs;
        }
 
        // returns true or false
        function _close()
-       { 
+       {
                return @sybase_close($this->_connectionID);
        }
-       
+
        static function UnixDate($v)
        {
                return ADORecordSet_array_sybase::UnixDate($v);
        }
-       
+
        static function UnixTimeStamp($v)
        {
                return ADORecordSet_array_sybase::UnixTimeStamp($v);
-       }       
-       
-       
+       }
+
+
 
        # Added 2003-10-05 by Chris Phillipson
     # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=16756?target=%25N%15_12018_START_RESTART_N%25
@@ -261,7 +261,7 @@ class ADODB_sybase extends ADOConnection {
         }
         return $s;
     }
-       
+
        # Added 2003-10-07 by Chris Phillipson
     # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8
     # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version
@@ -279,7 +279,7 @@ class ADODB_sybase extends ADOConnection {
         return false;
     }
 }
-       
+
 /*--------------------------------------------------------------------------------------
         Class Name: Recordset
 --------------------------------------------------------------------------------------*/
@@ -288,16 +288,16 @@ $ADODB_sybase_mths = array(
        'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,
        'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);
 
-class ADORecordset_sybase extends ADORecordSet {       
+class ADORecordset_sybase extends ADORecordSet {
 
        var $databaseType = "sybase";
        var $canSeek = true;
        // _mths works only in non-localised system
-       var  $_mths = array('JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);    
+       var  $_mths = array('JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);
 
        function ADORecordset_sybase($id,$mode=false)
        {
-               if ($mode === false) { 
+               if ($mode === false) {
                        global $ADODB_FETCH_MODE;
                        $mode = $ADODB_FETCH_MODE;
                }
@@ -305,12 +305,12 @@ class ADORecordset_sybase extends ADORecordSet {
                else $this->fetchMode = $mode;
                $this->ADORecordSet($id,$mode);
        }
-       
-       /*      Returns: an object containing field information. 
+
+       /*      Returns: an object containing field information.
                Get column information in the Recordset object. fetchField() can be used in order to obtain information about
                fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
                fetchField() is retrieved.      */
-       function FetchField($fieldOffset = -1) 
+       function FetchField($fieldOffset = -1)
        {
                if ($fieldOffset != -1) {
                        $o = @sybase_fetch_field($this->_queryID, $fieldOffset);
@@ -322,20 +322,20 @@ class ADORecordset_sybase extends ADORecordSet {
                if ($o && !isset($o->type)) $o->type = ($o->numeric) ? 'float' : 'varchar';
                return $o;
        }
-       
+
        function _initrs()
        {
        global $ADODB_COUNTRECS;
                $this->_numOfRows = ($ADODB_COUNTRECS)? @sybase_num_rows($this->_queryID):-1;
                $this->_numOfFields = @sybase_num_fields($this->_queryID);
        }
-       
-       function _seek($row) 
+
+       function _seek($row)
        {
                return @sybase_data_seek($this->_queryID, $row);
-       }               
+       }
 
-       function _fetch($ignore_fields=false) 
+       function _fetch($ignore_fields=false)
        {
                if ($this->fetchMode == ADODB_FETCH_NUM) {
                        $this->fields = @sybase_fetch_row($this->_queryID);
@@ -355,19 +355,19 @@ class ADORecordset_sybase extends ADORecordSet {
 
                return false;
        }
-       
+
        /*      close() only needs to be called if you are worried about using too much memory while your script
                is running. All associated result memory for the specified result identifier will automatically be freed.       */
        function _close() {
-               return @sybase_free_result($this->_queryID);            
+               return @sybase_free_result($this->_queryID);
        }
-       
+
        // sybase/mssql uses a default date like Dec 30 2000 12:00AM
        static function UnixDate($v)
        {
                return ADORecordSet_array_sybase::UnixDate($v);
        }
-       
+
        static function UnixTimeStamp($v)
        {
                return ADORecordSet_array_sybase::UnixTimeStamp($v);
@@ -379,25 +379,25 @@ class ADORecordSet_array_sybase extends ADORecordSet_array {
        {
                $this->ADORecordSet_array($id);
        }
-       
+
                // sybase/mssql uses a default date like Dec 30 2000 12:00AM
        static function UnixDate($v)
        {
        global $ADODB_sybase_mths;
-       
+
                //Dec 30 2000 12:00AM
                if (!preg_match( "/([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})/"
                        ,$v, $rr)) return parent::UnixDate($v);
-                       
+
                if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
-               
+
                $themth = substr(strtoupper($rr[1]),0,3);
                $themth = $ADODB_sybase_mths[$themth];
                if ($themth <= 0) return false;
                // h-m-s-MM-DD-YY
                return  mktime(0,0,0,$themth,$rr[2],$rr[3]);
        }
-       
+
        static function UnixTimeStamp($v)
        {
        global $ADODB_sybase_mths;
@@ -406,11 +406,11 @@ class ADORecordSet_array_sybase extends ADORecordSet_array {
                if (!preg_match( "/([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})/"
                        ,$v, $rr)) return parent::UnixTimeStamp($v);
                if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
-               
+
                $themth = substr(strtoupper($rr[1]),0,3);
                $themth = $ADODB_sybase_mths[$themth];
                if ($themth <= 0) return false;
-               
+
                switch (strtoupper($rr[6])) {
                case 'P':
                        if ($rr[4]<12) $rr[4] += 12;
index 6db5b16..29e9984 100755 (executable)
@@ -1376,7 +1376,7 @@ class SC_mod_tools_be_user_index {
                        $allCells = array();
 
                        $link_createNewUser='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[be_users][0]=new',$this->doc->backPath,-1)).'" title="' . $GLOBALS['LANG']->getLL('newUser', true) . '">'.
-                                       t3lib_iconWorks::getSpriteIcon('actions-document-new') . 
+                                       t3lib_iconWorks::getSpriteIcon('actions-document-new') .
                                '</a>';
 
                        $allCells['USERS'] = '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td><strong>' . $GLOBALS['LANG']->getLL('usernames', TRUE) . '</strong></td><td width="12">' . $link_createNewUser . '</td></tr></table>';
@@ -1399,10 +1399,10 @@ class SC_mod_tools_be_user_index {
                                        if ($curUid != $uDat['uid'] && !$uDat['disable'] && ($uDat['starttime'] == 0 ||
                                                $uDat['starttime'] < $GLOBALS['EXEC_TIME']) && ($uDat['endtime'] == 0 ||
                                                $uDat['endtime'] > $GLOBALS['EXEC_TIME'])) {
-                                               $uItem .= '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'])) . '" target="_top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('changeToMode', TRUE) . '">' . 
+                                               $uItem .= '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'])) . '" target="_top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('changeToMode', TRUE) . '">' .
                                                                t3lib_iconWorks::getSpriteIcon('actions-system-backend-user-switch') .
                                                        '</a>'.
-                                                       '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'], 'switchBackUser' => 1)) . '" target="_top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('switchBackMode', TRUE) . '">' . 
+                                                       '<a href="' . t3lib_div::linkThisScript(array('SwitchUser'=>$uDat['uid'], 'switchBackUser' => 1)) . '" target="_top" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('switchUserTo', true) . ' ' . $uDat['username']) . ' ' . $GLOBALS['LANG']->getLL('switchBackMode', TRUE) . '">' .
                                                                t3lib_iconWorks::getSpriteIcon('actions-system-backend-user-emulate') .
                                                        '</a>';
                                        }
@@ -1477,14 +1477,14 @@ class SC_mod_tools_be_user_index {
                        '</a>';
                } else {
                        $params='&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';
-                       $cells[]='<a href="' . $this->doc->issueCommand($params) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:disable', true) . '">' . 
+                       $cells[]='<a href="' . $this->doc->issueCommand($params) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:disable', true) . '">' .
                                t3lib_iconWorks::getSpriteIcon('actions-edit-hide') .
                        '</a>';
                }
 
                        // Delete
                $params='&cmd[' . $table . '][' . $row['uid'] . '][delete]=1';
-               $cells[]='<a href="' . $this->doc->issueCommand($params) . '" onclick="return confirm(unescape(\'' . rawurlencode($GLOBALS['LANG']->getLL('sureToDelete', TRUE)) . '\'));" title="' . $GLOBALS['LANG']->getLL('delete', TRUE) . '">' . 
+               $cells[]='<a href="' . $this->doc->issueCommand($params) . '" onclick="return confirm(unescape(\'' . rawurlencode($GLOBALS['LANG']->getLL('sureToDelete', TRUE)) . '\'));" title="' . $GLOBALS['LANG']->getLL('delete', TRUE) . '">' .
                                t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                        '</a>';
 
index 9ad4da1..a7ca3cf 100755 (executable)
@@ -33,7 +33,7 @@
  *
  * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
+
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
  *
@@ -234,18 +234,18 @@ class tx_cms_layout extends recordList {
         * @return      string          HTML for the listing
         */
        function getExternalTables($id, $table) {
+
                $type = $GLOBALS['SOBE']->MOD_SETTINGS[$table];
                if (!isset($type)) {
                        $type = 0;
                }
-               
-               $fList = $this->externalTables[$table][$type]['fList']; // eg. "name;title;email;company,image" 
+
+               $fList = $this->externalTables[$table][$type]['fList']; // eg. "name;title;email;company,image"
                                                                                                                        // The columns are separeted by comma ','.
-                                                                                                                       // Values separated by semicolon ';' are shown in the same column. 
+                                                                                                                       // Values separated by semicolon ';' are shown in the same column.
                $icon = $this->externalTables[$table][$type]['icon'];
                $addWhere = $this->externalTables[$table][$type]['addWhere'];
-               
+
                        // Create listing
                $out = $this->makeOrdinaryList($table, $id, $fList, $icon, $addWhere);
                return $out;
@@ -1222,7 +1222,7 @@ class tx_cms_layout extends recordList {
                                                }
                                                if ($this->doEdit)      {
                                                        $Nrow['__cmds__'].= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' .
-                                                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') . 
+                                                                                       t3lib_iconWorks::getSpriteIcon('actions-document-open') .
                                                                                '</a>';
                                                } else {
                                                        $Nrow['__cmds__'].= $this->noEditIcon();
@@ -1616,7 +1616,7 @@ class tx_cms_layout extends recordList {
                                $confirm = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning') .
                                        t3lib_BEfunc::translationCount('tt_content', $row['uid'], ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.translationsOfRecord')));
                                $out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'" onclick="'.htmlspecialchars('return confirm('. $confirm .');').'" title="'.$GLOBALS['LANG']->getLL('deleteItem', TRUE).'">'.
-                                                       t3lib_iconWorks::getSpriteIcon('actions-edit-delete') . 
+                                                       t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
                                                '</a>';
 
                                if (!$disableMoveAndNewButtons) {
index 9888237..47d992c 100644 (file)
@@ -514,7 +514,7 @@ class tslib_menu {
                                                        } else {
                                                                $row = $loadDB->results['pages'][$val['id']];
                                                        }
-                                                       
+
                                                                //Add versioning overlay for current page (to respect workspaces)
                                                        if (is_array($row)) {
                                                            $this->sys_page->versionOL('pages', $row, true);
index b4c8091..6adce7d 100644 (file)
@@ -330,7 +330,7 @@ abstract class Tx_Extbase_MVC_Controller_AbstractController implements Tx_Extbas
                $this->response->setHeader('Location', (string)$uri);
                throw new Tx_Extbase_MVC_Exception_StopAction();
        }
-       
+
        /**
         * Adds the base uri if not already in place.
         *
index 7f9da1a..6ed6fc5 100644 (file)
@@ -55,7 +55,7 @@ class Tx_Extbase_Persistence_LazyLoadingProxy implements Iterator, Tx_Extbase_Pe
         * @var mixed
         */
        private $fieldValue;
-       
+
        /**
         * Constructs this proxy instance.
         *
@@ -146,7 +146,7 @@ class Tx_Extbase_Persistence_LazyLoadingProxy implements Iterator, Tx_Extbase_Pe
                $realInstance = $this->_loadRealInstance();
                unset($realInstance->$propertyName);
        }
-       
+
        /**
         * Magic toString call implementation.
         *
@@ -156,7 +156,7 @@ class Tx_Extbase_Persistence_LazyLoadingProxy implements Iterator, Tx_Extbase_Pe
                $realInstance = $this->_loadRealInstance();
                return $realInstance->__toString();
        }
-       
+
        /**
         * Returns the current value of the storage array
         *
@@ -186,7 +186,7 @@ class Tx_Extbase_Persistence_LazyLoadingProxy implements Iterator, Tx_Extbase_Pe
                $realInstance = $this->_loadRealInstance();
                next($realInstance);
        }
-       
+
        /**
         * Resets the array pointer of the storage
         *
@@ -206,7 +206,7 @@ class Tx_Extbase_Persistence_LazyLoadingProxy implements Iterator, Tx_Extbase_Pe
                return $this->current() !== FALSE;
        }
 
-       
-       
+
+
 }
 ?>
index ec6c450..7e1907f 100644 (file)
@@ -87,7 +87,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
                }
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Selector', $selectorName, $nodeTypeName);
        }
-       
+
        /**
         * Sets a statement as constraint. This is not part of the JCR 2.0 Specification!
         *
@@ -162,7 +162,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function not(Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint) {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_LogicalNot', $constraint);
        }
-       
+
        /**
         * Filters node-tuples based on the outcome of a binary operation.
         *
@@ -175,7 +175,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function comparison(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand1, $operator, $operand2) {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Comparison', $operand1, $operator, $operand2);
        }
-       
+
        /**
         * Evaluates to the value (or values, if multi-valued) of a property in the specified or default selector.
         *
@@ -187,7 +187,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function propertyValue($propertyName, $selectorName = '') {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_PropertyValue', $propertyName, $selectorName);
        }
-       
+
        /**
         * Evaluates to the lower-case string value (or values, if multi-valued) of an operand.
         *
@@ -209,7 +209,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function upperCase(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_UpperCase', $operand);
        }
-       
+
        /**
         * Orders by the value of the specified operand, in ascending order.
         *
@@ -235,7 +235,7 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function descending(Tx_Extbase_Persistence_QOM_DynamicOperandInterface $operand) {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_Ordering', $operand, Tx_Extbase_Persistence_QOM_QueryObjectModelConstantsInterface::JCR_ORDER_DESCENDING);
        }
-       
+
        /**
         * Evaluates to the value of a bind variable.
         *
@@ -246,6 +246,6 @@ class Tx_Extbase_Persistence_QOM_QueryObjectModelFactory implements Tx_Extbase_P
        public function bindVariable($bindVariableName) {
                return t3lib_div::makeInstance('Tx_Extbase_Persistence_QOM_BindVariableValue', $bindVariableName);
        }
-       
+
 }
 ?>
index d75795c..11b17c2 100644 (file)
@@ -38,7 +38,7 @@ class Tx_Extbase_Reflection_ClassSchema {
         */
        const MODELTYPE_ENTITY = 1;
        const MODELTYPE_VALUEOBJECT = 2;
-       
+
        /**
         * Name of the class this schema is referring to
         *
index 7c4265b..5b1b3f1 100644 (file)
@@ -201,7 +201,7 @@ class Tx_Extbase_MVC_Controller_ActionController_testcase extends Tx_Extbase_Bas
                $mockRequest->expects($this->once())->method('getFormat')->will($this->returnValue('MyFormat'));
 
                $mockObjectManager = $this->getMock('Tx_Extbase_Object_ManagerInterface', array(), array(), '', FALSE);
-               
+
                $mockController = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_ActionController'), array('dummy'), array(), '', FALSE);
                $mockController->_set('request', $mockRequest);
                $mockController->_set('objectManager', $mockObjectManager);
@@ -573,25 +573,25 @@ class Tx_Extbase_MVC_Controller_ActionController_testcase extends Tx_Extbase_Bas
                $argument1Origin = Tx_Extbase_MVC_Controller_Argument::ORIGIN_PERSISTENCE_AND_MODIFIED;
                $argument2Origin = Tx_Extbase_MVC_Controller_Argument::ORIGIN_PERSISTENCE;
                $methodTagsValues = array();
-               
+
                $mockRequest = $this->getMock('Tx_Extbase_MVC_Web_Request', array('isHmacVerified'), array(), '', FALSE);
                $mockRequest->expects($this->once())->method('isHmacVerified')->will($this->returnValue($hmacVerified));
-               
+
                $argument1 = $this->getMock('Tx_Extbase_MVC_Controller_Argument', array('getOrigin'), array(), '', FALSE);
                $argument1->expects($this->any())->method('getOrigin')->will($this->returnValue($argument1Origin));
                $argument2 = $this->getMock('Tx_Extbase_MVC_Controller_Argument', array('getOrigin'), array(), '', FALSE);
                $argument2->expects($this->any())->method('getOrigin')->will($this->returnValue($argument2Origin));
-               
+
                $mockController = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Controller_ActionController'), array('dummy'), array(), '', FALSE);
-               
+
                $mockReflectionService = $this->getMock('Tx_Extbase_Reflection_Service', array('getMethodTagsValues'), array(), '', FALSE);
                $mockReflectionService->expects($this->any())->method('getMethodTagsValues')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodTagsValues));
-               
+
                $mockController->_set('arguments', array($argument1, $argument2));
                $mockController->_set('request', $mockRequest);
                $mockController->_set('actionMethodName', 'fooAction');
                $mockController->injectReflectionService($mockReflectionService);
-               
+
                $mockController->_call('checkRequestHash');
        }
 
index 27d9184..514dee8 100644 (file)
@@ -295,7 +295,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
 
                $this->assertSame($expectedResult, $actualResult);
        }
-       
+
        /**
         * @test
         */
@@ -307,7 +307,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
 
                $this->assertSame($expectedResult, $actualResult);
        }
-       
+
        /**
         * @test
         */
@@ -492,7 +492,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
 
                $this->assertEquals($expectedResult, $actualResult);
        }
-       
+
        /**
         * @test
         */
@@ -509,7 +509,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
                $expectedResult = array('object' => array('foo' => 'bar'));
                $this->assertEquals($expectedResult, $actualResult);
        }
-       
+
        /**
         * @test
         * @expectedException Tx_Extbase_MVC_Exception_InvalidArgumentValue
@@ -523,7 +523,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
                $mockUriBuilder = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Web_Routing_UriBuilder'), array('dummy'));
                $actualResult = $mockUriBuilder->_call('convertDomainObjectsToIdentityArrays', array('object' => $mockEntity));
        }
-               
+
        /**
         * @test
         */
@@ -532,14 +532,14 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
                eval('class ' . $className . ' extends Tx_Extbase_DomainObject_AbstractValueObject { public $name; public $uid; }');
                $mockValueObject = new $className;
                $mockValueObject->name = 'foo';
-               
+
                $mockUriBuilder = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_MVC_Web_Routing_UriBuilder'), array('dummy'));
                $actualResult = $mockUriBuilder->_call('convertTransientObjectToArray', $mockValueObject);
 
                $expectedResult = array('name' => 'foo', 'uid' => NULL);
                $this->assertEquals($expectedResult, $actualResult);
        }
-               
+
        /**
         * @test
         */
@@ -570,7 +570,7 @@ class Tx_Extbase_MVC_Web_Routing_UriBuilder_testcase extends Tx_Extbase_BaseTest
                        'uid' => NULL);
                $this->assertEquals($expectedResult, $actualResult);
        }
-               
+
 
 }
 ?>
index ec1f3f2..bb78982 100644 (file)
@@ -57,7 +57,7 @@ class Tx_Fluid_ViewHelpers_AliasViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 
        /**
         *
-        * @param array $map 
+        * @param array $map
         * @return string Rendered string
         * @author Bastian Waidelich <bastian@typo3.org>
         * @api
index b7c75e0..9f9fcaa 100644 (file)
@@ -22,7 +22,7 @@
 
 /**
  * Else-Branch of a condition. Only has an effect inside of "If". See the If-ViewHelper for documentation.
- * 
+ *
  * @see Tx_Fluid_ViewHelpers_IfViewHelper
  *
  * @version $Id: ElseViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
index 51bf9ab..59bc304 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * With this tag, you can select a layout to be used..
  * <code><f:layout name="main" /></code>
- * 
+ *
  *
  *
  * @version $Id: LayoutViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
index a07f183..db1e2fd 100644 (file)
@@ -61,7 +61,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_
                $this->assertSame($this->variableContainer->get('variable'), $object);
                $this->assertSame($this->variableContainer['variable'], $object);
        }
-       
+
        /**
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
@@ -72,7 +72,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_
                $this->assertTrue($this->variableContainer->exists('variable'));
                $this->assertTrue(isset($this->variableContainer['variable']));
        }
-       
+
        /**
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
@@ -82,7 +82,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_
                $this->variableContainer->add("variable", $object);
                $this->assertEquals($this->variableContainer->getAllIdentifiers(), array('variable'), 'Added key is not visible in getAllIdentifiers');
        }
-       
+
        /**
         * @test
         * @expectedException Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException
@@ -110,7 +110,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_
        public function gettingNonexistentValueThrowsException() {
                $this->variableContainer->get('nonexistent');
        }
-       
+
        /**
         * @test
         * @expectedException Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException
@@ -119,7 +119,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_
        public function deletingNonexistentValueThrowsException() {
                $this->variableContainer->remove('nonexistent');
        }
-       
+
        /**
         * @test
         * @expectedException Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException
index af64957..d08d00a 100644 (file)
@@ -30,7 +30,7 @@
  */
 class Tx_Fluid_View_Fixture_TransparentSyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
        public $variableContainer;
-       
+
        public function evaluate() {
        }
 }
index a21968a..8d9dedb 100644 (file)
  */
 class Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode {
        public $callProtocol = array();
-       
+
        public function __construct(Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer) {
                $this->variableContainer = $variableContainer;
        }
-       
+
        public function evaluateChildNodes() {
                $identifiers = $this->variableContainer->getAllIdentifiers();
                $callElement = array();
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode extends Tx_Fluid_Co
                }
                $this->callProtocol[] = $callElement;
        }
-       
+
        public function evaluate() {}
 }
 
index 0404d57..478eee0 100644 (file)
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Fixtures_EmptySyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode {
-       
+
        public function __construct() {
-               
+
        }
-       
+
 }
 
 
index 53b3120..5944f7d 100755 (executable)
@@ -24,7 +24,7 @@
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
-/**    
+/**
  * Contains the TYPO3 Backend Language class
  *
  * $Id$
@@ -73,8 +73,8 @@
 class language {
                // This is set to the language that is currently running for the user
        public $lang = 'default';
-               // Values like the labels in the tables.php-document are split by '|'. 
-               // This values defines which language is represented by which position 
+               // Values like the labels in the tables.php-document are split by '|'.
+               // This values defines which language is represented by which position
                // in the resulting array after splitting a value. (NOTICE: Obsolete concept!)
        public $langSplit = 'default';
 
@@ -209,7 +209,7 @@ class language {
         * @access public
         */
        public function hscAndCharConv($lStr, $hsc) {
-                       // labels returned from a locallang file used to be in the language of the charset. 
+                       // labels returned from a locallang file used to be in the language of the charset.
                        // Since TYPO3 4.1 they are always in the charset of the BE.
                if ($hsc) {
                        return htmlspecialchars($lStr);
@@ -219,12 +219,12 @@ class language {
        }
 
        /**
-        * Will convert the input strings special chars (all above 127) to entities. 
+        * Will convert the input strings special chars (all above 127) to entities.
         * The string is expected to be encoded in the charset, $this->charSet
         * This function is used to create strings that can be used in the Click Menu
-        * (Context Sensitive Menus). The reason is that the values that are dynamically 
+        * (Context Sensitive Menus). The reason is that the values that are dynamically
         * written into the <div> layer is decoded as iso-8859-1 no matter what charset
-        * is used in the document otherwise (only MSIE, Mozilla is OK). 
+        * is used in the document otherwise (only MSIE, Mozilla is OK).
         * So by converting we by-pass this problem.
         *
         * @param       string          Input string
@@ -288,7 +288,7 @@ class language {
        }
 
        /**
-        * Works like ->getLL() but takes the $LOCAL_LANG array 
+        * Works like ->getLL() but takes the $LOCAL_LANG array
         * used as the second argument instead of using the global array.
         *
         * @param       string          Label key
@@ -301,7 +301,7 @@ class language {
                        // Get Local Language
                if (strcmp($LOCAL_LANG[$this->lang][$index], '')) {
                                // Returns local label if not blank.
-                       $output = $this->hscAndCharConv($LOCAL_LANG[$this->lang][$index], $hsc);        
+                       $output = $this->hscAndCharConv($LOCAL_LANG[$this->lang][$index], $hsc);
                } else {
                                // Returns default label
                        $output = $this->hscAndCharConv($LOCAL_LANG['default'][$index], $hsc);
@@ -330,13 +330,13 @@ class language {
                        $t = explode('|', $input);
                        $out = $t[$this->langSplitIndex] ? $t[$this->langSplitIndex] : $t[0];
                        return $this->hscAndCharConv($out, $hsc);
-                       // LOCAL_LANG:  
-               } else {        
+                       // LOCAL_LANG:
+               } else {
                                // If cached label
                        if (!isset($this->LL_labels_cache[$this->lang][$input])) {
                                $restStr = trim(substr($input, 4));
                                $extPrfx = '';
-                               
+
                                        // ll-file refered to is found in an extension.
                                if (!strcmp(substr($restStr, 0, 4), 'EXT:')) {
                                        $restStr = trim(substr($restStr, 4));
@@ -344,14 +344,14 @@ class language {
                                }
                                $parts = explode(':', $restStr);
                                $parts[0] = $extPrfx . $parts[0];
-                               
+
                                        // Getting data if not cached
                                if (!isset($this->LL_files_cache[$parts[0]])) {
                                        $this->LL_files_cache[$parts[0]] = $this->readLLfile($parts[0]);
 
                                                // If the current language is found in another file, load that as well:
                                        $lFileRef = $this->localizedFileRef($parts[0]);
-                                       if ($lFileRef && is_string($this->LL_files_cache[$parts[0]][$this->lang]) 
+                                       if ($lFileRef && is_string($this->LL_files_cache[$parts[0]][$this->lang])
                                                        && $this->LL_files_cache[$parts[0]][$this->lang] == 'EXT') {
                                                $tempLL = $this->readLLfile($lFileRef);
                                                $this->LL_files_cache[$parts[0]][$this->lang] = $tempLL[$this->lang];
@@ -379,7 +379,7 @@ class language {
        }
 
        /**
-        * Loading $TCA_DESCR[$table]['columns'] with content from locallang files 
+        * Loading $TCA_DESCR[$table]['columns'] with content from locallang files
         * as defined in $TCA_DESCR[$table]['refs']
         * $TCA_DESCR is a global var
         *
@@ -390,7 +390,7 @@ class language {
        public function loadSingleTableDescription($table) {
                global $TCA_DESCR;
 
-                       // First the 'table' cannot already be loaded in [columns] 
+                       // First the 'table' cannot already be loaded in [columns]
                        // and secondly there must be a references to locallang files available in [refs]
                if (is_array($TCA_DESCR[$table])
                                && !isset($TCA_DESCR[$table]['columns'])
index d3e9830..c93d4b1 100644 (file)
@@ -39,7 +39,7 @@ class tx_statictemplates {
         * @return      void
         */
        public function includeStaticTypoScriptSources(&$params, &$pObj) {
-                       // Static Template Records (static_template): include_static is a 
+                       // Static Template Records (static_template): include_static is a
                        // list of static templates to include
                if (trim($params['row']['include_static'])) {
                        $includeStaticArr = t3lib_div::intExplode(',', $params['row']['include_static']);