[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc functions.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc functions.inc.php |
Date: |
Fri, 22 Sep 2006 03:15:07 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/09/22 03:15:07
Modified files:
inc : functions.inc.php
Log message:
make lang() kinda work when translations not available, fix password
hiding logic a little more, fix frame check error
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/functions.inc.php?cvsroot=phpgwapi&r1=1.201&r2=1.202
Patches:
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -b -r1.201 -r1.202
--- functions.inc.php 22 Sep 2006 00:39:36 -0000 1.201
+++ functions.inc.php 22 Sep 2006 03:15:07 -0000 1.202
@@ -8,7 +8,7 @@
* @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage utilities
- * @version $Id: functions.inc.php,v 1.201 2006/09/22 00:39:36 skwashd
Exp $
+ * @version $Id: functions.inc.php,v 1.202 2006/09/22 03:15:07 skwashd
Exp $
*/
@@ -96,8 +96,11 @@
{
$vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10);
}
- $value = $GLOBALS['phpgw']->translation->translate("$key",
$vars);
- return $value;
+ if ( true )//!isset($GLOBALS['phpgw']->translation) ||
!is_object($GLOBALS['phpgw']->translation) )
+ {
+ return sprintf( preg_replace('/(%\d)+/', '%s', $key),
$m1, $m2, $m3, $m4, $m5, $m6, $m7, $m8, $m9, $m10) . ' *#*';
+ }
+ return $GLOBALS['phpgw']->translation->translate("$key", $vars);
}
/**
@@ -178,7 +181,7 @@
// Drop passwords from backtrace
if ( $arg ==
$GLOBALS['phpgw_info']['server']['header_admin_password']
|| $arg ==
$GLOBALS['phpgw_info']['server']['db_pass']
- || $arg ==
$GLOBALS['phpgw_info']['user']['passwd']
+ ||
(isset($GLOBALS['phpgw_info']['user']['passwd']) && $arg ==
$GLOBALS['phpgw_info']['user']['passwd'] )
)
{
$trace[$num]['args'][$anum] =
'***PASSWORD***';
@@ -209,8 +212,11 @@
/**
* phpGroupWare generic error handler
+ *
+ * @link http://php.net/set_error_handler
+ *
*/
- function phpgw_handle_error($error_level, $error_msg, $error_file,
$error_line)
+ function phpgw_handle_error($error_level, $error_msg, $error_file,
$error_line, $error_context = array())
{
if ( error_reporting() == 0 ) // 0 == @function() so we ignore
it, as the dev requested
{
@@ -624,10 +630,9 @@
/*************************************************************************\
* If they are using frames, we need to set some variables
*
\*************************************************************************/
- if
(((isset($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes'])
&&
-
$GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) &&
- $GLOBALS['phpgw_info']['server']['useframes'] ==
'allowed') ||
- ($GLOBALS['phpgw_info']['server']['useframes'] ==
'always'))
+ if ( (
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['useframes']) &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['useframes'])
+ && (
isset($GLOBALS['phpgw_info']['server']['useframes']) &&
$GLOBALS['phpgw_info']['server']['useframes'] == 'allowed') )
+ || (
isset($GLOBALS['phpgw_info']['server']['useframes']) &&
$GLOBALS['phpgw_info']['server']['useframes'] == 'always') )
{
$GLOBALS['phpgw_info']['flags']['navbar_target'] =
'phpgw_body';
}
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/09
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Sigurd Nes, 2006/09/20
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/21
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/21
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php,
Dave Hall <=
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/21
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/24
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/25
- [Phpgroupware-cvs] phpgwapi/inc functions.inc.php, Dave Hall, 2006/09/26