Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add "fco" query parameter and the "Simplified"/"Full" submenu items to control it on the "finfo" web page. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f1fae7f9eab303dd43e77f1840aa0285 |
| User & Date: | drh 2012-09-05 11:33:29.977 |
Context
|
2012-09-05
| ||
| 14:10 | Make the new "simplified" finfo page the default. The original finfo is available using the "Full" submenu option. check-in: 1574b63b14 user: drh tags: trunk | |
| 13:45 | merge trunk, fix compilation on Cygwin/Linux check-in: c05ba6b0d7 user: jan.nijtmans tags: eclipse-project | |
| 11:33 | Add "fco" query parameter and the "Simplified"/"Full" submenu items to control it on the "finfo" web page. check-in: f1fae7f9ea user: drh tags: trunk | |
|
2012-09-04
| ||
| 23:13 | Be smarter about distinguishing between hyperlinks and array subscripts in code when rendering wiki. check-in: b7abba6707 user: drh tags: trunk | |
Changes
Changes to src/finfo.c.
| ︙ | ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
const char *zFilename;
char zPrevDate[20];
const char *zA;
const char *zB;
int n;
Blob title;
Blob sql;
GraphContext *pGraph;
int brBg = P("brbg")!=0;
int uBg = P("ubg")!=0;
login_check_credentials();
if( !g.perm.Read ){ login_needed(); return; }
style_header("File History");
login_anonymous_available();
zPrevDate[0] = 0;
zFilename = PD("name","");
blob_zero(&sql);
blob_appendf(&sql,
"SELECT"
" datetime(event.mtime,'localtime')," /* Date of change */
" coalesce(event.ecomment, event.comment)," /* Check-in comment */
" coalesce(event.euser, event.user)," /* User who made chng */
" mlink.pid," /* Parent rid */
" mlink.fid," /* File rid */
" (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
" (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
" (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
" event.bgcolor," /* Background color */
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
| > > > > > > > | > > > > > > < > > > > > > > > > > > > > | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
const char *zFilename;
char zPrevDate[20];
const char *zA;
const char *zB;
int n;
Blob title;
Blob sql;
HQuery url;
GraphContext *pGraph;
int brBg = P("brbg")!=0;
int uBg = P("ubg")!=0;
int firstChngOnly = P("fco")!=0;
login_check_credentials();
if( !g.perm.Read ){ login_needed(); return; }
style_header("File History");
login_anonymous_available();
url_initialize(&url, "finfo");
if( brBg ) url_add_parameter(&url, "brbg", 0);
if( uBg ) url_add_parameter(&url, "ubg", 0);
if( firstChngOnly ) url_add_parameter(&url, "fco", 0);
zPrevDate[0] = 0;
zFilename = PD("name","");
url_add_parameter(&url, "name", zFilename);
blob_zero(&sql);
blob_appendf(&sql,
"SELECT"
" datetime(event.mtime,'localtime')," /* Date of change */
" coalesce(event.ecomment, event.comment)," /* Check-in comment */
" coalesce(event.euser, event.user)," /* User who made chng */
" mlink.pid," /* Parent rid */
" mlink.fid," /* File rid */
" (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
" (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
" (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
" event.bgcolor," /* Background color */
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
" AND tagxref.rid=mlink.mid)", /* Tags */
TAG_BRANCH
);
if( firstChngOnly ){
blob_appendf(&sql, ", min(event.mtime)");
}
blob_appendf(&sql,
" FROM mlink, event"
" WHERE mlink.fnid IN (SELECT fnid FROM filename WHERE name=%Q %s)"
" AND event.objid=mlink.mid",
zFilename, filename_collation()
);
if( (zA = P("a"))!=0 ){
blob_appendf(&sql, " AND event.mtime>=julianday('%q')", zA);
url_add_parameter(&url, "a", zA);
}
if( (zB = P("b"))!=0 ){
blob_appendf(&sql, " AND event.mtime<=julianday('%q')", zB);
url_add_parameter(&url, "b", zB);
}
if( firstChngOnly ){
blob_appendf(&sql, " GROUP BY mlink.fid");
}
blob_appendf(&sql," ORDER BY event.mtime DESC /*sort*/");
if( (n = atoi(PD("n","0")))>0 ){
blob_appendf(&sql, " LIMIT %d", n);
url_add_parameter(&url, "n", P("n"));
}
if( firstChngOnly ){
style_submenu_element("Full", "Show all changes",
url_render(&url, "fco", 0, 0, 0));
}else{
style_submenu_element("Simplified", "Show only first use of a change",
url_render(&url, "fco", "1", 0, 0));
}
db_prepare(&q, blob_str(&sql));
blob_reset(&sql);
blob_zero(&title);
blob_appendf(&title, "History of ");
hyperlinked_path(zFilename, &title, 0);
@ <h2>%b(&title)</h2>
|
| ︙ | ︙ |