Commit 559601df authored by Penny Leach's avatar Penny Leach
Browse files

renamed event to event_type

parent 94c9128c
......@@ -29,7 +29,7 @@
<INDEX NAME="usernameuk" UNIQUE="true" FIELDS="LOWER(username)"/>
</INDEXES>
</TABLE>
<TABLE NAME="event">
<TABLE NAME="event_type">
<FIELDS>
<FIELD NAME="name" TYPE="char" LENGTH="50" NOTNULL="true" />
</FIELDS>
......@@ -101,7 +101,7 @@
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
<KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="auth_installed" REFFIELDS="name" />
<KEY NAME="eventfk" TYPE="foreign" FIELDS="event" REFTABLE="event" REFFIELDS="name" />
<KEY NAME="eventfk" TYPE="foreign" FIELDS="event" REFTABLE="event_type" REFFIELDS="name" />
<KEY NAME="subscruk" TYPE="unique" FIELDS="plugin,event,callfunction" />
</KEYS>
</TABLE>
......@@ -186,7 +186,7 @@
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
<KEY NAME="pluginfk" TYPE="foreign" FIELDS="plugin" REFTABLE="artefact_installed" REFFIELDS="name" />
<KEY NAME="eventfk" TYPE="foreign" FIELDS="event" REFTABLE="event" REFFIELDS="name" />
<KEY NAME="eventfk" TYPE="foreign" FIELDS="event" REFTABLE="event_type" REFFIELDS="name" />
<KEY NAME="subscruk" TYPE="unique" FIELDS="plugin,event,callfunction" />
</KEYS>
</TABLE>
......@@ -202,7 +202,7 @@
<SENTENCE TEXT="(username, password, password_change) VALUES ('root', 'mahara', 1)"/>
</SENTENCES>
</STATEMENT>
<STATEMENT NAME="insert events" TYPE="insert" TABLE="event">
<STATEMENT NAME="insert events" TYPE="insert" TABLE="event_type">
<SENTENCES>
<SENTENCE TEXT="(name) VALUES ('createuser')" />
<SENTENCE TEXT="(name) VALUES ('updateuser')" />
......
......@@ -543,7 +543,7 @@ function redirect($location) {
}
function handle_event($event) {
if (!$e = get_record('event','name',$event)) {
if (!$e = get_record('event_type','name',$event)) {
throw new Exception("Invalid event");
}
$plugintypes = plugin_types();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment