From 0f9fb2d61dae8776e7920074810822f6d3b58573 Mon Sep 17 00:00:00 2001
From: Alexander Bias <alexander.bias@uni-ulm.de>
Date: Mon, 11 Sep 2017 16:02:34 +0200
Subject: [PATCH] Improve require statements

---
 block_course_overview_campus.php | 4 ++--
 settings.php                     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block_course_overview_campus.php b/block_course_overview_campus.php
index f346369..804a8dd 100644
--- a/block_course_overview_campus.php
+++ b/block_course_overview_campus.php
@@ -102,7 +102,7 @@ class block_course_overview_campus extends block_base {
         }
 
         // Include local library.
-        require_once(dirname(__FILE__) . '/locallib.php');
+        require_once(__DIR__ . '/locallib.php');
 
         // Get plugin config.
         $coc_config = get_config('block_course_overview_campus');
@@ -114,7 +114,7 @@ class block_course_overview_campus extends block_base {
         /********************************************************************************/
 
         // Include local library.
-        require_once(dirname(__FILE__) . '/locallib.php');
+        require_once(__DIR__ . '/locallib.php');
 
 
         // Check if the configured term dates make sense, if not disable term filter.
diff --git a/settings.php b/settings.php
index a207b01..32c9920 100644
--- a/settings.php
+++ b/settings.php
@@ -90,7 +90,7 @@ if ($hassiteconfig) {
     // Create full settings page structure.
     else if ($ADMIN->fulltree) {
         // Include local library.
-        require_once(dirname(__FILE__) . '/locallib.php');
+        require_once(__DIR__ . '/locallib.php');
 
 
         // Settings page: General.
-- 
GitLab