{"issue":{"state":"open","created_at":"2011-11-28T17:34:23Z","updated_at":"2011-11-28T17:34:30Z","user":{"gravatar_id":"7ca7554b516e2f5476d823cc2eca706a","id":734684,"url":"https://api.github.com/users/LeoUnglaub","avatar_url":"https://secure.gravatar.com/avatar/7ca7554b516e2f5476d823cc2eca706a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"LeoUnglaub"},"comments":6,"body":"Hallo Leo,\nich muss leider folgenden Bug reporten. Es wurde eigentlich alles schon in diesem Thread besprochen: http://www.typolight-community.de/showthread.php?t=776\n\nHier aber noch mal die Zusammenfassung des Problems. Wenn ich mit setDatabase() die Datenbank wechsele funktionieren alle Methoden mit der neuen DB bis auf listTables(). Diese Methode liefert trotz DB-Change die Tabellen der TL-Datenbank.\n\nSprich: Folgender Code funktioniert nicht:\n\n```\n// Import der DB\n$this->import('Database');\n\n$this->Database->setDatabase('andere_db');\n$tabellen = $this->Database->listTables();\n\nforeach ($tabellen as $tabelle) {\n\techo $tabelle;\n\techo \"<br/>\\n\";\n}\n\n//Zurücksetzen auf die TL-Datenbank, da ansonsten Fehlermeldung\n$this->Database->setDatabase('tl_db');  \n```\n\nEs wird trotzdem folgendes Ausgegeben:\n\n```\ntl_article\ntl_calendar\ntl_calendar_events\ntl_comments\ntl_content\ntl_extension\ntl_faq\ntl_faq_category\ntl_flash\ntl_form\ntl_form_field\ntl_glossary\ntl_glossary_term\ntl_layout\ntl_log\ntl_member\ntl_member_group\ntl_module\ntl_news\ntl_news_archive\ntl_news_comments\ntl_newsletter\ntl_newsletter_channel\ntl_newsletter_recipients\ntl_page\ntl_repository_installs\ntl_repository_instfiles\ntl_search\ntl_search_index\ntl_session\ntl_style\ntl_style_sheet\ntl_task\ntl_task_status\ntl_undo\ntl_user\ntl_user_group\ntl_version\n```\n\nGelöst habe ich es temporär mit folgendem Code:\n\n```\n$showTables = $this->Database->prepare(\"show tables\")->execute();\nif ($showTables->numRows) {\n    $this->Template->tables = $showTables->fetchEach('Tables_in_DATANBANKNAME');\n} \n```\n\nVielen Dank für deine Mühe. Wenn du noch irgend was brauchst um dne Fehler nachzustellen stehe ich natürlich zur Verfügung.\nViele Grüße\nLeo Unglaub\n\n--- _Originally created on July 14th, 2009, at 03:17pm (ID 879)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"id":2370781,"number":879,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"Defect","color":"bd2c00","url":"https://api.github.com/repos/contao/test/labels/Defect"},{"name":"framework","color":"e6e6e6","url":"https://api.github.com/repos/contao/test/labels/framework"},{"name":"Invalid","color":"ffdd00","url":"https://api.github.com/repos/contao/test/labels/Invalid"}],"title":"listTables cached Datenbanknamen auch bei änderung","closed_at":null,"html_url":"https://github.com/contao/test/issues/879","url":"https://api.github.com/repos/contao/test/issues/879","milestone":{"state":"open","created_at":"2011-11-28T15:58:50Z","closed_issues":11,"due_on":null,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"number":13,"description":"TYPOlight 2.7.3 (maintenance release)","title":"2.7.3","open_issues":1,"url":"https://api.github.com/repos/contao/test/milestones/13"}},"action":"created","comment":{"created_at":"2011-11-28T17:34:30Z","updated_at":"2011-11-28T17:34:30Z","user":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"body":"--- _Originally closed on September 4th, 2009, at 04:36pm_","id":2903117,"url":"https://api.github.com/repos/contao/test/issues/comments/2903117"}}