[mythtv-commits] Ticket #11603: NoTrans causes by includes/defines.php after includes/database.php
MythTV
noreply at mythtv.org
Sat Jun 15 19:47:15 UTC 2013
#11603: NoTrans causes by includes/defines.php after includes/database.php
----------------------------------+------------------------
Reporter: pmhahn@… | Owner: kormoc
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: 0.26.1
Component: Plugin - MythWeb | Version: 0.26-fixes
Severity: medium | Keywords: NoTrans
Ticket locked: 0 |
----------------------------------+------------------------
I compiles mythtv 0.26.0~master.20130526.7150d64 myself and since then
MythWeb was no longer working properly: Each string was prefixed by
"NoTrans: " indicating a problem with loading the German translation.
After some debug "print" sprinkling I tracked it down to
"includes/database.php" triggering an output of an translated message,
which seems to load "classes/Translate.php" before "includes/defines.php"
was loaded.
This lead to load_translation() using modules_path uninitialized.
<!-- PMH: language=German -->
<!-- PMH: path=modules_path/_shared/lang/English.lang -->
<!-- PMH: path=modules_path/_shared/lang/English.lang -->
<!-- PMH: file= -->
Moving "inclues/defines.php" before "includes/databases.php" in
"includes/init.php" resolved the issue for me:
diff --git a/includes/init.php b/includes/init.php
index 337b05d..6e5f899 100644
--- a/includes/init.php
+++ b/includes/init.php
@@ -36,6 +36,9 @@
require_once 'includes/errors.php';
require_once 'includes/errordisplay.php';
+// Define some common stuff
+ require_once 'includes/defines.php';
+
// Setup the database
require_once 'includes/database.php';
@@ -45,9 +48,6 @@
// Load the session handler routines
require_once 'includes/session.php';
-// Define some common stuff
- require_once 'includes/defines.php';
-
// Load the translation routines so the modules can translate their
descriptions
require_once 'includes/translate.php';
The patch looks right for me, so please have a look and apply it if
necessary.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11603>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list