| | @@ -964,14 +964,14 @@ |
| 964 | 964 | cgi_set_content(&tarball); |
| 965 | 965 | cgi_set_content_type("application/x-compressed"); |
| 966 | 966 | } |
| 967 | 967 | |
| 968 | 968 | /* |
| 969 | | -** This routine is called for each check-in on the /tarlist page to |
| 969 | +** This routine is called for each check-in on the /download page to |
| 970 | 970 | ** construct the "extra" information after the description. |
| 971 | 971 | */ |
| 972 | | -void tarlist_extra( |
| 972 | +void download_extra( |
| 973 | 973 | Stmt *pQuery, /* Current row of the timeline query */ |
| 974 | 974 | int tmFlags, /* Flags to www_print_timeline() */ |
| 975 | 975 | const char *zThisUser, /* Suppress links to this user */ |
| 976 | 976 | const char *zThisTag /* Suppress links to this tag */ |
| 977 | 977 | ){ |
| | @@ -1012,14 +1012,14 @@ |
| 1012 | 1012 | fossil_free(zNm); |
| 1013 | 1013 | } |
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | /* |
| 1017 | | -** SETTING: suggested-tarlist width=70 block-text |
| 1017 | +** SETTING: suggested-downloads width=70 block-text |
| 1018 | 1018 | ** |
| 1019 | 1019 | ** This setting controls the suggested tarball/ZIP downloads on the |
| 1020 | | -** [[/tarlist]] page. The value is a TCL list. Each pair of items |
| 1020 | +** [[/download]] page. The value is a TCL list. Each pair of items |
| 1021 | 1021 | ** defines a set of check-ins to be added to the suggestion list. |
| 1022 | 1022 | ** The first item of each pair is an integer count (N) and second |
| 1023 | 1023 | ** item is a tag GLOB pattern (PATTERN). For each pair, the most |
| 1024 | 1024 | ** recent N check-ins that have a tag matching PATTERN are added |
| 1025 | 1025 | ** to the list. The special pattern "OPEN-LEAF" matches any open |
| | @@ -1027,22 +1027,22 @@ |
| 1027 | 1027 | ** |
| 1028 | 1028 | ** Example: |
| 1029 | 1029 | ** |
| 1030 | 1030 | ** 3 OPEN-LEAF 3 release 1 trunk |
| 1031 | 1031 | ** |
| 1032 | | -** The value causes the /tarlist page to show the union of the 3 |
| 1032 | +** The value causes the /download page to show the union of the 3 |
| 1033 | 1033 | ** most recent open leaves, the three most recent check-ins marked |
| 1034 | 1034 | ** "release", and the single most recent trunk check-in. |
| 1035 | 1035 | */ |
| 1036 | 1036 | |
| 1037 | 1037 | /* |
| 1038 | | -** WEBPAGE: /tarlist |
| 1038 | +** WEBPAGE: /download |
| 1039 | 1039 | ** |
| 1040 | 1040 | ** Show a special no-graph timeline of recent important check-ins with |
| 1041 | 1041 | ** an opportunity to pull tarballs and ZIPs. |
| 1042 | 1042 | */ |
| 1043 | | -void tarlist_page(void){ |
| 1043 | +void download_page(void){ |
| 1044 | 1044 | Stmt q; /* The actual timeline query */ |
| 1045 | 1045 | const char *zTarlistCfg; /* Configuration string */ |
| 1046 | 1046 | char **azItem; /* Decomposed elements of zTarlistCfg */ |
| 1047 | 1047 | int *anItem; /* Bytes in each term of azItem[] */ |
| 1048 | 1048 | int nItem; /* Number of terms in azItem[] */ |
| | @@ -1050,16 +1050,15 @@ |
| 1050 | 1050 | int tmFlags; /* Timeline display flags */ |
| 1051 | 1051 | int n; /* Number of suggested downloads */ |
| 1052 | 1052 | |
| 1053 | 1053 | login_check_credentials(); |
| 1054 | 1054 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 1055 | | - robot_restrict("ziplink"); |
| 1056 | 1055 | |
| 1057 | 1056 | style_set_current_feature("timeline"); |
| 1058 | | - style_header("Suggested Tarballs And ZIP Archives"); |
| 1057 | + style_header("Suggested Downloads"); |
| 1059 | 1058 | |
| 1060 | | - zTarlistCfg = db_get("suggested-tarlist","off"); |
| 1059 | + zTarlistCfg = db_get("suggested-downloads","off"); |
| 1061 | 1060 | db_multi_exec( |
| 1062 | 1061 | "CREATE TEMP TABLE tarlist(rid INTEGER PRIMARY KEY);" |
| 1063 | 1062 | ); |
| 1064 | 1063 | if( !g.interp ) Th_FossilInit(0); |
| 1065 | 1064 | Th_SplitList(g.interp, zTarlistCfg, (int)strlen(zTarlistCfg), |
| | @@ -1105,21 +1104,39 @@ |
| 1105 | 1104 | |
| 1106 | 1105 | n = db_int(0, "SELECT count(*) FROM tarlist"); |
| 1107 | 1106 | if( n==0 ){ |
| 1108 | 1107 | @ <h2>No tarball/ZIP suggestions are available at this time</h2> |
| 1109 | 1108 | }else{ |
| 1110 | | - @ <h2>%d(n) Tarball/ZIP Download Suggestions:</h2> |
| 1109 | + @ <h2>%d(n) Tarball/ZIP Download Suggestion%s(n>1?"s":""):</h2> |
| 1111 | 1110 | db_prepare(&q, |
| 1112 | 1111 | "%s AND blob.rid IN tarlist ORDER BY event.mtime DESC", |
| 1113 | 1112 | timeline_query_for_www() |
| 1114 | 1113 | ); |
| 1115 | 1114 | |
| 1116 | 1115 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR |
| 1117 | 1116 | | TIMELINE_BRCOLOR; |
| 1118 | | - www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, tarlist_extra); |
| 1117 | + www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, download_extra); |
| 1119 | 1118 | db_finalize(&q); |
| 1120 | 1119 | } |
| 1120 | + if( g.perm.Clone ){ |
| 1121 | + const char *zNm = db_get("short-project-name","clone"); |
| 1122 | + @ <hr> |
| 1123 | + @ <h2>You Can Clone This Repository</h2> |
| 1124 | + @ <p>A clone gives you local access to all historical content. |
| 1125 | + @ Cloning is a bandwidth- and CPU-efficient alternative to extracting |
| 1126 | + @ multiple tarballs and ZIP archives for users who need access to many |
| 1127 | + @ different check-ins. |
| 1128 | + @ |
| 1129 | + @ <p>Clone this repository by running a command like the following: |
| 1130 | + @ <blockquote><pre> |
| 1131 | + @ fossil clone %s(g.zBaseURL) %h(zNm).fossil |
| 1132 | + @ </pre></blockquote> |
| 1133 | + @ <p>Do a web search for "fossil clone" or similar to find additional |
| 1134 | + @ information about using a cloned Fossil repository. Or ask your |
| 1135 | + @ favorite AI how to extract content from a Fossil clone. |
| 1136 | + } |
| 1137 | + |
| 1121 | 1138 | style_finish_page(); |
| 1122 | 1139 | } |
| 1123 | 1140 | |
| 1124 | 1141 | /* |
| 1125 | 1142 | ** WEBPAGE: rchvdwnld |
| | @@ -1140,11 +1157,11 @@ |
| 1140 | 1157 | int nUuid; |
| 1141 | 1158 | int rid; |
| 1142 | 1159 | login_check_credentials(); |
| 1143 | 1160 | if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; } |
| 1144 | 1161 | robot_restrict("zip"); |
| 1145 | | - robot_restrict("ziplink"); |
| 1162 | + robot_restrict("download"); |
| 1146 | 1163 | |
| 1147 | 1164 | zUuid = P("name"); |
| 1148 | 1165 | if( zUuid==0 |
| 1149 | 1166 | || (nUuid = (int)strlen(zUuid))<6 |
| 1150 | 1167 | || !validate16(zUuid,-1) |
| 1151 | 1168 | |