Fossil

Check-in [995e184c]
Login

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

Overview
Comment:Fix a bug in the skin edit pages that can result in an infinite loop.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 995e184cc14fa435f125237ff977f54c5ec740823b0875a91375d494ca259d90
User & Date: drh 2018-11-13 16:14:40.559
Context
2018-11-13
16:20
Update the built-in SQLite to the latest 3.26.0 beta. This is beta-testing for SQLite. ... (check-in: d3f454fa user: drh tags: trunk)
16:14
Fix a bug in the skin edit pages that can result in an infinite loop. ... (check-in: 995e184c user: drh tags: trunk)
2018-11-10
14:17
Do not run backoffice if the "--in" option is used on the "fossil http" command. ... (check-in: afb1e5f6 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/skins.c.
674
675
676
677
678
679
680
681

682
683
684
685

686
687
688
689
690
691
692
static const char *skin_file_content(const char *zLabel, const char *zFile){
  const char *zResult;
  if( fossil_strcmp(zLabel, "current")==0 ){
    zResult = db_get(zFile, "");
  }else if( sqlite3_strglob("draft[1-9]", zLabel)==0 ){
    zResult = db_get_mprintf("", "%s-%s", zLabel, zFile);
  }else{
    while( 1 ){

      char *zKey = mprintf("skins/%s/%s.txt", zLabel, zFile);
      zResult = builtin_text(zKey);
      fossil_free(zKey);
      if( zResult!=0 || fossil_strcmp(zLabel,"default")==0 ) break;

    }
  }
  return zResult;
}


/*







|
>



|
>







674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
static const char *skin_file_content(const char *zLabel, const char *zFile){
  const char *zResult;
  if( fossil_strcmp(zLabel, "current")==0 ){
    zResult = db_get(zFile, "");
  }else if( sqlite3_strglob("draft[1-9]", zLabel)==0 ){
    zResult = db_get_mprintf("", "%s-%s", zLabel, zFile);
  }else{
    int i;
    for(i=0; i<2; i++){
      char *zKey = mprintf("skins/%s/%s.txt", zLabel, zFile);
      zResult = builtin_text(zKey);
      fossil_free(zKey);
      if( zResult!=0 ) break;
      zLabel = "default";
    }
  }
  return zResult;
}


/*