Changeset 1282
- Timestamp:
- 03/19/10 08:04:03 (4 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
mainfunc.h (modified) (3 diffs)
-
tglossary.c (modified) (1 diff)
-
tglossaryfunc.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainfunc.h
r1126 r1282 921 921 unsigned uJobContainerIndex=0; 922 922 unsigned uTemplateLabelIndex=0; 923 unsigned uGlossaryLabelIndex=0; 923 924 924 925 printf("UpdateSchema(): Start\n"); … … 1002 1003 mysql_free_result(res); 1003 1004 1005 sprintf(gcQuery,"SHOW INDEX IN tGlossary"); 1006 mysql_query(&gMysql,gcQuery); 1007 if(mysql_errno(&gMysql)) 1008 printf("%s\n",mysql_error(&gMysql)); 1009 mysql_query(&gMysql,gcQuery); 1010 res=mysql_store_result(&gMysql); 1011 while((field=mysql_fetch_row(res))) 1012 { 1013 if(!strcmp(field[2],"cLabel")) uGlossaryLabelIndex=1; 1014 } 1015 mysql_free_result(res); 1016 1004 1017 if(uIncorrectVeth) 1005 1018 { … … 1172 1185 else 1173 1186 printf("Added INDEX cLabel tTemplate\n"); 1187 } 1188 1189 if(!uGlossaryLabelIndex) 1190 { 1191 sprintf(gcQuery,"ALTER TABLE tGlossary ADD INDEX (cLabel)"); 1192 mysql_query(&gMysql,gcQuery); 1193 if(mysql_errno(&gMysql)) 1194 printf("%s\n",mysql_error(&gMysql)); 1195 else 1196 printf("Added INDEX cLabel tGlossary\n"); 1174 1197 } 1175 1198 -
trunk/tglossary.c
r166 r1282 557 557 void CreatetGlossary(void) 558 558 { 559 sprintf(gcQuery,"CREATE TABLE IF NOT EXISTS tGlossary ( uGlossary INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, cLabel VARCHAR(32) NOT NULL DEFAULT '', uOwner INT UNSIGNED NOT NULL DEFAULT 0,index(uOwner), uCreatedBy INT UNSIGNED NOT NULL DEFAULT 0, uCreatedDate INT UNSIGNED NOT NULL DEFAULT 0, uModBy INT UNSIGNED NOT NULL DEFAULT 0, uModDate INT UNSIGNED NOT NULL DEFAULT 0, cText TEXT NOT NULL DEFAULT '' )");559 sprintf(gcQuery,"CREATE TABLE IF NOT EXISTS tGlossary ( uGlossary INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, cLabel VARCHAR(32) NOT NULL DEFAULT '',INDEX (cLabel), uOwner INT UNSIGNED NOT NULL DEFAULT 0,INDEX (uOwner), uCreatedBy INT UNSIGNED NOT NULL DEFAULT 0, uCreatedDate INT UNSIGNED NOT NULL DEFAULT 0, uModBy INT UNSIGNED NOT NULL DEFAULT 0, uModDate INT UNSIGNED NOT NULL DEFAULT 0, cText TEXT NOT NULL DEFAULT '' )"); 560 560 MYSQL_RUN; 561 561 -
trunk/tglossaryfunc.h
r1280 r1282 285 285 printf("<a class=darkLink href=unxsVZ.cgi?gcFunction=tGlossary&uGlossary=%s>%s</a>", 286 286 field[0],field[1]); 287 printf(" <a class=darkLink href=# onClick=\"open_popup('?gcFunction=Glossary&cLabel=%s')\">"288 " Popup</a><br>",field[1]);287 printf(" (<a class=darkLink href=# onClick=\"open_popup('?gcFunction=Glossary&cLabel=%s')\">" 288 "preview</a>)<br>",field[1]); 289 289 } 290 290 }
