]> git.pld-linux.org Git - packages/squirrelmail.git/blame - squirrelmail-fortune.patch
- added alias for apache
[packages/squirrelmail.git] / squirrelmail-fortune.patch
CommitLineData
f5e2c2ec 1--- squirrelmail-1.2.8/plugins/fortune/setup.php.orig Mon Mar 5 16:21:41 2001
2+++ squirrelmail-1.2.8/plugins/fortune/setup.php Wed Sep 18 16:50:05 2002
3@@ -12,7 +12,6 @@
4 $squirrelmail_plugin_hooks["options_display_inside"]['fortune'] = 'fortune_options';
5 $squirrelmail_plugin_hooks['options_display_save']['fortune'] = 'fortune_save';
6 $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load';
7-
8 }
9
10 function fortune() {
11@@ -20,7 +19,7 @@
17e01079 12 if( !$fortune_visible ) {
13 return;
14 }
15- $fortune_location = "/usr/games/fortune";
16+ $fortune_location = "/usr/bin/fortune";
17 global $color;
18 $exist = file_exists("$fortune_location");
19 echo "<center><table cellpadding=0 cellspacing=0 border=0 bgcolor=$color[10]><tr><td><table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=\"$color[5]\"><tr><td align=center>";
f5e2c2ec 20@@ -41,10 +40,8 @@
21 global $fortune_visible;
22
23 $fortune_visible = getPref($data_dir, $username, 'fortune_visible');
24-
25 }
26
27-
28 function fortune_options() {
29 global $fortune_visible;
30 echo "<tr><td align=right nowrap>Fortunes:</td>\n";
31@@ -54,18 +51,16 @@
32 echo "> Show fortunes at top of mailbox</td></tr>\n";
33 }
34
35-function fortune_save()
36-{
37- global $username,$data_dir;
38- global $fortune_fortune_visible;
39-
40- if (isset($fortune_fortune_visible))
41- {
42- setPref($data_dir, $username, 'fortune_visible', '1');
43- }
44- else
45- {
46- setPref($data_dir, $username, 'fortune_visible', '');
47- }
48+function fortune_save() {
49+ global $username,$data_dir;
50+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
51+ global $_POST;
52+ }
53+
54+ if(isset($_POST['fortune_fortune_visible'])) {
55+ setPref($data_dir, $username, 'fortune_visible', '1');
56+ } else {
57+ setPref($data_dir, $username, 'fortune_visible', '');
58+ }
59 }
60 ?>
This page took 0.033665 seconds and 4 git commands to generate.