Check-in [07f6780c98]
Not logged in
Overview

SHA1 Hash:07f6780c981a2a69fadac09d51dff77c7d11ec43
Date: 2009-08-16 21:34:30
User: drh
Comment:Remove unsupported and incomplete webpage functionality: The admin_sql page and the "my" page.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Deleted src/admin.c version [0490103754]

Modified src/db.c from [e7592f21b5] to [63926039f3].

@@ -1513,169 +1513,6 @@
       print_setting(azName[i]);
     }
   }else{
     usage("?PROPERTY? ?VALUE?");
   }
-}
-
-/*
-** SQL function to render a UUID as a hyperlink to a page describing
-** that UUID.
-*/
-static void hyperlinkUuidFunc(
-  sqlite3_context *pCxt,     /* function context */
-  int argc,                  /* number of arguments to the function */
-  sqlite3_value **argv       /* values of all function arguments */
-){
-  const char *zUuid;         /* The UUID to render */
-  char *z;                   /* Rendered HTML text */
-
-  zUuid = (const char*)sqlite3_value_text(argv[0]);
-  if( g.okHistory && zUuid && strlen(zUuid)>=10 ){
-    z = mprintf("<tt><a href='%s/info/%t'><span style='font-size:1.5em'>"
-                "%#h</span>%h</a></tt>",
-                g.zBaseURL, zUuid, 10, zUuid, &zUuid[10]);
-    sqlite3_result_text(pCxt, z, -1, free);
-  }else{
-    sqlite3_result_text(pCxt, zUuid, -1, SQLITE_TRANSIENT);
-  }
-}
-
-/*
-** SQL function to render a TAGID as a hyperlink to a page describing
-** that tag.
-*/
-static void hyperlinkTagidFunc(
-  sqlite3_context *pCxt,     /* function context */
-  int argc,                  /* number of arguments to the function */
-  sqlite3_value **argv       /* values of all function arguments */
-){
-  int tagid;                 /* The tagid to render */
-  char *z;                   /* rendered html text */
-
-  tagid = sqlite3_value_int(argv[0]);
-  if( g.okHistory ){
-    z = mprintf("<a href='%s/tagview?tagid=%d'>%d</a>",
-                  g.zBaseURL, tagid, tagid);
-  }else{
-    z = mprintf("%d", tagid);
-  }
-  sqlite3_result_text(pCxt, z, -1, free);
-}
-
-/*
-** SQL function to render a TAGNAME as a hyperlink to a page describing
-** that tag.
-*/
-static void hyperlinkTagnameFunc(
-  sqlite3_context *pCxt,     /* function context */
-  int argc,                  /* number of arguments to the function */
-  sqlite3_value **argv       /* values of all function arguments */
-){
-  const char *zTag;          /* The tag to render */
-  char *z;                   /* rendered html text */
-
-  zTag = (const char*)sqlite3_value_text(argv[0]);
-  if( g.okHistory ){
-    z = mprintf("<a href='%s/tagview?name=%T&raw=y'>%h</a>",
-                  g.zBaseURL, zTag, zTag);
-  }else{
-    z = mprintf("%h", zTag);
-  }
-  sqlite3_result_text(pCxt, z, -1, free);
-}
-
-/*
-** SQL function to escape all characters in a string that have special
-** meaning to HTML.
-*/
-static void htmlizeFunc(
-  sqlite3_context *pCxt,     /* function context */
-  int argc,                  /* number of arguments to the function */
-  sqlite3_value **argv       /* values of all function arguments */
-){
-  const char *zText;         /* Text to be htmlized */
-  char *z;                   /* rendered html text */
-
-  zText = (const char*)sqlite3_value_text(argv[0]);
-  z = htmlize(zText, -1);
-  sqlite3_result_text(pCxt, z, -1, free);
-}
-
-/*
-** This routine is a helper to run an SQL query and table-ize the
-** results.
-**
-** The zSql parameter should be a single, complete SQL statement.
-** Tableized output of the SQL statement is rendered back to the client.
-**
-** The isSafe flag is true if all query results have been processed
-** by routines such as
-**
-**        linkuuid()
-**        linktagid()
-**        linktagname()
-**        htmlize()
-**
-** and are therefore safe for direct rendering.  If isSafe is false,
-** then all characters in the query result that have special meaning
-** to HTML are escaped.
-**
-** Returns SQLITE_OK on success and any other value on error.
-*/
-int db_generic_query_view(const char *zSql, int isSafe){
-  sqlite3_stmt *pStmt;
-  int rc;
-  int nCol, i;
-  int nRow;
-  const char *zRow;
-  static int once = 1;
-
-  /* Install the special functions on the first call to this routine */
-  if( once ){
-    once = 0;
-    sqlite3_create_function(g.db, "linkuuid", 1, SQLITE_UTF8, 0,
-                            hyperlinkUuidFunc, 0, 0);
-    sqlite3_create_function(g.db, "linktagid", 1, SQLITE_UTF8, 0,
-                            hyperlinkTagidFunc, 0, 0);
-    sqlite3_create_function(g.db, "linktagname", 1, SQLITE_UTF8, 0,
-                            hyperlinkTagnameFunc, 0, 0);
-    sqlite3_create_function(g.db, "htmlize", 1, SQLITE_UTF8, 0,
-                            htmlizeFunc, 0, 0);
-  }
-
-  /*
-  ** Use sqlite3_stmt directly rather than going through db_prepare(),
-  ** so that we can treat errors a non-fatal.
-  */
-  rc = sqlite3_prepare(g.db, zSql, -1, &pStmt, 0);
-  if( SQLITE_OK != rc ){
-    @ <span style='color:red'>db_generic_query_view() SQL error:
-    @ %h(sqlite3_errmsg(g.db))</span>
-    return rc;
-  }
-  nCol = sqlite3_column_count(pStmt);
-  @ <table class='fossil_db_generic_query_view'><tbody>
-  @ <tr class='header'>
-  for(i=0; i<nCol; ++i){
-    @ <td>%h(sqlite3_column_name(pStmt,i))</td>
-  }
-  @ </tr>
-
-  nRow = 0;
-  while( SQLITE_ROW==sqlite3_step(pStmt) ){
-    const char *azClass[] = { "even", "odd" };
-    @ <tr class='%s(azClass[(nRow++)&1])'>
-      for(i=0; i<nCol; i++){
-        zRow = (char const*)sqlite3_column_text(pStmt,i);
-        if( isSafe ){
-          @ <td>%s(zRow)</td>
-        }else{
-          @ <td>%h(zRow)</td>
-        }
-      }
-    @ </tr>
-  }
-  @ </tbody></table>
-  sqlite3_finalize(pStmt);
-  return SQLITE_OK;
 }

Modified src/login.c from [4d8ed5462e] to [97ffb4096e].

@@ -103,14 +103,20 @@
                   " AND length(pw)>0 AND length(cap)>0");
   return uid;
 }
 
 /*
-** WEBPAGE: /login
-** WEBPAGE: /logout
+** WEBPAGE: login
+** WEBPAGE: logout
+** WEBPAGE: my
+**
+** Generate the login page.
 **
-** Generate the login page
+** There used to be a page named "my" that was designed to show information
+** about a specific user.  The "my" page was linked from the "Logged in as USER"
+** line on the title bar.  The "my" page was never completed so it is now
+** removed.  Use this page as a placeholder in older installations.
 */
 void login_page(void){
   const char *zUsername, *zPasswd;
   const char *zNew1, *zNew2;
   const char *zAnonPw = 0;

Modified src/main.mk from [e981c4607d] to [eae24a1861].

@@ -12,11 +12,10 @@
 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
 
 
 SRC = \
   $(SRCDIR)/add.c \
-  $(SRCDIR)/admin.c \
   $(SRCDIR)/allrepo.c \
   $(SRCDIR)/bag.c \
   $(SRCDIR)/blob.c \
   $(SRCDIR)/branch.c \
   $(SRCDIR)/browse.c \
@@ -47,11 +46,10 @@
   $(SRCDIR)/main.c \
   $(SRCDIR)/manifest.c \
   $(SRCDIR)/md5.c \
   $(SRCDIR)/merge.c \
   $(SRCDIR)/merge3.c \
-  $(SRCDIR)/my_page.c \
   $(SRCDIR)/name.c \
   $(SRCDIR)/pivot.c \
   $(SRCDIR)/pqueue.c \
   $(SRCDIR)/printf.c \
   $(SRCDIR)/rebuild.c \
@@ -64,11 +62,10 @@
   $(SRCDIR)/shun.c \
   $(SRCDIR)/stat.c \
   $(SRCDIR)/style.c \
   $(SRCDIR)/sync.c \
   $(SRCDIR)/tag.c \
-  $(SRCDIR)/tagview.c \
   $(SRCDIR)/th_main.c \
   $(SRCDIR)/timeline.c \
   $(SRCDIR)/tkt.c \
   $(SRCDIR)/tktsetup.c \
   $(SRCDIR)/undo.c \
@@ -83,11 +80,10 @@
   $(SRCDIR)/xfer.c \
   $(SRCDIR)/zip.c
 
 TRANS_SRC = \
   add_.c \
-  admin_.c \
   allrepo_.c \
   bag_.c \
   blob_.c \
   branch_.c \
   browse_.c \
@@ -118,11 +114,10 @@
   main_.c \
   manifest_.c \
   md5_.c \
   merge_.c \
   merge3_.c \
-  my_page_.c \
   name_.c \
   pivot_.c \
   pqueue_.c \
   printf_.c \
   rebuild_.c \
@@ -135,11 +130,10 @@
   shun_.c \
   stat_.c \
   style_.c \
   sync_.c \
   tag_.c \
-  tagview_.c \
   th_main_.c \
   timeline_.c \
   tkt_.c \
   tktsetup_.c \
   undo_.c \
@@ -154,11 +148,10 @@
   xfer_.c \
   zip_.c
 
 OBJ = \
   add.o \
-  admin.o \
   allrepo.o \
   bag.o \
   blob.o \
   branch.o \
   browse.o \
@@ -189,11 +182,10 @@
   main.o \
   manifest.o \
   md5.o \
   merge.o \
   merge3.o \
-  my_page.o \
   name.o \
   pivot.o \
   pqueue.o \
   printf.o \
   rebuild.o \
@@ -206,11 +198,10 @@
   shun.o \
   stat.o \
   style.o \
   sync.o \
   tag.o \
-  tagview.o \
   th_main.o \
   timeline.o \
   tkt.o \
   tktsetup.o \
   undo.o \
@@ -264,16 +255,16 @@
 	# noop
 
 clean:
 	rm -f *.o *_.c $(APPNAME) VERSION.h
 	rm -f translate makeheaders mkindex page_index.h headers
-	rm -f add.h admin.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h my_page.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h tagview.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
+	rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h setup.h sha1.h shun.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
 
 page_index.h: $(TRANS_SRC) mkindex
 	./mkindex $(TRANS_SRC) >$@
 headers:	page_index.h makeheaders VERSION.h
-	./makeheaders  add_.c:add.h admin_.c:admin.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h my_page_.c:my_page.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tagview_.c:tagview.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
+	./makeheaders  add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
 	touch headers
 headers: Makefile
 Makefile:
 add_.c:	$(SRCDIR)/add.c translate
 	./translate $(SRCDIR)/add.c >add_.c
@@ -280,17 +271,10 @@
 
 add.o:	add_.c add.h  $(SRCDIR)/config.h
 	$(XTCC) -o add.o -c add_.c
 
 add.h:	headers
-admin_.c:	$(SRCDIR)/admin.c translate
-	./translate $(SRCDIR)/admin.c >admin_.c
-
-admin.o:	admin_.c admin.h  $(SRCDIR)/config.h
-	$(XTCC) -o admin.o -c admin_.c
-
-admin.h:	headers
 allrepo_.c:	$(SRCDIR)/allrepo.c translate
 	./translate $(SRCDIR)/allrepo.c >allrepo_.c
 
 allrepo.o:	allrepo_.c allrepo.h  $(SRCDIR)/config.h
 	$(XTCC) -o allrepo.o -c allrepo_.c
@@ -525,17 +509,10 @@
 
 merge3.o:	merge3_.c merge3.h  $(SRCDIR)/config.h
 	$(XTCC) -o merge3.o -c merge3_.c
 
 merge3.h:	headers
-my_page_.c:	$(SRCDIR)/my_page.c translate
-	./translate $(SRCDIR)/my_page.c >my_page_.c
-
-my_page.o:	my_page_.c my_page.h  $(SRCDIR)/config.h
-	$(XTCC) -o my_page.o -c my_page_.c
-
-my_page.h:	headers
 name_.c:	$(SRCDIR)/name.c translate
 	./translate $(SRCDIR)/name.c >name_.c
 
 name.o:	name_.c name.h  $(SRCDIR)/config.h
 	$(XTCC) -o name.o -c name_.c
@@ -644,17 +621,10 @@
 
 tag.o:	tag_.c tag.h  $(SRCDIR)/config.h
 	$(XTCC) -o tag.o -c tag_.c
 
 tag.h:	headers
-tagview_.c:	$(SRCDIR)/tagview.c translate
-	./translate $(SRCDIR)/tagview.c >tagview_.c
-
-tagview.o:	tagview_.c tagview.h  $(SRCDIR)/config.h
-	$(XTCC) -o tagview.o -c tagview_.c
-
-tagview.h:	headers
 th_main_.c:	$(SRCDIR)/th_main.c translate
 	./translate $(SRCDIR)/th_main.c >th_main_.c
 
 th_main.o:	th_main_.c th_main.h  $(SRCDIR)/config.h
 	$(XTCC) -o th_main.o -c th_main_.c

Modified src/makemake.tcl from [0218bc4c51] to [e1d07386b2].

@@ -6,11 +6,10 @@
 # Basenames of all source files that get preprocessed using
 # "translate" and "makeheaders"
 #
 set src {
   add
-  admin
   allrepo
   bag
   blob
   branch
   browse
@@ -41,11 +40,10 @@
   main
   manifest
   md5
   merge
   merge3
-  my_page
   name
   pivot
   pqueue
   printf
   rebuild
@@ -58,11 +56,10 @@
   shun
   stat
   style
   sync
   tag
-  tagview
   th_main
   timeline
   tkt
   tktsetup
   undo

Deleted src/my_page.c version [57fa8e406f]

Modified src/style.c from [d90354f0ea] to [4ab2cc74bf].

@@ -197,11 +197,11 @@
 @     <nobr>$<project_name></nobr>
 @   </div>
 @   <div class="title">$<title></div>
 @   <div class="status"><nobr><th1>
 @      if {[info exists login]} {
-@        html "Logged in as <a href='$baseurl/my'>$login</a>"
+@        puts "Logged in as $login"
 @      } else {
 @        puts "Not logged in"
 @      }
 @   </th1></nobr></div>
 @ </div>
@@ -391,31 +391,10 @@
 @ }
 @
 @ div.miniform {
 @     font-size: smaller;
 @     margin: 8px;
-@ }
-@
-@ table.fossil_db_generic_query_view {
-@   border-spacing: 0px;
-@   border: 1px solid black;
-@ }
-@ table.fossil_db_generic_query_view td {
-@   padding: 2px 1em 2px 1em;
-@ }
-@ table.fossil_db_generic_query_view tr {
-@ }
-@ table.fossil_db_generic_query_view tr.even {
-@   background: #ffffff;
-@ }
-@ table.fossil_db_generic_query_view tr.odd {
-@   background: #e5e5e5;
-@ }
-@ table.fossil_db_generic_query_view tr.header {
-@   background: #558195;
-@   font-size: 1.5em;
-@   color: #ffffff;
 @ }
 ;
 
 /*
 ** WEBPAGE: style.css

Deleted src/tagview.c version [c5f7f1444b]