/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -dPNur gpg.old/gpg_hook_functions.php gpg/gpg_hook_functions.php
--- gpg.old/gpg_hook_functions.php	2007-06-11 10:36:16.000000000 +0000
+++ gpg/gpg_hook_functions.php	2007-06-11 10:46:54.000000000 +0000
@@ -983,6 +983,9 @@
 if ($debug) { echo "<p>no_encrypt_on_setup: $no_encrypt_on_setup<br>gpg_export: $gpg_export<br>pubring: $pubring<br>secring: $secring<br>"; }
 
 
+    global $gpg_flag_js_installed;
+    $gpg_flag_js_installed = false;
+    
 /**
  * Some people may choose to disable javascript even though their
  * browser is capable of using it. So these folks don't complain,
@@ -1037,6 +1040,7 @@
 
     if ((file_exists($secring)) and (filesize($secring)>0) and ($GLOBALS['GPG_SYSTEM_OPTIONS']['allowprivatekeys']=='true') and ($use_signing_key_id=='true')){
         if (!$no_encrypt_on_setup) {
+	    $gpg_flag_js_installed = true;
             echo <<<TILLEND
 <script type='text/javascript'>
 <!--
diff -dPNur gpg.old/setup.php gpg/setup.php
--- gpg.old/setup.php	2007-06-11 10:37:57.000000000 +0000
+++ gpg/setup.php	2007-06-11 10:47:17.000000000 +0000
@@ -147,7 +147,10 @@
  * @return void
  */
 function gpg_compose_form () {
-    echo 'onsubmit="return gpg_composeSubmit(this);"';
+    global $gpg_flag_js_installed;
+    if ($gpg_flag_js_installed) {
+	echo 'onsubmit="return gpg_composeSubmit(this);"';
+    }
 }