@@ -28,8 +28,16 @@
#include <assert.h>
#include "config.h"
#include "tagview.h"
+
+#if 1
+# define TAGVIEW_DEFAULT_FILTER "AND t.tagname NOT GLOB 'wiki-*' "
+#else
+# define TAGVIEW_DEFAULT_FILTER
+#endif
+
+
/**
tagview_strxform_f is a typedef for funcs with the following policy:
They accept a const string which they then transform into some other
@@ -60,9 +68,9 @@
const int offset = 10;
char shortname[offset+1];
shortname[offset] = '\0';
memcpy( shortname, uuid, offset );
- return mprintf( "<tt><a href='%s/vinfo/%s'><strong>%s</strong>%s</a></tt>",
+ return mprintf( "<tt><a href='%s/vinfo/%s'><span style='font-size:1.5em'>%s</span>%s</a></tt>",
g.zBaseURL, uuid, shortname, uuid+offset );
}
/** Returns a hyperlink to the given tag. */
@@ -187,22 +195,22 @@
}
else
{
limitstr = mprintf( "LIMIT %d", limit );
- @ <h2>%d(limit) most recent non-wiki tags:</h2>
+ @ <h2>%d(limit) most recent tags:</h2>
}
char * sql = mprintf(
"SELECT t.tagid, t.tagname, DATETIME(tx.mtime), b.uuid "
"FROM tag t, tagxref tx, blob b "
"WHERE (t.tagid=tx.tagid) and (tx.srcid=b.rid) "
"AND (tx.tagtype != 0) %s "
- "AND t.tagname NOT GLOB 'wiki-*' "
+ TAGVIEW_DEFAULT_FILTER
"ORDER BY tx.mtime DESC %s",
likeclause ? likeclause : " ",
limitstr ? limitstr : " "
);
- /* " AND t.tagname NOT GLOB 'wiki-*'" // Do we want this?? */
-
+ if( limitstr ) free(limitstr);
+ if( likeclause ) free(likeclause);
char const * const colnames[] = {
"Tag ID", "Name", "Timestamp", "Version"
};
tagview_strxform_f xf[] = {
@@ -245,9 +253,9 @@
char * sql = mprintf(
"SELECT DISTINCT (t.tagname), DATETIME(tx.mtime), b.uuid "
"FROM tag t, tagxref tx, blob b "
"WHERE (t.tagid=%d) AND (t.tagid=tx.tagid) AND (tx.srcid=b.rid) "
- "AND t.tagname NOT GLOB 'wiki-*' "
+ TAGVIEW_DEFAULT_FILTER
"ORDER BY tx.mtime DESC",
tagid);
char const * const colnames[] = {
"Tag Name", "Timestamp", "Version"
@@ -270,9 +278,9 @@
char * sql = mprintf(
"SELECT DISTINCT t.tagid, DATETIME(tx.mtime), b.uuid "
"FROM tag t, tagxref tx, blob b "
"WHERE (t.tagname='%q') AND (t.tagid=tx.tagid) AND (tx.srcid=b.rid) "
- "AND t.tagname NOT GLOB 'wiki-*' "
+ TAGVIEW_DEFAULT_FILTER
"ORDER BY tx.mtime DESC",
tagname);
char const * const colnames[] = {
"Tag ID", "Timestamp", "Version"
@@ -290,9 +298,8 @@
/*
** WEBPAGE: /tagview
*/
void tagview_page(void){
-
login_check_credentials();
if( !g.okRdWiki ){
login_needed();
}
@@ -317,4 +324,6 @@
tagview_page_default();
}
style_footer();
}
+
+#undef TAGVIEW_DEFAULT_FILTER