Comment out non-compliant code (register_globals must be on?)

This commit is contained in:
Miles Lott 2004-02-02 04:18:17 +00:00
parent 50bf0a3307
commit 48a7a5b6bb
2 changed files with 26 additions and 27 deletions

View File

@ -15,7 +15,7 @@
// Only Modify the $file and $title variables..... // Only Modify the $file and $title variables.....
$title = $appname; $title = $appname;
$file = Array( $file = Array(
'Preferences Old' => $GLOBALS['phpgw']->link('/filemanager/preferences.php'), // 'Preferences Old' => $GLOBALS['phpgw']->link('/filemanager/preferences.php'),
'Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname) 'Preferences' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname)
); );
//Do not modify below this line //Do not modify below this line

View File

@ -11,16 +11,15 @@
/* $Id$ */ /* $Id$ */
$phpgw_info["flags"] = array $GLOBALS['phpgw_info']['flags'] = array(
( 'currentapp' => 'filemanager',
"currentapp" => "filemanager", 'enable_nextmatchs_class' => True,
"enable_nextmatchs_class" => True, 'noheader' => True,
"noheader" => True, 'nonavbar' => True
"nonavbar" => True
); );
var_dump($file_attributes); //var_dump($file_attributes);
include("../header.inc.php"); include('../header.inc.php');
/* /*
To add an on/off preference, just add it here. Key is internal name, value is displayed name To add an on/off preference, just add it here. Key is internal name, value is displayed name
*/ */
@ -34,38 +33,38 @@
if ($submit) if ($submit)
{ {
$phpgw->preferences->read_repository (); $GLOBALS['phpgw']->preferences->read_repository ();
reset ($other_checkboxes); reset ($other_checkboxes);
while (list ($internal, $displayed) = each ($other_checkboxes)) while (list ($internal, $displayed) = each ($other_checkboxes))
{ {
$phpgw->preferences->add ($phpgw_info["flags"]["currentapp"], $internal, $$internal); $GLOBALS['phpgw']->preferences->add ($GLOBALS['phpgw_info']["flags"]["currentapp"], $internal, $$internal);
} }
reset ($other_dropdown); reset ($other_dropdown);
while (list ($internal, $displayed) = each ($other_dropdown)) while (list ($internal, $displayed) = each ($other_dropdown))
{ {
$phpgw->preferences->add ($phpgw_info["flags"]["currentapp"], $internal, $$internal); $GLOBALS['phpgw']->preferences->add ($GLOBALS['phpgw_info']["flags"]["currentapp"], $internal, $$internal);
} }
reset ($file_attributes); reset ($file_attributes);
while (list ($internal, $displayed) = each ($file_attributes)) while (list ($internal, $displayed) = each ($file_attributes))
{ {
$phpgw->preferences->add ($phpgw_info["flags"]["currentapp"], $internal, $$internal); $GLOBALS['phpgw']->preferences->add ($GLOBALS['phpgw_info']["flags"]["currentapp"], $internal, $$internal);
} }
$phpgw->preferences->save_repository (True); $GLOBALS['phpgw']->preferences->save_repository (True);
Header('Location: '.$phpgw->link('/preferences/index.php')); Header('Location: '.$GLOBALS['phpgw']->link('/preferences/index.php'));
$phpgw->common->phpgw_exit(); $GLOBALS['phpgw']->common->phpgw_exit();
} }
function display_item ($field,$data) function display_item ($field,$data)
{ {
global $phpgw, $p, $tr_color; global $p, $tr_color;
$tr_color = $phpgw->nextmatchs->alternate_row_color ($tr_color); $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color ($tr_color);
$var = array ( $var = array (
'bg_color' => $tr_color, 'bg_color' => $tr_color,
'field' => $field, 'field' => $field,
@ -75,10 +74,10 @@
$p->parse ('row', 'pref_list', True); $p->parse ('row', 'pref_list', True);
} }
$phpgw->common->phpgw_header (); $GLOBALS['phpgw']->common->phpgw_header ();
echo parse_navbar (); echo parse_navbar ();
$p = CreateObject ('phpgwapi.Template', $phpgw->common->get_tpl_dir ('filemanager')); $p = CreateObject ('phpgwapi.Template', $GLOBALS['phpgw']->common->get_tpl_dir ('filemanager'));
$templates = array ( $templates = array (
'pref' => 'pref.tpl', 'pref' => 'pref.tpl',
'pref_colspan' => 'pref_colspan.tpl', 'pref_colspan' => 'pref_colspan.tpl',
@ -88,8 +87,8 @@
$var = array ( $var = array (
'title' => lang ('FileManager preferences'), 'title' => lang ('FileManager preferences'),
'action_url' => $phpgw->link ('/' . $phpgw_info['flags']['currentapp'] . '/preferences.php'), 'action_url' => $GLOBALS['phpgw']->link ('/' . $GLOBALS['phpgw_info']['flags']['currentapp'] . '/preferences.php'),
'bg_color' => $phpgw_info['theme']['th_bg'], 'bg_color' => $GLOBALS['phpgw_info']['theme']['th_bg'],
'submit_lang' => lang ('submit') 'submit_lang' => lang ('submit')
); );
@ -99,14 +98,14 @@
if ($totalerrors) if ($totalerrors)
{ {
echo '<p><center>' . $phpgw->common->error_list($errors) . '</center>'; echo '<p><center>' . $GLOBALS['phpgw']->common->error_list($errors) . '</center>';
} }
while (list ($internal, $displayed) = each ($file_attributes)) while (list ($internal, $displayed) = each ($file_attributes))
{ {
unset ($checked); unset ($checked);
if ($phpgw_info["user"]["preferences"]["filemanager"][$internal]) if ($GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal])
{ {
$checked = 1; $checked = 1;
} }
@ -120,7 +119,7 @@
while (list ($internal, $displayed) = each ($other_checkboxes)) while (list ($internal, $displayed) = each ($other_checkboxes))
{ {
unset ($checked); unset ($checked);
if ($phpgw_info["user"]["preferences"]["filemanager"][$internal]) if ($GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal])
{ {
$checked = 1; $checked = 1;
} }
@ -142,7 +141,7 @@
continue; continue;
} }
$options .= html_form_option ($value, $value, $phpgw_info["user"]["preferences"]["filemanager"][$internal] == $value, True); $options .= html_form_option ($value, $value, $GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal] == $value, True);
} }
$output = html_form_select_begin ($internal, True); $output = html_form_select_begin ($internal, True);
@ -153,5 +152,5 @@
} }
$p->pparse ('out', 'pref'); $p->pparse ('out', 'pref');
$phpgw->common->phpgw_footer (); $GLOBALS['phpgw']->common->phpgw_footer ();
?> ?>