| | @@ -1072,12 +1072,13 @@ |
| 1072 | 1072 | } |
| 1073 | 1073 | return 1; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | /* |
| 1077 | | -** Passed the values of the "r" and "file" request properties, |
| 1078 | | -** this function verifies that they are valid and populates: |
| 1077 | +** Passed the values of the "checkin" and "filename" request |
| 1078 | +** properties, this function verifies that they are valid and |
| 1079 | +** populates: |
| 1079 | 1080 | ** |
| 1080 | 1081 | ** - *zRevUuid = the fully-expanded value of zRev (owned by the |
| 1081 | 1082 | ** caller). zRevUuid may be NULL. |
| 1082 | 1083 | ** |
| 1083 | 1084 | ** - *vid = the RID of zRevUuid. May not be NULL. |
| | @@ -1129,21 +1130,21 @@ |
| 1129 | 1130 | /* |
| 1130 | 1131 | ** WEBPAGE: fileedit_content |
| 1131 | 1132 | ** |
| 1132 | 1133 | ** Query parameters: |
| 1133 | 1134 | ** |
| 1134 | | -** file=FILENAME |
| 1135 | | -** r=CHECKIN_NAME |
| 1135 | +** filename=FILENAME |
| 1136 | +** checkin=CHECKIN_NAME |
| 1136 | 1137 | ** |
| 1137 | 1138 | ** User must have Write access to use this page. |
| 1138 | 1139 | ** |
| 1139 | 1140 | ** Responds with the raw content of the given page. On error it |
| 1140 | 1141 | ** produces a JSON response as documented for fileedit_ajax_error(). |
| 1141 | 1142 | */ |
| 1142 | 1143 | void fileedit_ajax_content(){ |
| 1143 | | - const char * zFilename = PD("file",P("name")); |
| 1144 | | - const char * zRev = P("r"); |
| 1144 | + const char * zFilename = PD("filename",P("name")); |
| 1145 | + const char * zRev = P("checkin"); |
| 1145 | 1146 | int vid, frid; |
| 1146 | 1147 | Blob content = empty_blob; |
| 1147 | 1148 | const char * zMime; |
| 1148 | 1149 | |
| 1149 | 1150 | if(!fileedit_ajax_boostrap() |
| | @@ -1167,11 +1168,11 @@ |
| 1167 | 1168 | /* |
| 1168 | 1169 | ** WEBPAGE: fileedit_preview |
| 1169 | 1170 | ** |
| 1170 | 1171 | ** Required query parameters: |
| 1171 | 1172 | ** |
| 1172 | | -** file=FILENAME |
| 1173 | +** filename=FILENAME |
| 1173 | 1174 | ** content=text |
| 1174 | 1175 | ** |
| 1175 | 1176 | ** Optional query parameters: |
| 1176 | 1177 | ** |
| 1177 | 1178 | ** render_mode=integer (FE_RENDER_xxx) (default=FE_RENDER_GUESS) |
| | @@ -1186,11 +1187,11 @@ |
| 1186 | 1187 | ** |
| 1187 | 1188 | ** Responds with the HTML content of the preview. On error it produces |
| 1188 | 1189 | ** a JSON response as documented for fileedit_ajax_error(). |
| 1189 | 1190 | */ |
| 1190 | 1191 | void fileedit_ajax_preview(){ |
| 1191 | | - const char * zFilename = PD("file",P("name")); |
| 1192 | + const char * zFilename = PD("filename",P("name")); |
| 1192 | 1193 | const char * zContent = P("content"); |
| 1193 | 1194 | int renderMode = atoi(PD("render_mode","0")); |
| 1194 | 1195 | int ln = atoi(PD("ln","0")); |
| 1195 | 1196 | int iframeHeight = atoi(PD("iframe_height","40")); |
| 1196 | 1197 | Blob content = empty_blob; |
| | @@ -1209,13 +1210,13 @@ |
| 1209 | 1210 | /* |
| 1210 | 1211 | ** WEBPAGE: fileedit_diff |
| 1211 | 1212 | ** |
| 1212 | 1213 | ** Required query parameters: |
| 1213 | 1214 | ** |
| 1214 | | -** file=FILENAME |
| 1215 | +** filename=FILENAME |
| 1215 | 1216 | ** content=text |
| 1216 | | -** r=checkin version |
| 1217 | +** checkin=checkin version |
| 1217 | 1218 | ** |
| 1218 | 1219 | ** Optional parameters: |
| 1219 | 1220 | ** |
| 1220 | 1221 | ** sbs=integer (1=side-by-side or 0=unified, default=0) |
| 1221 | 1222 | ** |
| | @@ -1229,12 +1230,12 @@ |
| 1229 | 1230 | ** Reminder: we only need the filename to perform valdiation |
| 1230 | 1231 | ** against fileedit_is_editable(), else this route could be |
| 1231 | 1232 | ** abused to get diffs against content disallowed by the |
| 1232 | 1233 | ** whitelist. |
| 1233 | 1234 | */ |
| 1234 | | - const char * zFilename = PD("file",P("name")); |
| 1235 | | - const char * zRev = P("r"); |
| 1235 | + const char * zFilename = PD("filename",P("name")); |
| 1236 | + const char * zRev = P("checkin"); |
| 1236 | 1237 | const char * zContent = P("content"); |
| 1237 | 1238 | char * zRevUuid = 0; |
| 1238 | 1239 | int isSbs = atoi(PD("sbs","0")); |
| 1239 | 1240 | int vid, frid; |
| 1240 | 1241 | Blob content = empty_blob; |
| | @@ -1272,11 +1273,11 @@ |
| 1272 | 1273 | char * zFileUuid = 0; /* UUID of file content */ |
| 1273 | 1274 | const char * zFlag; /* generic flag */ |
| 1274 | 1275 | int rc = 0, vid = 0, frid = 0; /* result code, checkin/file rids */ |
| 1275 | 1276 | |
| 1276 | 1277 | #define fail(EXPR) blob_appendf EXPR; goto end_fail |
| 1277 | | - zFlag = PD("file",P("name")); |
| 1278 | + zFlag = PD("filename",P("name")); |
| 1278 | 1279 | if(zFlag==0 || !*zFlag){ |
| 1279 | 1280 | rc = 400; |
| 1280 | 1281 | fail((pErr,"Missing required 'file' parameter.")); |
| 1281 | 1282 | } |
| 1282 | 1283 | p->zFilename = mprintf("%s",zFlag); |
| | @@ -1287,11 +1288,11 @@ |
| 1287 | 1288 | "by the [fileedit-glob] repository " |
| 1288 | 1289 | "setting.", |
| 1289 | 1290 | p->zFilename)); |
| 1290 | 1291 | } |
| 1291 | 1292 | |
| 1292 | | - zFlag = P("r"); |
| 1293 | + zFlag = P("checkin"); |
| 1293 | 1294 | if(!zFlag){ |
| 1294 | 1295 | rc = 400; |
| 1295 | 1296 | fail((pErr,"Missing required 'r' parameter.")); |
| 1296 | 1297 | } |
| 1297 | 1298 | vid = symbolic_name_to_rid(zFlag, "ci"); |
| | @@ -1382,12 +1383,12 @@ |
| 1382 | 1383 | /* |
| 1383 | 1384 | ** WEBPAGE: fileedit_commit |
| 1384 | 1385 | ** |
| 1385 | 1386 | ** Required query parameters: |
| 1386 | 1387 | ** |
| 1387 | | -** file=FILENAME |
| 1388 | | -** r=Parent checkin UUID |
| 1388 | +** filename=FILENAME |
| 1389 | +** checkin=Parent checkin UUID |
| 1389 | 1390 | ** content=text |
| 1390 | 1391 | ** comment=text |
| 1391 | 1392 | ** |
| 1392 | 1393 | ** Optional query parameters: |
| 1393 | 1394 | ** |
| | @@ -1460,13 +1461,13 @@ |
| 1460 | 1461 | ** EXPERIMENTAL and subject to change and removal at any time. The goal |
| 1461 | 1462 | ** is to allow online edits of files. |
| 1462 | 1463 | ** |
| 1463 | 1464 | ** Query parameters: |
| 1464 | 1465 | ** |
| 1465 | | -** file=FILENAME Repo-relative path to the file. |
| 1466 | | -** r=VERSION Checkin version, using any unambiguous |
| 1467 | | -** supported symbolic version name. |
| 1466 | +** filename=FILENAME Repo-relative path to the file. |
| 1467 | +** checkin=VERSION Checkin version, using any unambiguous |
| 1468 | +** supported symbolic version name. |
| 1468 | 1469 | ** |
| 1469 | 1470 | ** All other parameters are for internal use only, submitted via the |
| 1470 | 1471 | ** form-submission process, and may change with any given revision of |
| 1471 | 1472 | ** this code. |
| 1472 | 1473 | */ |
| | @@ -1521,13 +1522,13 @@ |
| 1521 | 1522 | CX("<p>This page is <em>NEW AND EXPERIMENTAL</em>. " |
| 1522 | 1523 | "USE AT YOUR OWN RISK, preferably on a test " |
| 1523 | 1524 | "repo.</p>\n"); |
| 1524 | 1525 | |
| 1525 | 1526 | /******* Hidden fields *******/ |
| 1526 | | - CX("<input type='hidden' name='r' value='%s'>", |
| 1527 | + CX("<input type='hidden' name='checkin' value='%s'>", |
| 1527 | 1528 | cimi.zParentUuid); |
| 1528 | | - CX("<input type='hidden' name='file' value='%T'>", |
| 1529 | + CX("<input type='hidden' name='filename' value='%T'>", |
| 1529 | 1530 | zFilename); |
| 1530 | 1531 | |
| 1531 | 1532 | /* Status bar */ |
| 1532 | 1533 | CX("<div id='fossil-status-bar'>Async. status messages will go " |
| 1533 | 1534 | "here.</div>\n"/* will be moved into the tab container via JS */); |
| 1534 | 1535 | |