/[suikacvs]/markup/html/html5/spec-ja/edit2.cgi
Suika

Diff of /markup/html/html5/spec-ja/edit2.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Sun Oct 26 08:44:19 2008 UTC revision 1.3 by wakaba, Sun Oct 26 10:10:54 2008 UTC
# Line 25  if ($path eq '/') { Line 25  if ($path eq '/') {
25                  split /[\x0D\x0A]+/, $cgi->get_parameter ('tags') // ''];                  split /[\x0D\x0A]+/, $cgi->get_parameter ('tags') // ''];
26    
27      my $hash = get_hash ($en);      my $hash = get_hash ($en);
28        my $entry = {en => $en, ja => $ja, tags => $tags};
29        
30      lock_entry ($hash);      lock_entry ($hash);
31      set_entry ($hash, $is_pattern => {en => $en, ja => $ja, tags => $tags});      set_entry ($hash, $is_pattern => $entry);
32      commit_entries ("$path: $hash updated by $ENV{AUTH_USER}");      commit_entries ("$path: $hash updated by $ENV{AUTH_USER}");
33            
34      print "Status: 204 Saved\n\n";      print "Status: 200 Saved\n";
35    
36        my $updates = {$hash => $entry};
37        
38        binmode STDOUT, ':encoding(utf-8)';
39        print "Content-Type: application/json\n\n";
40        
41        require JSON;
42        print scalar JSON::objToJson ($updates);
43      exit;      exit;
44    } else {    } else {
45      print q[Status: 405 Method Not Allowed      print q[Status: 405 Method Not Allowed

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24