Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Added a custom csv line parsing (partial) for when the program will be re-written in C | 746560420021d148c58578af77c9f7bb05cc5918 | Catalin(ux) M. BOIE | 2017-03-02 17:53:05 |
Do not test doit != 1 because it can be a bigger number (thanks w3af!) | 214dfb3cd1c7e5a3b5a0353a4c9f9b63cb6545f2 | Catalin(ux) M. BOIE | 2017-03-02 17:51:56 |
TODO add/delete | 1c8ffca4d65be53acdfe21d4c3c0888707f5d10b | Catalin(ux) M. BOIE | 2017-03-02 17:50:28 |
Disable TRACE command in Apache sample conf | 3c59e1ef1c87689940eb2bc0c73895101815471b | Catalin(ux) M. BOIE | 2017-03-02 17:47:13 |
Return error if a mr cannot be found | 3eea0ed2eb3b7a103dac191b7047268baa95d20f | Catalin(ux) M. BOIE | 2017-03-02 17:40:46 |
Do not show big files. | 2911893ff2790dabd0276a0fe83bfddcb0dd91c3 | Catalin(ux) M. BOIE | 2017-02-26 09:44:01 |
Disable fetch by git protocol of private repos! | 34542abdf3711dad4fef26b36e2c9f057aac4fff | Catalin(ux) M. BOIE | 2017-02-24 22:04:59 |
Set language to 'en' for htmln tag | be020d391beb150bab9fa3eedb0e4fcddf00ce00 | Catalin(ux) M. BOIE | 2017-02-24 22:03:47 |
Trademark signs for Git and add a reference to SFC | 223d90296b59a44b2887808301443264bde89a13 | Catalin(ux) M. BOIE | 2017-02-24 22:02:49 |
TODO changes | 0072cc306c6dfec9349a7d67dd1d71650dc0ef3a | Catalin(ux) M. BOIE | 2017-02-24 21:57:31 |
SELinux policy; php-fpm pids, logs and sockets | cf7770b2233a216c697e3f340f95960ccfe843cf | Catalin(ux) M. BOIE | 2017-02-24 21:57:12 |
Improved testing; add a fetch over git for a private repo | 8241de314aff22da494bbd0ed5b1ee2017674c6f | Catalin(ux) M. BOIE | 2017-02-24 21:52:02 |
Change caps for some error message; no code changes. | aab9ce336362beda61a4470cbd63ccc06778eeb1 | Catalin(ux) M. BOIE | 2017-02-24 21:48:13 |
Some clients, for exampple JGit sends the request gzipped. Deal with it. Thanks Gabi for the report! | ea9023af24a172724ec22313c8c0c15cc88f90df | Catalin(ux) M. BOIE | 2017-02-24 19:47:29 |
Switch to quotes to be able to use commas; small corrections | ab27969287d666d0fb526f7b24b04f65ab7d54f7 | Catalin(ux) M. BOIE | 2017-02-14 18:28:13 |
Added more info to comparison and added baloons (Stig suggestion) | 07c13312204980b85229acf7f0ab1e3a66aa6677 | Catalin(ux) M. BOIE | 2017-02-13 18:31:41 |
Comparison updated based on Stig's help! Thanks! | d45c87235c003153b0579d9d875b62a0f6e0f209 | Catalin(ux) M. BOIE | 2017-02-13 17:54:00 |
Corrected a ORDER before WHERE affecting the listing of the users in admin section | ee889bb3e9fb175af625cc5dab26c079fe6a6108 | Catalin(ux) M. BOIE | 2017-01-31 18:08:47 |
Bump version to v0.65 | 23209e409cae8a83b33b53b3cb3109a63be7bd8c | Catalin(ux) M. BOIE | 2017-01-30 18:52:26 |
Updates SELinux policy file | fa9d4acd0c6ee730ee45c3e3ab57b55665e74666 | Catalin(ux) M. BOIE | 2017-01-30 18:51:52 |
File | Lines added | Lines deleted |
---|---|---|
misc/compare.php | 84 | 0 |
File misc/compare.php changed (mode: 100644) (index f1a68b2..056f6e1) | |||
3 | 3 | // compare.csv is easy edited with LibreOffice | // compare.csv is easy edited with LibreOffice |
4 | 4 | // compare.html gets included in the website | // compare.html gets included in the website |
5 | 5 | ||
6 | /* | ||
7 | * Returns an array with fields | ||
8 | * Parses something like: "a,a",,"b","c" => array('a,a', '', 'b', 'c') | ||
9 | */ | ||
10 | /* | ||
11 | function parse_csv_line($line) | ||
12 | { | ||
13 | $ret = array(); | ||
14 | $pos = 0; | ||
15 | $f = ''; | ||
16 | $first = TRUE; | ||
17 | $len = strlen($line); | ||
18 | $last_was_comma = FALSE; | ||
19 | while (1) { | ||
20 | //echo "REST: " . substr($line, $pos) . "\n"; | ||
21 | if (strncmp($line[$pos], '"', 1) == 0) { | ||
22 | $q = strpos($line, '"', $pos + 1); | ||
23 | //echo "Q q=" . $q . "\n"; | ||
24 | if ($q === FALSE) { | ||
25 | echo 'Line: ' . $line . ' is malformed (unterminated quoted string)!' . "\n"; | ||
26 | return FALSE; | ||
27 | } | ||
28 | $ret[] = substr($line, $pos + 1, $q - $pos - 1); | ||
29 | $pos = $q + 1; | ||
30 | |||
31 | if ($pos == $len) | ||
32 | break; | ||
33 | |||
34 | if (strncmp($line[$pos], ',', 1) != 0) { | ||
35 | echo 'Line: ' . $line . ' is malformed (no comma after quote)!' . "\n"; | ||
36 | return FALSE; | ||
37 | } | ||
38 | |||
39 | $pos++; // skip comma | ||
40 | } else { | ||
41 | // This field does not start with '"' => starts with a comma! Search till next ',' | ||
42 | $q = strpos($line, ',', $pos); | ||
43 | //echo "X q=" . $q . "\n"; | ||
44 | if ($q === FALSE) { | ||
45 | // Final element after last ',' | ||
46 | $ret[] = substr($line, $pos); | ||
47 | break; | ||
48 | } | ||
49 | |||
50 | $last_was_comma = TRUE; | ||
51 | $ret[] = substr($line, $pos, $q - $pos); | ||
52 | $pos = $q + 1; | ||
53 | if ($pos == $len) | ||
54 | break; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | if ($last_was_comma) | ||
59 | $ret[] = ''; | ||
60 | |||
61 | return $ret; | ||
62 | } | ||
63 | |||
64 | $s = 'a'; | ||
65 | $r = parse_csv_line($s); | ||
66 | echo $s . ':'; print_r($r); | ||
67 | |||
68 | $s = ',b'; | ||
69 | $r = parse_csv_line($s); | ||
70 | echo $s . ':'; print_r($r); | ||
71 | |||
72 | $s = '"a","b","c'; | ||
73 | $r = parse_csv_line($s); | ||
74 | echo $s . ':'; print_r($r); | ||
75 | |||
76 | $s = '"a","b","c"'; | ||
77 | $r = parse_csv_line($s); | ||
78 | echo $s . ':'; print_r($r); | ||
79 | |||
80 | $s = ',"a,a","b 3 6,6","c d e c",,'; | ||
81 | $r = parse_csv_line($s); | ||
82 | echo $s . ':'; print_r($r); | ||
83 | |||
84 | $s = '"a",,'; | ||
85 | $r = parse_csv_line($s); | ||
86 | echo $s . ':'; print_r($r); | ||
87 | exit(1); | ||
88 | */ | ||
89 | |||
6 | 90 | $INC = dirname(__FILE__) . '/../inc'; | $INC = dirname(__FILE__) . '/../inc'; |
7 | 91 | require_once($INC . '/util.inc.php'); | require_once($INC . '/util.inc.php'); |
8 | 92 |