From: konrad Date: Sun, 9 Aug 2009 11:24:58 +0000 (+0000) Subject: some fixes X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f92dc174ea42827044ec8a5c7d8d3bf9695c4905;p=konrad%2Fsmoke.git some fixes git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@324 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/overview.cpp b/src/overview.cpp index 80e6d79..ea83dfb 100644 --- a/src/overview.cpp +++ b/src/overview.cpp @@ -382,7 +382,13 @@ MOverview::MOverview(QString pk) void MOverview::updateEvents() { - QListevl=req->queryGetAllEvents().getevents(); + QListevl; + try{ + evl=req->queryGetAllEvents().getevents(); + }catch(WException e){ + qDebug("Error getting all events (%s): %s",e.component().toAscii().data(),e.error().toAscii().data()); + return; + } eventmodel->clear(); eventmodel->insertColumns(0,6); eventmodel->setHorizontalHeaderLabels(QStringList()< - + + + + + + + + + + + + + + + + + + + + + + + @@ -102,7 +124,7 @@ - + diff --git a/woc/phpout.cpp b/woc/phpout.cpp index ec0ffbd..dd55d22 100644 --- a/woc/phpout.cpp +++ b/woc/phpout.cpp @@ -615,6 +615,9 @@ QString WocPHPServerOut::classMappings(const WocClass&cls) code+="\t$data[\""+map[j].second+"\"]=$table->"+map[j].first+";\n"; } code+="\treturn new WO"+cls.name()+"($data);\n}\n"; + code+="static public function fromTableArray"+k[i]+"(array $table){\n\t$ret=array();\n"; + code+="\tfor($i=0;$icapacity - $amt; } + + /**XML iface: get all events*/ + public static function getAllEvents($trans) + { + $evlst=WOEvent::fromTableArrayevent(WTevent::selectFromDB("")); + $trans->setevents($evlst); + } }; /**machine-function: get the requested events as XML data*/ diff --git a/www/inc/wbase/object.php b/www/inc/wbase/object.php index 154b388..946fb82 100644 --- a/www/inc/wbase/object.php +++ b/www/inc/wbase/object.php @@ -12,7 +12,7 @@ class WObject { protected $data; - protected __construct($d){$this->data=$d;} + protected function __construct($d){$this->data=$d;} };