| | @@ -31,10 +31,11 @@ |
| 31 | 31 | int isValid; /* True if zRepoName is a valid Fossil repository */ |
| 32 | 32 | int isRepolistSkin; /* 1 or 2 if this repository wants to be the skin |
| 33 | 33 | ** for the repository list. 2 means do use this |
| 34 | 34 | ** repository but do not display it in the list. */ |
| 35 | 35 | char *zProjName; /* Project Name. Memory from fossil_malloc() */ |
| 36 | + char *zProjDesc; /* Project Description. Memory from fossil_malloc() */ |
| 36 | 37 | char *zLoginGroup; /* Name of login group, or NULL. Malloced() */ |
| 37 | 38 | double rMTime; /* Last update. Julian day number */ |
| 38 | 39 | }; |
| 39 | 40 | #endif |
| 40 | 41 | |
| | @@ -49,10 +50,11 @@ |
| 49 | 50 | int rc; |
| 50 | 51 | |
| 51 | 52 | pRepo->isRepolistSkin = 0; |
| 52 | 53 | pRepo->isValid = 0; |
| 53 | 54 | pRepo->zProjName = 0; |
| 55 | + pRepo->zProjDesc = 0; |
| 54 | 56 | pRepo->zLoginGroup = 0; |
| 55 | 57 | pRepo->rMTime = 0.0; |
| 56 | 58 | |
| 57 | 59 | g.dbIgnoreErrors++; |
| 58 | 60 | rc = sqlite3_open_v2(pRepo->zRepoName, &db, SQLITE_OPEN_READWRITE, 0); |
| | @@ -71,10 +73,19 @@ |
| 71 | 73 | -1, &pStmt, 0); |
| 72 | 74 | if( rc ) goto finish_repo_list; |
| 73 | 75 | if( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 74 | 76 | pRepo->zProjName = fossil_strdup((char*)sqlite3_column_text(pStmt,0)); |
| 75 | 77 | } |
| 78 | + sqlite3_finalize(pStmt); |
| 79 | + if( rc ) goto finish_repo_list; |
| 80 | + rc = sqlite3_prepare_v2(db, "SELECT value FROM config" |
| 81 | + " WHERE name='project-description'", |
| 82 | + -1, &pStmt, 0); |
| 83 | + if( rc ) goto finish_repo_list; |
| 84 | + if( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 85 | + pRepo->zProjDesc = fossil_strdup((char*)sqlite3_column_text(pStmt,0)); |
| 86 | + } |
| 76 | 87 | sqlite3_finalize(pStmt); |
| 77 | 88 | rc = sqlite3_prepare_v2(db, "SELECT value FROM config" |
| 78 | 89 | " WHERE name='login-group-name'", |
| 79 | 90 | -1, &pStmt, 0); |
| 80 | 91 | if( rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){ |
| | @@ -162,13 +173,14 @@ |
| 162 | 173 | }else{ |
| 163 | 174 | Stmt q; |
| 164 | 175 | double rNow; |
| 165 | 176 | blob_append_sql(&html, |
| 166 | 177 | "<table border='0' class='sortable' data-init-sort='1'" |
| 167 | | - " data-column-types='txtxkxt'><thead>\n" |
| 178 | + " data-column-types='txtxtxkxt'><thead>\n" |
| 168 | 179 | "<tr><th>Filename<th width='20'>" |
| 169 | 180 | "<th>Project Name<th width='20'>" |
| 181 | + "<th>Project Description<th width='20'>" |
| 170 | 182 | "<th>Last Modified<th width='20'>" |
| 171 | 183 | "<th>Login Group</tr>\n" |
| 172 | 184 | "</thead><tbody>\n"); |
| 173 | 185 | db_prepare(&q, "SELECT pathname" |
| 174 | 186 | " FROM sfile ORDER BY pathname COLLATE nocase;"); |
| | @@ -278,10 +290,16 @@ |
| 278 | 290 | zUrl, zName); |
| 279 | 291 | } |
| 280 | 292 | if( x.zProjName ){ |
| 281 | 293 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); |
| 282 | 294 | fossil_free(x.zProjName); |
| 295 | + }else{ |
| 296 | + blob_append_sql(&html, "<td></td><td></td>\n"); |
| 297 | + } |
| 298 | + if( x.zProjDesc ){ |
| 299 | + blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjDesc); |
| 300 | + fossil_free(x.zProjDesc); |
| 283 | 301 | }else{ |
| 284 | 302 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 285 | 303 | } |
| 286 | 304 | blob_append_sql(&html, |
| 287 | 305 | "<td></td><td data-sortkey='%08x'>%h</td>\n", |
| 288 | 306 | |