]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/phpSANE-0.3.3-fixes.patch
Updater: convert extrahd entries to uuid.
[people/pmueller/ipfire-2.x.git] / src / patches / phpSANE-0.3.3-fixes.patch
1 diff -Naur phpSANE_org/config.php phpSANE/config.php
2 --- phpSANE_org/config.php 2005-02-21 07:05:00.000000000 +0100
3 +++ phpSANE/config.php 2008-03-04 14:44:30.000000000 +0100
4 @@ -1,7 +1,7 @@
5 <?PHP
6 // CONFIG ------------------------------------------------------------------------------------
7 $SCANIMAGE="/usr/bin/scanimage"; // auch mit
8 -$PNMTOJPEG="/usr/bin/pnmtojpeg"; // eigenen
9 +$PNMTOJPEG="/usr/local/netpbm/bin/pnmtojpeg"; // eigenen
10 $OCR="/usr/bin/gocr"; // Parametern
11
12 //$SAVE_PLACE="/srv/www/htdocs/web/phpSANE/";
13 @@ -63,7 +63,7 @@
14 if($_GET['mode']) if($clear == 1) $mode="Color"; else $mode=$_GET['mode']; else $mode="Color";
15 if($_GET['resolution']) if($clear == 1) $resolution=100; else $resolution=$_GET['resolution']; else $resolution=100;
16 if($clear == 1) $negative="no"; else $negative=$_GET['negative'];
17 -if($clear == 1) $quality_cal= "yes"; else $quality_cal=$_GET['quality_cal'];
18 +if($clear == 1) $quality_cal= "no"; else $quality_cal=$_GET['quality_cal'];
19 if($clear == 1) $first="";
20 //if($_GET['depth']) $depth=$_GET['depth']; else $depth="8"; // wers braucht
21 //$brightness=$_GET['brightness']; // die werden von meinem scanner leider nicht unterstützt
22 diff -Naur phpSANE_org/menu.php phpSANE/menu.php
23 --- phpSANE_org/menu.php 2005-02-21 06:39:01.000000000 +0100
24 +++ phpSANE/menu.php 2008-03-04 15:03:12.000000000 +0100
25 @@ -74,7 +74,7 @@
26 echo "<option value=\"Gray\" $selected_2>".$lang[$lang_id][16]."\n";
27 echo "<option value=\"Lineart\" $selected_3>".$lang[$lang_id][17]."\n";
28 echo "</SELECT></td>\n";
29 -if(!$_GET['first']) { $first=1; $checked1="checked"; }
30 +//if(!$_GET['first']) { $first=1; $checked1="checked"; }
31 if($quality_cal=="yes") { $checked1="checked"; $first=1; } else { $checked=""; $first=1; }
32 echo "<input type=hidden name=\"first\" value=\"$first\">\n";
33 echo "<td align=\"right\" class=\"text_padd\">".$lang[$lang_id][21]."&nbsp;<INPUT type=\"checkbox\" name=\"quality_cal\" value=\"yes\" ".$checked1."></td>\n";
34 diff -Naur phpSANE_org/scan.php phpSANE/scan.php
35 --- phpSANE_org/scan.php 2005-02-21 07:06:19.000000000 +0100
36 +++ phpSANE/scan.php 2008-03-04 15:57:37.000000000 +0100
37 @@ -75,25 +75,25 @@
38
39 if($action == $lang[$lang_id][27]) {
40 if($format == "jpg") {
41 -$cmd_scan=$cmd_scan." | pnmtojpeg --quality=100 > ".$file_scan;
42 -$scan_yes=`$cmd_scan`;
43 -echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
44 -echo "window.open(\"save.php?file=".$file_scan."&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
45 -echo "</script>\n";
46 -} else {
47 +$cmd_scan=$cmd_scan." | $PNMTOJPEG --quality=100 > ".$file_scan;
48 +}
49 +if($format == "tif") {
50 +$cmd_scan=$cmd_scan." --format=tiff > ".$file_scan;
51 +}
52 +if($format == "pnm") {
53 $cmd_scan=$cmd_scan." > ".$file_scan;
54 +}
55 $scan_yes=`$cmd_scan`;
56 echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
57 -echo "window.open(\"save.php?file=".$file_scan."%26lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
58 +echo "window.open(\"save.php?file=".$file_scan."&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=200,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
59 echo "</script>\n";
60 }
61 -}
62
63 if($action == $lang[$lang_id][26]) {
64 $cmd_scan=$cmd_scan." | ".$OCR." - > ".$file.".txt";
65 $scan_yes=`$cmd_scan`;
66 echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
67 -echo "window.open(\"save.php?file=".$file.".txt%26lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
68 +echo "window.open(\"save.php?file=".$file.".txt&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
69 echo "</script>\n";
70 }
71 }