trying to get windows support working

This commit is contained in:
seek3r 2001-06-20 08:36:55 +00:00
parent 6fb4f5b369
commit 83a0af3424
4 changed files with 19 additions and 20 deletions

View File

@ -73,27 +73,25 @@
/* If you do not want phpGroupWare to be cached by proxy servers, uncomment the following */ /* If you do not want phpGroupWare to be cached by proxy servers, uncomment the following */
/* This is recommended, but not required. */ /* This is recommended, but not required. */
//header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 /* header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 */
//header('Pragma: no-cache'); // HTTP/1.0 /* header('Pragma: no-cache'); // HTTP/1.0 */
/**************************************************************************\ /**************************************************************************\
* Do not edit these lines * * Do not edit these lines *
\**************************************************************************/ \**************************************************************************/
// This is required becuase some applications (outside of phpGW) set a cookie named lang
// Which messes up phpGWs $lang array, people will pull there hair out tring to find it.
// This should make there life a little simpler.
unset($lang);
define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc'); define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'); include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
$phpgw_info["server"]["versions"]["phpgwapi"] = $setup_info['phpgwapi']['version']; $phpgw_info["server"]["versions"]["phpgwapi"] = $setup_info['phpgwapi']['version'];
$phpgw_info['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header']; $phpgw_info['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info); unset($setup_info);
$phpgw_info['server']['versions']['header'] = '1.16'; $phpgw_info['server']['versions']['header'] = '1.16';
// This is a fix for NT /* This is a fix for NT */
if (!isset($phpgw_info['flags']['noapi']) || !$phpgw_info['flags']['noapi'] == True) if (!isset($phpgw_info['flags']['noapi']) || !$phpgw_info['flags']['noapi'] == True)
{ {
include(PHPGW_API_INC . '/functions.inc.php'); include(PHPGW_API_INC . '/functions.inc.php');
} }
// Leave off the final php closing tag, some editors will add /*
// a \n or space after which will mess up cookies later on Leave off the final php closing tag, some editors will add
a \n or space after which will mess up cookies later on
*/

View File

@ -90,7 +90,7 @@ class db {
return $this->Link_ID; return $this->Link_ID;
} }
// This only affects systems not using persistant connections /* This only affects systems not using persistant connections */
function disconnect() function disconnect()
{ {
if($this->Link_ID <> 0) if($this->Link_ID <> 0)
@ -124,7 +124,7 @@ class db {
} }
/* public: perform a query */ /* public: perform a query */
// I added the line and file section so we can have better error reporting. (jengo) /* I added the line and file section so we can have better error reporting. (jengo) */
function query($Query_String, $line = "", $file = "") { function query($Query_String, $line = "", $file = "") {
/* No empty queries, please, since PHP4 chokes on them. */ /* No empty queries, please, since PHP4 chokes on them. */
if ($Query_String == "") if ($Query_String == "")
@ -354,8 +354,8 @@ class db {
* Test: if (isset($result['meta']['myfield'])) { ... * Test: if (isset($result['meta']['myfield'])) { ...
*/ */
// if no $table specified, assume that we are working with a query /* if no $table specified, assume that we are working with a query */
// result /* result */
if ($table) { if ($table) {
$this->connect(); $this->connect();
$id = @mysql_list_fields($this->Database, $table); $id = @mysql_list_fields($this->Database, $table);
@ -369,7 +369,7 @@ class db {
$count = @mysql_num_fields($id); $count = @mysql_num_fields($id);
// made this IF due to performance (one if is faster than $count if's) /* made this IF due to performance (one if is faster than $count if's) */
if (!$full) { if (!$full) {
for ($i=0; $i<$count; $i++) { for ($i=0; $i<$count; $i++) {
$res[$i]["table"] = @mysql_field_table ($id, $i); $res[$i]["table"] = @mysql_field_table ($id, $i);
@ -378,7 +378,7 @@ class db {
$res[$i]["len"] = @mysql_field_len ($id, $i); $res[$i]["len"] = @mysql_field_len ($id, $i);
$res[$i]["flags"] = @mysql_field_flags ($id, $i); $res[$i]["flags"] = @mysql_field_flags ($id, $i);
} }
} else { // full } else { /* full */
$res["num_fields"]= $count; $res["num_fields"]= $count;
for ($i=0; $i<$count; $i++) { for ($i=0; $i<$count; $i++) {
@ -391,7 +391,7 @@ class db {
} }
} }
// free the result only if we were called on a table /* free the result only if we were called on a table */
if ($table) @mysql_free_result($id); if ($table) @mysql_free_result($id);
return $res; return $res;
} }
@ -400,7 +400,7 @@ class db {
function halt($msg, $line = "", $file = "") function halt($msg, $line = "", $file = "")
{ {
global $phpgw; global $phpgw;
$this->unlock(); // Just in case there is a table currently locked $this->unlock(); /* Just in case there is a table currently locked */
$this->Error = @mysql_error($this->Link_ID); $this->Error = @mysql_error($this->Link_ID);
$this->Errno = @mysql_errno($this->Link_ID); $this->Errno = @mysql_errno($this->Link_ID);
@ -463,6 +463,7 @@ class db {
$this->Password = $currentPassword; $this->Password = $currentPassword;
$this->Database = $currentDatabase; $this->Database = $currentDatabase;
$this->connect(); $this->connect();
//return $return; /*return $return; */
} }
} }
?>