Fossil SCM

More enhancements to the button on the transfer setup page.

mistachkin 2013-10-18 00:58 tkt-change-hook
Commit dcc8236e9795b5942928d768087f9280cd8f2c2e
1 file changed +8 -7
+8 -7
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -46,40 +46,41 @@
4646
@ </table>
4747
4848
url_parse(0, 0);
4949
if( g.urlProtocol ){
5050
unsigned syncFlags;
51
- const char *zSync;
51
+ const char *zButton;
5252
char *zWarning;
5353
5454
if( db_get_boolean("dont-push", 0) ){
5555
syncFlags = SYNC_PULL;
56
- zSync = "Pull";
56
+ zButton = "Pull";
5757
zWarning = 0;
5858
}else{
5959
syncFlags = SYNC_PUSH | SYNC_PULL;
60
- zSync = "Synchronize";
60
+ zButton = "Synchronize";
6161
zWarning = mprintf("WARNING: Pushing to \"%s\" is enabled.",
6262
g.urlCanonical);
6363
}
6464
if( P("sync") ){
6565
user_select();
6666
url_enable_proxy(0);
6767
client_sync(syncFlags, 0, 0);
6868
}
69
- @ <p>Press the %h(zSync) button below to synchronize the local repository
70
- @ now. This may be useful when testing the various transfer scripts.</p>
71
- @
69
+ @ <p>Press the %h(zButton) button below to synchronize with the
70
+ @ "%h(g.urlCanonical)" repository now. This may be useful when
71
+ @ testing the various transfer scripts.</p>
7272
if( zWarning ){
73
+ @
7374
@ <big><b>%h(zWarning)</b></big>
7475
free(zWarning);
7576
}
7677
@
7778
@ <blockquote>
7879
@ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
7980
login_insert_csrf_secret();
80
- @ <input type="submit" name="sync" value="%h(zSync)" />
81
+ @ <input type="submit" name="sync" value="%h(zButton)" />
8182
@ </div></form>
8283
@ </blockquote>
8384
@
8485
}
8586
8687
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -46,40 +46,41 @@
46 @ </table>
47
48 url_parse(0, 0);
49 if( g.urlProtocol ){
50 unsigned syncFlags;
51 const char *zSync;
52 char *zWarning;
53
54 if( db_get_boolean("dont-push", 0) ){
55 syncFlags = SYNC_PULL;
56 zSync = "Pull";
57 zWarning = 0;
58 }else{
59 syncFlags = SYNC_PUSH | SYNC_PULL;
60 zSync = "Synchronize";
61 zWarning = mprintf("WARNING: Pushing to \"%s\" is enabled.",
62 g.urlCanonical);
63 }
64 if( P("sync") ){
65 user_select();
66 url_enable_proxy(0);
67 client_sync(syncFlags, 0, 0);
68 }
69 @ <p>Press the %h(zSync) button below to synchronize the local repository
70 @ now. This may be useful when testing the various transfer scripts.</p>
71 @
72 if( zWarning ){
 
73 @ <big><b>%h(zWarning)</b></big>
74 free(zWarning);
75 }
76 @
77 @ <blockquote>
78 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
79 login_insert_csrf_secret();
80 @ <input type="submit" name="sync" value="%h(zSync)" />
81 @ </div></form>
82 @ </blockquote>
83 @
84 }
85
86
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -46,40 +46,41 @@
46 @ </table>
47
48 url_parse(0, 0);
49 if( g.urlProtocol ){
50 unsigned syncFlags;
51 const char *zButton;
52 char *zWarning;
53
54 if( db_get_boolean("dont-push", 0) ){
55 syncFlags = SYNC_PULL;
56 zButton = "Pull";
57 zWarning = 0;
58 }else{
59 syncFlags = SYNC_PUSH | SYNC_PULL;
60 zButton = "Synchronize";
61 zWarning = mprintf("WARNING: Pushing to \"%s\" is enabled.",
62 g.urlCanonical);
63 }
64 if( P("sync") ){
65 user_select();
66 url_enable_proxy(0);
67 client_sync(syncFlags, 0, 0);
68 }
69 @ <p>Press the %h(zButton) button below to synchronize with the
70 @ "%h(g.urlCanonical)" repository now. This may be useful when
71 @ testing the various transfer scripts.</p>
72 if( zWarning ){
73 @
74 @ <big><b>%h(zWarning)</b></big>
75 free(zWarning);
76 }
77 @
78 @ <blockquote>
79 @ <form method="post" action="%s(g.zTop)/%s(g.zPath)"><div>
80 login_insert_csrf_secret();
81 @ <input type="submit" name="sync" value="%h(zButton)" />
82 @ </div></form>
83 @ </blockquote>
84 @
85 }
86
87

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button