forked from extern/egroupware
mending Warnings: Cannot use a scalar value as an array
This commit is contained in:
parent
39fc5ab48e
commit
d37ee80161
@ -1124,4 +1124,5 @@ if (!function_exists('set_cell_attribute_helper'))
|
||||
}
|
||||
}
|
||||
// just in case someone still uses the old var
|
||||
if (!is_array($GLOBALS['egw_info']['flags']['etemplate'])) $GLOBALS['egw_info']['flags']['etemplate'] = array();
|
||||
$GLOBALS['egw_info']['flags']['etemplate']['loop'] =& boetemplate::$loop;
|
||||
|
@ -187,6 +187,7 @@ class so_sql_cf extends so_sql
|
||||
),__LINE__,__FILE__,false,'',$this->app) as $row)
|
||||
{
|
||||
$entry =& $entries[$row[$this->extra_id]];
|
||||
if (!is_array($entry)) $entry = array();
|
||||
$field = $this->get_cf_field($row[$this->extra_key]);
|
||||
|
||||
if ($this->allow_multiple_values && $this->is_multiple($row[$this->extra_key]))
|
||||
|
@ -362,9 +362,12 @@ class soetemplate
|
||||
{
|
||||
for ($col = 0; $col < $cols; ++$col)
|
||||
{
|
||||
if (!is_array($this->data[$row])) $this->data[$row]=array();
|
||||
$this->data[$row][$this->num2chrs($col)] = $this->empty_cell();
|
||||
}
|
||||
}
|
||||
if (!is_array($this->children)) $this->children = array();
|
||||
if (!is_array($this->children[0])) $this->children[0] = array();
|
||||
$this->children[0]['type'] = 'grid';
|
||||
$this->children[0]['data'] = &$this->data;
|
||||
$this->children[0]['rows'] = &$this->rows;
|
||||
@ -553,6 +556,7 @@ class soetemplate
|
||||
$version = (string) $name['version'];
|
||||
$name = (string) $name['name'];
|
||||
}
|
||||
$where = array();
|
||||
$where[] = 'et_name LIKE '.$this->db->quote($this->sql_wildcards($name).'%');
|
||||
if ($template != '' && $template != 'default')
|
||||
{
|
||||
|
@ -326,7 +326,7 @@ abstract class egw_framework
|
||||
$app = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||
$app = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : lang($app);
|
||||
}
|
||||
|
||||
$var = array();
|
||||
if($app!='wiki') $robots ='<meta name="robots" content="none" />';
|
||||
if (substr($GLOBALS['egw_info']['server']['favicon_file'],0,4) == 'http')
|
||||
{
|
||||
@ -710,6 +710,7 @@ abstract class egw_framework
|
||||
self::includeCSS($GLOBALS['egw_info']['flags']['currentapp'], 'app');
|
||||
|
||||
// add all css files from self::includeCSS
|
||||
if (empty($css_file)) $css_file = '';
|
||||
foreach(self::$css_include_files as $path)
|
||||
{
|
||||
$css_file .= '<link href="'.$GLOBALS['egw_info']['server']['webserver_url'].
|
||||
@ -1030,7 +1031,7 @@ abstract class egw_framework
|
||||
*/
|
||||
static function set_onload($code='',$replace=false)
|
||||
{
|
||||
if ($replace)
|
||||
if ($replace || empty(self::$body_tags['onLoad']))
|
||||
{
|
||||
self::$body_tags['onLoad'] = $code;
|
||||
}
|
||||
@ -1050,7 +1051,7 @@ abstract class egw_framework
|
||||
*/
|
||||
static function set_onunload($code='',$replace=false)
|
||||
{
|
||||
if ($replace)
|
||||
if ($replace || empty(self::$body_tags['onUnload']))
|
||||
{
|
||||
self::$body_tags['onUnload'] = $code;
|
||||
}
|
||||
@ -1070,7 +1071,7 @@ abstract class egw_framework
|
||||
*/
|
||||
static function set_onresize($code='',$replace=false)
|
||||
{
|
||||
if ($replace)
|
||||
if ($replace || empty(self::$body_tags['onResize']))
|
||||
{
|
||||
self::$body_tags['onResize'] = $code;
|
||||
}
|
||||
|
@ -151,6 +151,7 @@ class preferences
|
||||
{
|
||||
$vals += $this->values;
|
||||
}
|
||||
$replace = $with = array();
|
||||
foreach($vals as $key => $val)
|
||||
{
|
||||
if ($this->debug) error_log(__METHOD__." replacing \$\$$key\$\$ with $val ");
|
||||
|
Loading…
Reference in New Issue
Block a user