Fossil

Diff
Login

Differences From Artifact [ef8114555a]:

To Artifact [a1105f6ba2]:


914
915
916
917
918
919
920

921
922
923
924
925
926
927
928
929
930
931
932
933
934
  Blob *pOut,                 /* Write the manifest here */
  int bVerbose                /* Non-zero for full information. */
){
#if defined(FOSSIL_ENABLE_TCL)
  int rc;
  const char *zRc;
#endif

  blob_zero(pOut);
  blob_appendf(pOut, "This is fossil version %s\n", get_version());
  if( !bVerbose ) return;
  blob_appendf(pOut, "Compiled on %s %s using %s (%d-bit)\n",
               __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
  blob_appendf(pOut, "SQLite %s %.30s\n", sqlite3_libversion(),
               sqlite3_sourceid());
  blob_appendf(pOut, "Schema version %s\n", AUX_SCHEMA_MAX);
#if defined(FOSSIL_ENABLE_MINIZ)
  blob_appendf(pOut, "miniz %s, loaded %s\n", MZ_VERSION, mz_version());
#else
  blob_appendf(pOut, "zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
#endif
#if defined(FOSSIL_ENABLE_SSL)







>





<
<







914
915
916
917
918
919
920
921
922
923
924
925
926


927
928
929
930
931
932
933
  Blob *pOut,                 /* Write the manifest here */
  int bVerbose                /* Non-zero for full information. */
){
#if defined(FOSSIL_ENABLE_TCL)
  int rc;
  const char *zRc;
#endif
  Stmt q;
  blob_zero(pOut);
  blob_appendf(pOut, "This is fossil version %s\n", get_version());
  if( !bVerbose ) return;
  blob_appendf(pOut, "Compiled on %s %s using %s (%d-bit)\n",
               __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);


  blob_appendf(pOut, "Schema version %s\n", AUX_SCHEMA_MAX);
#if defined(FOSSIL_ENABLE_MINIZ)
  blob_appendf(pOut, "miniz %s, loaded %s\n", MZ_VERSION, mz_version());
#else
  blob_appendf(pOut, "zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
#endif
#if defined(FOSSIL_ENABLE_SSL)
975
976
977
978
979
980
981










982
983
984
985
986
987
988
  blob_append(pOut, "DYNAMIC_BUILD\n", -1);
#else
  blob_append(pOut, "STATIC_BUILD\n", -1);
#endif
#if defined(USE_SEE)
  blob_append(pOut, "USE_SEE\n", -1);
#endif










}

/*
** This function returns the user-agent string for Fossil, for
** use in HTTP(S) requests.
*/
const char *get_user_agent(){







>
>
>
>
>
>
>
>
>
>







974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
  blob_append(pOut, "DYNAMIC_BUILD\n", -1);
#else
  blob_append(pOut, "STATIC_BUILD\n", -1);
#endif
#if defined(USE_SEE)
  blob_append(pOut, "USE_SEE\n", -1);
#endif
  blob_appendf(pOut, "SQLite %s %.30s\n", sqlite3_libversion(),
               sqlite3_sourceid());
  if( g.db==0 ) sqlite3_open(":memory:", &g.db);
  db_prepare(&q,
     "SELECT compile_options FROM pragma_compile_options"
     " WHERE compile_options NOT LIKE 'COMPILER=%%'");
  while( db_step(&q)==SQLITE_ROW ){
    blob_appendf(pOut, "SQLITE_%s\n", db_column_text(&q, 0));
  }
  db_finalize(&q);
}

/*
** This function returns the user-agent string for Fossil, for
** use in HTTP(S) requests.
*/
const char *get_user_agent(){
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052

1053
1054
1055
1056
1057
1058
1059
/*
** WEBPAGE: version
**
** Show the version information for Fossil.
**
** Query parameters:
**
**    verbose       Show all available details.
*/
void test_version_page(void){
  Blob versionInfo;
  const char *verboseFlag;

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  verboseFlag = P("verbose");
  style_header("Version Information");
  style_submenu_element("Stat", "stat");
  if( verboseFlag != 0 && !strcmp(verboseFlag, "2") ){
    Stmt loop;
    style_submenu_element("Fossil version", "version?verbose=1");
    blob_zero(&versionInfo);
    blob_appendf(&versionInfo, "SQLite %s %.30s\n",
                 sqlite3_libversion(), sqlite3_sourceid());
    db_prepare(&loop, "pragma compile_options;");
    while( db_step(&loop)==SQLITE_ROW ){
      blob_appendf(&versionInfo, "%s\n", db_column_text(&loop, 0));
    }
    db_finalize(&loop);

  }else{
    style_submenu_element("SQLite version", "version?verbose=2");
    get_version_blob(&versionInfo, verboseFlag != 0);
  }
  cgi_printf("<blockquote><pre>\n"
         "%h\n"
         "</pre></blockquote>\n",(blob_str(&versionInfo)));

  style_footer();
}


/*
** Set the g.zBaseURL value to the full URL for the toplevel of
** the fossil tree.  Set g.zTop to g.zBaseURL without the







|



|



|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
<
|
>







1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042














1043

1044

1045
1046
1047
1048
1049
1050
1051
1052
1053
/*
** WEBPAGE: version
**
** Show the version information for Fossil.
**
** Query parameters:
**
**    verbose       Show details
*/
void test_version_page(void){
  Blob versionInfo;
  int verboseFlag;

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  verboseFlag = atoi(PD("verbose","0"));
  style_header("Version Information");
  style_submenu_element("Stat", "stat");














  get_version_blob(&versionInfo, verboseFlag);

  @ <pre>

  @ %h(blob_str(&versionInfo))
  @ </pre>
  style_footer();
}


/*
** Set the g.zBaseURL value to the full URL for the toplevel of
** the fossil tree.  Set g.zTop to g.zBaseURL without the