phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] filemanager preferences.php,1.6.2.2.2.5


From: uid65887
Subject: [Phpgroupware-cvs] filemanager preferences.php,1.6.2.2.2.5
Date: Wed, 27 Apr 2005 07:57:40 -0000

Update of filemanager

Modified Files:
     Branch: Version-0_9_16-branch
            preferences.php lines: +21 -18

Log Message:
fixed prefs etc

====================================================
Index: filemanager/preferences.php
diff -u filemanager/preferences.php:1.6.2.2.2.4 
filemanager/preferences.php:1.6.2.2.2.5
--- filemanager/preferences.php:1.6.2.2.2.4     Thu Nov 13 16:36:00 2003
+++ filemanager/preferences.php Tue Dec 23 23:33:46 2003
@@ -24,7 +24,13 @@
        /*
           To add an on/off preference, just add it here.  Key is internal 
name, value is displayed name
        */
-       $other_checkboxes = array ("viewinnewwin" => lang("View documents in 
new window"), "viewonserver" => lang("View documents on server (if 
available)"), "viewtextplain" => lang("Unknown MIME-type defaults to text/plain 
when viewing"), "dotdot" => lang('Show ..'), "dotfiles" => lang('Show 
dotfiles'), "show_help" => lang('Show help'), "show_command_line" => lang('Show 
command line (EXPERIMENTAL. DANGEROUS)'));
+       $other_checkboxes = array("viewinnewwin" => lang("View documents in new 
window"),
+                                                               "viewonserver" 
=> lang("View documents on server (if available)"),
+                                                               "viewtextplain" 
=> lang("Unknown MIME-type defaults to text/plain when viewing"),
+                                                               "dotdot" => 
lang('Show ..'),
+                                                               "dotfiles" => 
lang('Show dotfiles'),
+                                                               "show_help" => 
lang('Show help'),
+                                                               
"show_command_line" => lang('Show command line (EXPERIMENTAL. DANGEROUS)'));

        /*
           To add a dropdown preferences, add it here.  Key is internal name, 
value key is
@@ -34,27 +40,24 @@

        if ($_POST['save'])
        {
-               $GLOBALS['phpgw']->preferences->read_repository ();
+               $values = $_POST['values'];
+               $select_values = $_POST['select_values'];

-               reset ($file_attributes);
-               while (list ($internal, $displayed) = each ($file_attributes))
-               {
-                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
-               }
+               //_debug_array($values);
+               $GLOBALS['phpgw']->preferences->read_repository();
+               $GLOBALS['phpgw']->preferences->delete('filemanager','');

-               reset ($other_checkboxes);
-               while (list ($internal, $displayed) = each ($other_checkboxes))
+               while (is_array($values) && list($internal,) = each($values))
                {
-                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
+                       
$GLOBALS['phpgw']->preferences->change('filemanager',$internal,(isset($internal)?$internal:''));
                }

-               reset ($other_dropdown);
-               while (list ($internal, $displayed) = each ($other_dropdown))
+               while (is_array($select_values) && list($internal,$displayed) = 
each($select_values))
                {
-                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
+                       
$GLOBALS['phpgw']->preferences->change('filemanager',$internal,$displayed);
                }

-               $GLOBALS['phpgw']->preferences->save_repository (True);
+               $GLOBALS['phpgw']->preferences->save_repository();

                $GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                $GLOBALS['phpgw']->common->phpgw_exit();
@@ -109,7 +112,7 @@
                        $checked = 1;
                }

-               $str = html_form_input("checkbox", $internal, NULL, NULL, NULL, 
$checked, NULL, 1);
+               $str = html_form_input("checkbox", $internal, NULL, NULL, NULL, 
$checked, NULL, 1,True);
                display_item ($displayed, $str);
                //$str .= html_form_input("checkbox", $internal, NULL, NULL, 
NULL, $checked, NULL, 1) . " $displayed" . html_break (1, NULL, 1);
        }
@@ -125,7 +128,7 @@
                        $checked = 1;
                }

-               $str = html_form_input ("checkbox", $internal, NULL, NULL, 
NULL, $checked, NULL, 1);
+               $str = html_form_input ("checkbox", $internal, NULL, NULL, 
NULL, $checked, NULL, 1,True);
                display_item ($displayed, $str);
        }

@@ -145,7 +148,7 @@
                        $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, True);
                $output .= $options;
                $output .= html_form_select_end(True);







reply via email to

[Prev in Thread] Current Thread [Next in Thread]