Fossil

Check-in [4165033b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove the extra space character before filenames in web directory listings. Ticket [28d861eb5799a60]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4165033b4030ce9dc3dd4a71ed0acc870a32fb13
User & Date: drh 2009-10-31 13:23:28
References
2009-10-31
13:24 Fixed ticket [28d861eb]: File listing has extra space before file name plus 2 other changes artifact: 05ac8c30 user: drh
Context
2009-10-31
13:50
Fix the "Behavior" setup page so that it has the correct default values for unspecified attributes. Ticket [0101a97fefd5ca91d] check-in: 671e7c34 user: drh tags: trunk
13:23
Remove the extra space character before filenames in web directory listings. Ticket [28d861eb5799a60] check-in: 4165033b user: drh tags: trunk
13:11
Make use of the is_a_version() function to check for valid version IDs in the checkout command. Ticket [2de4ae605844fe3f]. check-in: 999b1779 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/browse.c.

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
  cnt = db_int(0, "SELECT count(*) FROM localfiles");
  nCol = 4;
  nRow = (cnt+nCol-1)/nCol;
  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x");
  @ <table border="0" width="100%%"><tr><td valign="top" width="25%%">
  i = 0;
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFName;
    if( i==nRow ){
      @ </td><td valign="top" width="25%%">
      i = 0;
    }
    i++;
    zFName = db_column_text(&q, 0);
    if( zFName[0]=='/' ){
      zFName++;
      @ <li><a href="%s(zSubdirLink)%T(zFName)">
      @     %h(zFName)/</a></li>
    }else if( zCI ){
      const char *zUuid = db_column_text(&q, 1);
      @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFName)</a>
    }else{
      @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFName)">
      @     %h(zFName)</a></li>
    }
  }
  db_finalize(&q);
  @ </td></tr></table>
  style_footer();
}







|





|
|
|
|
<


|

|
<






211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

228
229
230
231
232

233
234
235
236
237
238
  cnt = db_int(0, "SELECT count(*) FROM localfiles");
  nCol = 4;
  nRow = (cnt+nCol-1)/nCol;
  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x");
  @ <table border="0" width="100%%"><tr><td valign="top" width="25%%">
  i = 0;
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFN;
    if( i==nRow ){
      @ </td><td valign="top" width="25%%">
      i = 0;
    }
    i++;
    zFN = db_column_text(&q, 0);
    if( zFN[0]=='/' ){
      zFN++;
      @ <li><a href="%s(zSubdirLink)%T(zFN)">%h(zFN)/</a></li>

    }else if( zCI ){
      const char *zUuid = db_column_text(&q, 1);
      @ <li><a href="%s(g.zBaseURL)/artifact?name=%s(zUuid)">%h(zFN)</a>
    }else{
      @ <li><a href="%s(g.zBaseURL)/finfo?name=%T(zPrefix)%T(zFN)">%h(zFN)</a>

    }
  }
  db_finalize(&q);
  @ </td></tr></table>
  style_footer();
}