<!-- configure output -->
<QtClientOutput sourceDir="src" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes"/>
- <PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" clean="yes">
- <Authenticator
- isAuthenticated="Session::instance()->isAuthenticated()"
- hasRole="Session::instance()->canExecute(%)"
- userName="Session::currentUserName()"
- init="new Session($this)"/>
+ <PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" clean="yes" transactionBase="MSmokeTransaction">
</PHPServerOutput>
<HtmlOutput sourceDir="doc" subDir="wob" clean="yes"/>
$AUTOCLASS["WORoom"]="inc/wext/room.php";
$AUTOCLASS["WOTemplate"]="inc/wext/template.php";
$AUTOCLASS["WOTicket"]="inc/wext/ticket.php";
+
+$AUTOCLASS["MSmokeTransaction"]="inc/wext/transaction.php";
?>
\ No newline at end of file
--- /dev/null
+<?php
+// +----------------------------------------------------------------------
+// | PHP Source
+// +----------------------------------------------------------------------
+// | Copyright (C) 2010 by Konrad Rosenbaum <konrad@silmor.de>
+// +----------------------------------------------------------------------
+// |
+// | Copyright: See COPYING file that comes with this distribution
+// +----------------------------------------------------------------------
+//
+
+class MSmokeTransaction extends WobTransaction
+{
+ public function __construct()
+ {
+ //make sure we have a session
+ new Session($this);
+ }
+
+ protected function startTransaction()
+ {
+ global $db;
+ $db->beginTransaction();
+ }
+ protected function commitTransaction()
+ {
+ global $db;
+ $db->commitTransaction();
+ }
+ protected function abortTransaction()
+ {
+ global $db;
+ $db->rollbackTransaction();
+ }
+
+ protected function isAuthenticated()
+ {
+ return Session::instance()->isAuthenticated();
+ }
+
+ protected function isAuthorized($tn)
+ {
+ return Session::instance()->isAuthenticated() && Session::instance()->canExecute($tn);
+ }
+
+ protected function userName()
+ {
+ return Session::currentUserName();
+ }
+};
+
+?>