implement usage of __DIR__ to fix references on include

This commit is contained in:
2018-04-24 13:35:33 +02:00
parent 0c1141dbb9
commit d597a54353
14 changed files with 36 additions and 36 deletions

View File

@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once("config.php");
require_once(__DIR__ . "/config.php");
$lang = $config["defaultLanguage"];
if (isset($_GET['lang'])) {
@@ -25,7 +25,7 @@ if (!file_exists($lang_file)) {
error_log("Translation for " . $lang . " not found. Fallback to 'de-de'");
$lang = "de-de";
}
$lang_file = dirname(__FILE__) . "/lang/lang." . $lang . ".php";
$lang_file = __DIR__ . "/lang/lang." . $lang . ".php";
require_once($lang_file);
unset($lang_file);
?>