3 |
// $Id$ |
// $Id$ |
4 |
// ------------------------------------------------------------------ |
// ------------------------------------------------------------------ |
5 |
// $Log$ |
// $Log$ |
6 |
|
// Revision 1.7 2003/05/13 09:40:34 joko |
7 |
|
// check for error... |
8 |
|
// |
9 |
// Revision 1.6 2003/02/09 17:33:54 joko |
// Revision 1.6 2003/02/09 17:33:54 joko |
10 |
// + minor update related to new log level constants |
// + minor update related to new log level constants |
11 |
// |
// |
164 |
} |
} |
165 |
|
|
166 |
function _loadStructure_FromDb() { |
function _loadStructure_FromDb() { |
167 |
//global $site; |
$this->site->log( get_class($this) . "->_loadStructure_FromDb: Loading language information (l10n) for '$this->langkey'.", PEAR_LOG_DEBUG); |
|
$this->site->log( get_class($this) . "->_loadStructure_FromDb loading language information", PEAR_LOG_DEBUG); |
|
|
//print "- loading structure from db ($this->langkey)<br>"; |
|
|
//connectdb(); |
|
168 |
$sql = "SELECT * FROM td_res_langtext WHERE countrykey='" . $this->langkey . "'"; |
$sql = "SELECT * FROM td_res_langtext WHERE countrykey='" . $this->langkey . "'"; |
169 |
if ($result = $this->site->db->query($sql)) { |
if ($result = $this->site->db->query($sql)) { |
170 |
|
|
171 |
|
// pre-flight check: Is $result an object of class "db_error"? |
172 |
|
if (get_class($result) == 'db_error') { |
173 |
|
// FIXME: How to handle this here??? |
174 |
|
//print "Sorry.<br/>"; |
175 |
|
$this->site->log( get_class($this) . "->_loadStructure_FromDb: Error while issuing '$sql'.", PEAR_LOG_ERR); |
176 |
|
return; |
177 |
|
} |
178 |
|
|
179 |
//while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { |
//while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { |
180 |
|
//print Dumper($result); |
181 |
while ( $result->fetchInto($row) ) { |
while ( $result->fetchInto($row) ) { |
182 |
//print $row[tval]."<br>"; |
//print $row[tval]."<br>"; |
183 |
//print_r($row) . "<br>"; |
//print_r($row) . "<br>"; |