Thread: [Openfirst-cvscommit] base/includes MSSQLDataBase.php,1.3,1.4 Skin.php,1.1,1.2 User.php,1.3,1.4 dbas
Brought to you by:
xtimg
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26737/includes Modified Files: MSSQLDataBase.php Skin.php User.php dbase.php functions.php globals.php sitesettings.tpl xmlModule.php Log Message: - Many various bugfixes - Added type aliases to DB - Login/logout pages (login a little buggy) Index: xmlModule.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/xmlModule.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xmlModule.php 24 Nov 2005 01:34:23 -0000 1.11 --- xmlModule.php 23 Feb 2006 16:38:47 -0000 1.12 *************** *** 537,541 **** if (is_array($value)) { ! $vals = array_combine($values, $values); } else { $vals = array((string)$value => (string)$value); --- 537,541 ---- if (is_array($value)) { ! $vals = array_combine($value, $value); } else { $vals = array((string)$value => (string)$value); *************** *** 693,697 **** function addCol($value) { if (is_array($value)) { ! $vals = array_combine($values, $values); $this->mCols = $vals + $this->mCols; // Union operator won't overwrite values } else { --- 693,697 ---- function addCol($value) { if (is_array($value)) { ! $vals = array_combine($value, $value); $this->mCols = $vals + $this->mCols; // Union operator won't overwrite values } else { Index: sitesettings.tpl =================================================================== RCS file: /cvsroot/openfirst/base/includes/sitesettings.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sitesettings.tpl 22 Nov 2005 16:15:35 -0000 1.6 --- sitesettings.tpl 23 Feb 2006 16:38:47 -0000 1.7 *************** *** 12,16 **** $ogSiteTitle = %TITLE%; ! $Version = %VER%; $ogSQLServer = %DBSERVER%; --- 12,16 ---- $ogSiteTitle = %TITLE%; ! $ogVersion = %VER%; $ogSQLServer = %DBSERVER%; *************** *** 29,35 **** $StylePath = "$BasePath/style"; $fStylePath = "$fBasePath/style"; ! $Header = %HEADER%; ! $Footer = %FOOTER%; ! $MailNotify = %MASTERMAIL%; ! $MailFrom = %BOTMAIL%; ?> \ No newline at end of file --- 29,35 ---- $StylePath = "$BasePath/style"; $fStylePath = "$fBasePath/style"; ! $ogHeader = %HEADER%; ! $ogFooter = %FOOTER%; ! $ogMailNotify = %MASTERMAIL%; ! $ogMailFrom = %BOTMAIL%; ?> \ No newline at end of file Index: functions.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/functions.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** functions.php 23 Nov 2005 22:00:25 -0000 1.15 --- functions.php 23 Feb 2006 16:38:47 -0000 1.16 *************** *** 227,231 **** ofFixMagicQuotes($_GET); ofFixMagicQuotes($_POST); ! ofFixMagicQuotes($_COOKIES); } } --- 227,231 ---- ofFixMagicQuotes($_GET); ofFixMagicQuotes($_POST); ! ofFixMagicQuotes($_COOKIE); } } Index: User.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/User.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** User.php 22 Nov 2005 16:25:39 -0000 1.3 --- User.php 23 Feb 2006 16:38:47 -0000 1.4 *************** *** 138,145 **** function mustBeAdmin() { if (!$this->isAdmin()) { ! global $Header, $Footer; ! include_once($Header); ofShowLogin(); ! include($Footer); die; } --- 138,145 ---- function mustBeAdmin() { if (!$this->isAdmin()) { ! global $ogHeader, $ogFooter; ! include_once($ogHeader); ofShowLogin(); ! include($ogFooter); die; } *************** *** 619,623 **** function hasScreenName($medium) { ! return in_array($medium, $this->mScreenNames) && $this->mScreenNames[$mediums] != ''; } --- 619,623 ---- function hasScreenName($medium) { ! return in_array($medium, $this->mScreenNames) && $this->mScreenNames[$medium] != ''; } Index: MSSQLDataBase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/MSSQLDataBase.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MSSQLDataBase.php 22 Nov 2005 03:32:42 -0000 1.3 --- MSSQLDataBase.php 23 Feb 2006 16:38:47 -0000 1.4 *************** *** 59,63 **** // <http://us3.php.net/manual/en/function.mssql-get-last-message.php#53572> $sql = "select @@ERROR as code"; ! $result = mssql_query($sql, $con); $row = mssql_fetch_array($result); $code = $row["code"]; // error code --- 59,63 ---- // <http://us3.php.net/manual/en/function.mssql-get-last-message.php#53572> $sql = "select @@ERROR as code"; ! $result = mssql_query($sql, $this->connection); $row = mssql_fetch_array($result); $code = $row["code"]; // error code *************** *** 69,73 **** // <http://us3.php.net/manual/en/function.mssql-get-last-message.php#53572> $sql = "select @@ERROR as code"; ! $result = mssql_query($sql, $con); $row = mssql_fetch_array($result); $code = $row["code"]; // error code --- 69,73 ---- // <http://us3.php.net/manual/en/function.mssql-get-last-message.php#53572> $sql = "select @@ERROR as code"; ! $result = mssql_query($sql, $this->connection); $row = mssql_fetch_array($result); $code = $row["code"]; // error code *************** *** 83,87 **** */ $sql = "SELECT CAST(description AS varchar(255)) AS errtxt FROM master.dbo.sysmessages WHERE error=$code AND msglangid=$lang"; ! $result = mssql_query($sql, $con); $row = mssql_fetch_array($result); if ($row) { --- 83,87 ---- */ $sql = "SELECT CAST(description AS varchar(255)) AS errtxt FROM master.dbo.sysmessages WHERE error=$code AND msglangid=$lang"; ! $result = mssql_query($sql, $this->connection); $row = mssql_fetch_array($result); if ($row) { Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/globals.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** globals.php 23 Nov 2005 21:52:26 -0000 1.23 --- globals.php 23 Feb 2006 16:38:47 -0000 1.24 *************** *** 45,51 **** if (defined('OPENFIRST_NO_INSTALLATION')) { if(is_readable("style/headers.php")) { ! $Header = "style/headers.php"; } else { ! $Header = "../style/headers.php"; } } --- 45,51 ---- if (defined('OPENFIRST_NO_INSTALLATION')) { if(is_readable("style/headers.php")) { ! $ogHeader = "style/headers.php"; } else { ! $ogHeader = "../style/headers.php"; } } Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dbase.php 25 Nov 2005 18:15:03 -0000 1.18 --- dbase.php 23 Feb 2006 16:38:47 -0000 1.19 *************** *** 51,55 **** */ class DataBase { ! /*private*/ var $type, $connection, $lastquery, $db, $prefix; // Wrapper for database selection. function DataBase($type = dbUNKNOWN, $server = '', $username = '', $password = '', $newlink = '', $flags = '') { --- 51,55 ---- */ class DataBase { ! /*private*/ var $type, $connection, $lastquery, $db, $prefix, $overrides; // Wrapper for database selection. function DataBase($type = dbUNKNOWN, $server = '', $username = '', $password = '', $newlink = '', $flags = '') { *************** *** 57,60 **** --- 57,63 ---- global $sqlTablePrefix; $this->prefix = $sqlTablePrefix; + $this->overrides = array( + 'datetime' => 'int' + ); } *************** *** 541,544 **** --- 544,550 ---- } $type = $col->getType(); + if (in_array(strtolower($type), $this->overrides)) { + $type = $this->overrides[strtolower($type)]; + } if ($type == 'SET' || $type == 'ENUM') { $type .= '('.$this->quoteData($col->getValues()).')'; *************** *** 641,644 **** --- 647,651 ---- $sql .= implode(",\n", $cols + $keys); $sql .= ')'; + var_dump($sql); $this->query($sql); } Index: Skin.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/Skin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Skin.php 30 Jun 2005 02:27:16 -0000 1.1 --- Skin.php 23 Feb 2006 16:38:47 -0000 1.2 *************** *** 1,48 **** ! <?php ! /* ! * openFIRST.base - includes/Skin.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Jamie Bliss <ja...@op...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! // Purpose: Defines the Skin class, which handles skinning openFIRST. ! ! class Skin { ! ! /*private*/ var $title; ! ! /*public*/ function getTitle() { ! return $this->title; ! } ! ! /*public*/ function setTitle($title) { ! $this->title = $title; ! } ! ! /*public*/ function getSlugText($slug) { ! } ! ! /*public*/ function outputHeader() { ! } ! ! ! /*public*/ function outputFooter() { ! } ! } ! ?> --- 1,48 ---- ! <?php ! /* ! * openFIRST.base - includes/Skin.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Jamie Bliss <ja...@op...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! // Purpose: Defines the Skin class, which handles skinning openFIRST. ! ! class Skin { ! ! /*private*/ var $title; ! ! /*public*/ function getTitle() { ! return $this->title; ! } ! ! /*public*/ function setTitle($title) { ! $this->title = $title; ! } ! ! /*public*/ function getSlugText($slug) { ! } ! ! /*public*/ function outputHeader() { ! } ! ! ! /*public*/ function outputFooter() { ! } ! } ! ?> \ No newline at end of file |