[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6462] replace deprecated function - and some mysql f
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6462] replace deprecated function - and some mysql fixes |
Date: |
Sun, 10 Oct 2010 16:30:50 +0000 |
Revision: 6462
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6462
Author: sigurdne
Date: 2010-10-10 16:30:49 +0000 (Sun, 10 Oct 2010)
Log Message:
-----------
replace deprecated function - and some mysql fixes
Modified Paths:
--------------
trunk/login.php
trunk/phpgwapi/inc/class.db_pdo.inc.php
trunk/phpgwapi/inc/class.historylog.inc.php
trunk/phpgwapi/inc/class.interserver.inc.php
trunk/phpgwapi/inc/class.ping.inc.php
trunk/phpgwapi/inc/class.schema_proc_mysql.inc.php
trunk/phpgwapi/inc/class.schema_proc_oracle.inc.php
trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php
trunk/phpgwapi/inc/class.send.inc.php
trunk/phpgwapi/inc/class.setup.inc.php
trunk/phpgwapi/inc/class.setup_process.inc.php
trunk/phpgwapi/inc/class.setup_translation.inc.php
trunk/phpgwapi/inc/class.shm.inc.php
trunk/phpgwapi/inc/class.uijsaddressbook.inc.php
trunk/phpgwapi/inc/class.vcard.inc.php
trunk/phpgwapi/inc/functions.inc.php
trunk/phpgwapi/setup/default_records.inc.php
trunk/phpgwapi/setup/tables_current.inc.php
trunk/phpgwapi/setup/tables_update.inc.php
trunk/setup/applications.php
trunk/setup/config.php
trunk/setup/inc/functions.inc.php
Modified: trunk/login.php
===================================================================
--- trunk/login.php 2010-10-10 12:24:42 UTC (rev 6461)
+++ trunk/login.php 2010-10-10 16:30:49 UTC (rev 6462)
@@ -110,7 +110,7 @@
}
if (
!isset($GLOBALS['phpgw_info']['server']['disable_autoload_langfiles']) ||
!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'] )
{
- $uilogin->check_langs();
+// $uilogin->check_langs();
}
$extra_vars['cd'] = 'yes';
@@ -209,7 +209,7 @@
}
if (
!isset($GLOBALS['phpgw_info']['server']['disable_autoload_langfiles']) ||
!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'] )
{
- $uilogin->check_langs();
+// $uilogin->check_langs();
}
$extra_vars['cd'] = 'yes';
Modified: trunk/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.db_pdo.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.db_pdo.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -845,18 +845,18 @@
switch ( $this->Type )
{
case 'mysql': // Not testet
- $this->query("SHOW FULL TABLES",__LINE__,
__FILE__);
+ $this->query("SHOW FULL
TABLES",__LINE__, __FILE__);
foreach($this->resultSet as $entry)
{
if($include_views)
{
- $return[] = $entry[0];
+ $return[] =
$entry["Tables_in_{$this->Database}"];
}
else
{
- if ($entry[1] =='BASE
TABLE')
+ if
($entry['Table_type'] =='BASE TABLE')
{
- $return[] =
$entry[0];
+ $return[] =
$entry["Tables_in_{$this->Database}"];
}
}
}
Modified: trunk/phpgwapi/inc/class.historylog.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.historylog.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.historylog.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -112,7 +112,7 @@
'record_id' =>
$this->db->f('history_record_id'),
'owner' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('history_owner')),
// 'status' =>
lang($this->types[$this->db->f('history_status')]),
- 'status' => ereg_replace('
','',$this->db->f('history_status')),
+ 'status' => str_replace('
','',$this->db->f('history_status')),
'new_value' =>
htmlspecialchars_decode($this->db->f('history_new_value',true)),
'old_value' =>
htmlspecialchars_decode($this->db->f('history_old_value',true)),
'datetime' =>
$this->db->from_timestamp($this->db->f('history_timestamp'))
Modified: trunk/phpgwapi/inc/class.interserver.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.interserver.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.interserver.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -131,8 +131,8 @@
{
preg_match('/^(.*?\/\/.*?)(\/.*)/',$url,$matches);
$hostpart = $matches[1];
- $hostpart = ereg_replace('https://','',$hostpart);
- $hostpart = ereg_replace('http://','',$hostpart);
+ $hostpart = str_replace('https://','',$hostpart);
+ $hostpart = str_replace('http://','',$hostpart);
switch($this->mode)
{
case 'soap':
Modified: trunk/phpgwapi/inc/class.ping.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.ping.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.ping.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -62,13 +62,13 @@
$dl =
$this->raw_array_of_data[count($this->raw_array_of_data) - 3];
$values = explode(',',$dl);
- $packet_tx = ereg_replace(' packets
transmitted','',$values[0]);
- $packet_rx = ereg_replace(' packets
received','',$values[1]);
- $packet_loss = ereg_replace('% packet
loss','',$values[2]);
+ $packet_tx = str_replace(' packets
transmitted','',$values[0]);
+ $packet_rx = str_replace(' packets
received','',$values[1]);
+ $packet_loss = str_replace('% packet
loss','',$values[2]);
- $this->packet_tx = (int)ereg_replace('
','',$packet_tx);
- $this->packet_rx = (int)ereg_replace('
','',$packet_rx);
- $this->packet_loss = (int)ereg_replace('
','',$packet_loss);
+ $this->packet_tx = (int)str_replace('
','',$packet_tx);
+ $this->packet_rx = (int)str_replace('
','',$packet_rx);
+ $this->packet_loss = (int)str_replace('
','',$packet_loss);
}
function parse_times()
@@ -76,7 +76,7 @@
$tl =
$this->raw_array_of_data[count($this->raw_array_of_data) - 2];
$times_split = explode(' = ',$tl);
$raw_times = $times_split[1];
- $raw_times = ereg_replace(' ms','',$raw_times);
+ $raw_times = str_replace(' ms','',$raw_times);
$values = explode('/',$raw_times);
$this->response_min = $values[0];
Modified: trunk/phpgwapi/inc/class.schema_proc_mysql.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.schema_proc_mysql.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.schema_proc_mysql.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -287,7 +287,7 @@
/* The rest of this is used only for SQL->array
*/
$colinfo = explode('(',$oProc->m_odb->f(1));
- $prec = ereg_replace(')','',$colinfo[1]);
+ $prec = str_replace(')','',$colinfo[1]);
$scales = explode(',',$prec);
if($colinfo[0] == 'enum')
Modified: trunk/phpgwapi/inc/class.schema_proc_oracle.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.schema_proc_oracle.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.schema_proc_oracle.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -220,7 +220,7 @@
/* The rest of this is used only for SQL->array
*/
$colinfo = explode('(',$oProc->m_odb->f(1));
- $prec = ereg_replace(')','',$colinfo[1]);
+ $prec = str_replace(')','',$colinfo[1]);
$scales = explode(',',$prec);
if($colinfo[0] == 'enum')
Modified: trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -358,7 +358,7 @@
$default = '';
$nullcomma = '';
}
- $default = ereg_replace("''","'",$default);
+ $default = str_replace("''","'",$default);
$this->sCol[] = "\t\t\t\t'" . $colname . "' =>
array(" . $type . ',' . $null . $nullcomma . $default . '),' . "\n";
}
Modified: trunk/phpgwapi/inc/class.send.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.send.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.send.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -382,8 +382,8 @@
{
// convert HTML chars for ' and " in the email sig
to normal text
$sig_clean = $sig;
- $sig_clean = ereg_replace('"', '"', $sig_clean);
- $sig_clean = ereg_replace(''', '\'', $sig_clean);
+ $sig_clean = str_replace('"', '"', $sig_clean);
+ $sig_clean = str_replace(''', '\'', $sig_clean);
return $sig_clean;
}
Modified: trunk/phpgwapi/inc/class.setup.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.setup.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.setup.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -538,7 +538,7 @@
// Clean up locations, custom fields and ACL
$this->db->query("SELECT app_id FROM phpgw_applications
WHERE app_name = '{$appname}'");
$this->db->next_record();
- $app_id = $this->db->f('app_id');
+ $app_id = (int)$this->db->f('app_id');
$this->db->query("SELECT location_id FROM
phpgw_locations WHERE app_id = {$app_id}");
@@ -651,8 +651,8 @@
echo'<br>Input values: '
. 'A="'.$a.'", B="'.$b.'"';
}
- $newa = ereg_replace('pre','.',$a);
- $newb = ereg_replace('pre','.',$b);
+ $newa = str_replace('pre','.',$a);
+ $newb = str_replace('pre','.',$b);
$testa = explode('.',$newa);
if(@$testa[1] == '')
{
@@ -740,8 +740,8 @@
echo'<br>Input values: '
. 'A="'.$a.'", B="'.$b.'"';
}
- $newa = ereg_replace('pre','.',$a);
- $newb = ereg_replace('pre','.',$b);
+ $newa = str_replace('pre','.',$a);
+ $newb = str_replace('pre','.',$b);
$testa = explode('.',$newa);
if( !isset($testa[3]) || $testa[3] == '')
{
Modified: trunk/phpgwapi/inc/class.setup_process.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.setup_process.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.setup_process.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -675,7 +675,7 @@
$currentver =
isset($setup_info[$key]['currentver']) ? $setup_info[$key]['currentver'] : '';
/* build
upgrade function name */
- $function =
$appname . '_upgrade' . ereg_replace("\.", '_', $value);
+ $function =
$appname . '_upgrade' . str_replace('.', '_', $value);
if($DEBUG)
{
Modified: trunk/phpgwapi/inc/class.setup_translation.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.setup_translation.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.setup_translation.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -64,7 +64,7 @@
* @param $key phrase to translate
* @param $vars vars sent to lang function, passed to us
*/
- public function translate($key, $vars = array(), $only_common =
false )
+ public function translate($key, $vars = array(), $only_common =
false , $force_app = '')
{
if ( !is_array($vars) )
{
Modified: trunk/phpgwapi/inc/class.shm.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.shm.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.shm.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -76,7 +76,7 @@
}
else
{
- $GLOBALS['phpgw_info']['server']['temp_dir'] = '/tmp/';
+ $GLOBALS['phpgw_info']['server']['temp_dir'] = '/tmp';
}
}
Modified: trunk/phpgwapi/inc/class.uijsaddressbook.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uijsaddressbook.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/inc/class.uijsaddressbook.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -636,7 +636,7 @@
//We get it from the category class and ...
$this->categoryobject=CreateObject('phpgwapi.categories');
$this->categoryobject->app_name = 'addressbook';
- $this->catlist=ereg_replace( ' <' .
lang('Global') . ' ' . lang($this->categoryobject->app_name).'>'
+ $this->catlist=str_replace( ' <' .
lang('Global') . ' ' . lang($this->categoryobject->app_name).'>'
,'',$this->categoryobject->formated_list('select','all',$this->cat_id,'True'));
// }
$this->template->set_var('cats_list',
Modified: trunk/phpgwapi/inc/class.vcard.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.vcard.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/class.vcard.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -181,10 +181,10 @@
$field[$key] = strtoupper($val);
}
- $field[0] = ereg_replace("A\.",'',$field[0]);
- $field[0] = ereg_replace("B\.",'',$field[0]);
- $field[0] = ereg_replace("C\.",'',$field[0]);
- $field[0] = ereg_replace("D\.",'',$field[0]);
+ $field[0] = str_replace("A\.",'',$field[0]);
+ $field[0] = str_replace("B\.",'',$field[0]);
+ $field[0] = str_replace("C\.",'',$field[0]);
+ $field[0] = str_replace("D\.",'',$field[0]);
$values = split(';',$value);
switch ($field[0])
{
@@ -247,15 +247,15 @@
$entry['comm_media']['website'] =
$values[0];
break;
case 'NOTE':
- //$entry['note'] =
ereg_replace('=0D=0A',"\n",$values[0]);
+ //$entry['note'] =
str_replace('=0D=0A',"\n",$values[0]);
$entry['notes']['type'] = 'vcard';
- $entry['notes']['note'] =
ereg_replace('=0D=0A',"\n",$values[0]);
+ $entry['notes']['note'] =
str_replace('=0D=0A',"\n",$values[0]);
break;
case 'KEY':
- $entry['key'] =
ereg_replace('=0D=0A',"\n",$values[0]);
+ $entry['key'] =
str_replace('=0D=0A',"\n",$values[0]);
break;
case 'LABEL':
- $entry['label'] =
ereg_replace('=0D=0A',"\n",$values[0]);
+ $entry['label'] =
str_replace('=0D=0A',"\n",$values[0]);
break;
case 'BDAY': #1969-12-31
// use ISO 8601
@@ -276,7 +276,7 @@
$entry['department'] = $values[1];
break;
case 'ADR':
- $field[1] =
ereg_replace("TYPE=",'',$field[1]);
+ $field[1] =
str_replace("TYPE=",'',$field[1]);
switch ($field[1])
{
case 'INTL':
@@ -689,7 +689,7 @@
$entries .= 'ORG;ENCODING=QUOTED-PRINTABLE:' .
$org . "\r\n";
}
- $workattr = ereg_replace('ADR;','',$workattr);
+ $workattr = str_replace('ADR;','',$workattr);
// remember the correct order of address fields!
$workaddr['POSTOFFICEBOX'] =
$this->vCard_encode($workaddr['POSTOFFICEBOX'], 'QUOTED-PRINTABLE', false);
$workaddr['EXT'] =
$this->vCard_encode($workaddr['EXT'], 'QUOTED-PRINTABLE', false);
@@ -702,7 +702,7 @@
$work = 'A.ADR;' . $workattr .
';ENCODING=QUOTED-PRINTABLE:' . $workaddr . "\r\n";
$wlabel = 'LABEL;TYPE=WORK;;ENCODING=QUOTED-PRINTABLE:'
. $wlabel . "\r\n";
- $homeattr = ereg_replace('ADR;','',$homeattr);
+ $homeattr = str_replace('ADR;','',$homeattr);
// remember the correct order of address fields!
$homeaddr['POSTOFFICEBOX'] =
$this->vCard_encode($homeaddr['POSTOFFICEBOX'], 'QUOTED-PRINTABLE', false);
$homeaddr['EXT'] =
$this->vCard_encode($homeaddr['EXT'], 'QUOTED-PRINTABLE', false);
@@ -715,7 +715,7 @@
$home = 'B.ADR;' . $homeattr .
';ENCODING=QUOTED-PRINTABLE:' . $homeaddr . "\r\n";
$hlabel = 'LABEL;TYPE=HOME;;ENCODING=QUOTED-PRINTABLE:'
. $hlabel . "\r\n";
- $entries = ereg_replace('PUBKEY','KEY',$entries);
+ $entries = str_replace('PUBKEY','KEY',$entries);
$entries .= $work . $home . $wlabel . $hlabel .
'END:VCARD' . "\r\n";
$entries .= "\r\n";
@@ -822,7 +822,7 @@
if ( strstr(strtolower($name),
$this->import[$fname]) )
{
$value = trim($value);
- //$value =
ereg_replace('=0D=0A','\n',$value); // use quoted_printable_decode above
+ //$value =
str_replace('=0D=0A','\n',$value); // use quoted_printable_decode above
$parsed_line += array($name =>
$value);
}
}
Modified: trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- trunk/phpgwapi/inc/functions.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/inc/functions.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -454,7 +454,7 @@
{
if(!$GLOBALS['phpgw']->db->query('select count(config_name)
from phpgw_config',__LINE__,__FILE__))
{
- $setup_dir =
ereg_replace($_SERVER['PHP_SELF'],'index.php','setup/');
+ $setup_dir =
str_replace($_SERVER['PHP_SELF'],'index.php','setup/');
echo '<center><b>Fatal Error:</b> It appears that you
have not created the database tables for '
.'phpGroupWare. Click <a href="' . $setup_dir .
'">here</a> to run setup.</center>';
exit;
@@ -462,7 +462,7 @@
}
else
{
- $setup_dir =
ereg_replace($_SERVER['PHP_SELF'],'index.php','setup/');
+ $setup_dir =
str_replace($_SERVER['PHP_SELF'],'index.php','setup/');
echo '<center><b>Fatal Error:</b> Unable to connect to database
server '
.'Click <a href="' . $setup_dir . '">here</a> to run
setup.</center>';
exit;
Modified: trunk/phpgwapi/setup/default_records.inc.php
===================================================================
--- trunk/phpgwapi/setup/default_records.inc.php 2010-10-10 12:24:42 UTC
(rev 6461)
+++ trunk/phpgwapi/setup/default_records.inc.php 2010-10-10 16:30:49 UTC
(rev 6462)
@@ -172,7 +172,16 @@
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_note_type (description) VALUES ('system')");
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='email'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
@@ -187,7 +196,16 @@
}
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='phone'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
@@ -228,7 +246,16 @@
. ")");
}
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='fax'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
@@ -241,7 +268,16 @@
. ")");
}
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='mobile phone'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
@@ -254,7 +290,16 @@
. ")");
}
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='instant messaging'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
@@ -279,7 +324,16 @@
. ")");
}
$GLOBALS['phpgw_setup']->oProc->query("SELECT comm_type_id FROM
phpgw_contact_comm_type WHERE type='url'");
- $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+// $comm_type_ids = $GLOBALS['phpgw_setup']->oProc->m_odb->resultSet;
+ $comm_type_ids = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $comm_type_ids[]=array
+ (
+ 'comm_type_id' =>
$GLOBALS['phpgw_setup']->oProc->f('comm_type_id')
+ );
+ }
+
for($i = 0; $i < count($comm_type_ids); $i++)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
phpgw_contact_comm_descr (comm_type_id,descr) VALUES ("
Modified: trunk/phpgwapi/setup/tables_current.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_current.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/setup/tables_current.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -86,7 +86,7 @@
'pk' => array('delegate_id'),
'fk' => array(),
'ix' => array(),
- 'uc' =>
array('account_id','owner_id','location_id','data')
+ 'uc' =>
array()//array('account_id','owner_id','location_id','data') //FIXME - MySQL
needs a length on the data-field
),
'phpgw_preferences' => array(
'fd' => array(
@@ -691,6 +691,6 @@
'pk' => array('section_id','attrib_id','id'),
'fk' => array(),
'ix' => array(),
- 'uc' => array('section_id','attrib_id','value')
+ 'uc' => array()
)
);
Modified: trunk/phpgwapi/setup/tables_update.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_update.inc.php 2010-10-10 12:24:42 UTC (rev
6461)
+++ trunk/phpgwapi/setup/tables_update.inc.php 2010-10-10 16:30:49 UTC (rev
6462)
@@ -2745,7 +2745,7 @@
'pk' => array('delegate_id'),
'fk' => array(),
'ix' => array(),
- 'uc' =>
array('account_id','owner_id','location_id','data')
+ 'uc' =>
array()//array('account_id','owner_id','location_id','data') //FIXME - MySQL
needs a length on the data-field
)
);
@@ -2832,7 +2832,7 @@
'pk' => array('section_id','attrib_id','id'),
'fk' => array(),
'ix' => array(),
- 'uc' => array('section_id','attrib_id','value')
+ 'uc' => array()
)
);
Modified: trunk/setup/applications.php
===================================================================
--- trunk/setup/applications.php 2010-10-10 12:24:42 UTC (rev 6461)
+++ trunk/setup/applications.php 2010-10-10 16:30:49 UTC (rev 6462)
@@ -113,6 +113,17 @@
}
$GLOBALS['phpgw_setup']->loaddb();
+
+
+ $GLOBALS['phpgw']->db = &$GLOBALS['phpgw_setup']->db;
+
+ $c = createObject('phpgwapi.config','phpgwapi');
+ $c->read();
+ foreach ($c->config_data as $k => $v)
+ {
+ $GLOBALS['phpgw_info']['server'][$k] = $v;
+ }
+
$GLOBALS['phpgw_info']['setup']['stage']['db'] =
$GLOBALS['phpgw_setup']->detection->check_db();
$setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
Modified: trunk/setup/config.php
===================================================================
--- trunk/setup/config.php 2010-10-10 12:24:42 UTC (rev 6461)
+++ trunk/setup/config.php 2010-10-10 16:30:49 UTC (rev 6462)
@@ -77,7 +77,7 @@
$setup_tpl->set_var('lang_cookies_must_be_enabled', lang('<b>NOTE:</b>
You must have cookies enabled to use setup and header admin!') );
// Following to ensure windows file paths are saved correctly
- set_magic_quotes_runtime(0);
+ //set_magic_quotes_runtime(0);
$GLOBALS['phpgw_setup']->loaddb();
@@ -249,9 +249,10 @@
$setup_tpl->set_var($value, lang($newval));
break;
case 'value':
- $newval = ereg_replace(' ','_',$newval);
+ $newval = str_replace(' ','_',$newval);
/* Don't show passwords in the form */
- if(ereg('passwd',$value) ||
ereg('password',$value) || ereg('root_pw',$value))
+ // if(ereg('passwd',$value) ||
ereg('password',$value) || ereg('root_pw',$value))
+ if(preg_match('/(passwd|password|root_pw)/i',
$value))
{
$setup_tpl->set_var($value,'');
}
@@ -282,7 +283,7 @@
}
break;
case 'hook':
- $newval = ereg_replace(' ','_',$newval);
+ $newval = str_replace(' ','_',$newval);
$setup_tpl->set_var($value,
$newval($current_config) );
break;
default:
Modified: trunk/setup/inc/functions.inc.php
===================================================================
--- trunk/setup/inc/functions.inc.php 2010-10-10 12:24:42 UTC (rev 6461)
+++ trunk/setup/inc/functions.inc.php 2010-10-10 16:30:49 UTC (rev 6462)
@@ -233,12 +233,14 @@
'text' => "$error_msg\n" . phpgw_parse_backtrace($bt)
);
+ // echo "\n<br>" . lang('ERROR : %1 in %2 at line %3', $error_msg,
$error_file, $error_line) . "<br>\n";
switch ( $error_level )
{
case E_USER_ERROR:
case E_ERROR:
$log_args['severity'] = 'F'; //all "ERRORS"
should be fatal
$log->fatal($log_args);
+ echo "\n<br>" . lang('ERROR Fatal: %1 in %2 at
line %3', $error_msg, $error_file, $error_line) . "<br>\n";
break;
case E_WARNING:
case E_USER_WARNING:
@@ -275,7 +277,7 @@
$f = fopen('./lang/languages','rb');
while($line = fgets($f,200))
{
- list($x,$y) = split("\t",$line);
+ list($x,$y) = explode("\t",$line);
$languages[$x]['lang'] = trim($x);
$languages[$x]['descr'] = trim($y);
$languages[$x]['available'] = False;
@@ -293,7 +295,7 @@
}
$d->close();
- //print_r($languages);
+// print_r($languages);
return $languages;
}
@@ -339,7 +341,7 @@
$GLOBALS['phpgw_info']['server']['app_images'] =
'templates/base/images';
- if($_POST['setting']['enable_mcrypt'] == 'True')
+ if(isset($_POST['setting']['enable_mcrypt']) &&
$_POST['setting']['enable_mcrypt'] == 'True')
{
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = true;
$_iv = $_POST['setting']['mcrypt_iv'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6462] replace deprecated function - and some mysql fixes,
Sigurd Nes <=