Browse Source

implementando constante __DIR__

kennyrodas 11 years ago
parent
commit
eb09e16eea
3 changed files with 12 additions and 11 deletions
  1. 9 8
      plugin/ticket/config.php
  2. 1 1
      plugin/ticket/lib/tck_plugin.class.php
  3. 2 2
      plugin/ticket/start.php

+ 9 - 8
plugin/ticket/config.php

@@ -3,13 +3,7 @@
 
 /* bbb parameters that will be registered in the course settings */
 
-require_once _DIR_.'../../main/inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
-
-require_once 'lib/tck.lib.php';
-require_once 'lib/tck_api.php';
-require_once 'lib/tck_plugin.class.php';
-
+define("PLUGIN_NAME", "ticket");
 define("TABLE_SUPPORT_ASSIGNED_LOG", "tck_assigned_log");
 define("TABLE_SUPPORT_CATEGORY", "tck_category");
 define("TABLE_SUPPORT_MESSAGE", "tck_message");
@@ -17,4 +11,11 @@ define("TABLE_SUPPORT_PRIORITY", "tck_priority");
 define("TABLE_SUPPORT_PROJECT", "tck_project");
 define("TABLE_SUPPORT_STATUS", "tck_status");
 define("TABLE_SUPPORT_TICKET", "tck_ticket");
-define("TABLE_SUPPORT_MESSAGE_ATTACHMENTS", "tck_message_attachments");
+define("TABLE_SUPPORT_MESSAGE_ATTACHMENTS", "tck_message_attachments");
+
+require_once __DIR__.'/../../main/inc/global.inc.php';
+require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
+
+require_once api_get_path(PLUGIN_PATH).PLUGIN_NAME.'/lib/tck.lib.php';
+require_once api_get_path(PLUGIN_PATH).PLUGIN_NAME.'/lib/tck_api.php';
+require_once api_get_path(PLUGIN_PATH).PLUGIN_NAME.'/lib/tck_plugin.class.php';

+ 1 - 1
plugin/ticket/lib/tck_plugin.class.php

@@ -15,7 +15,7 @@ class TicketPlugin extends Plugin
     function install() {
     	
     	// Create database tables
-    	require_once api_get_path(SYS_PLUGIN_PATH).'ticket/database.php';
+    	require_once api_get_path(SYS_PLUGIN_PATH).PLUGIN_NAME.'/database.php';
     	
     	// Create link tab
     	$homep = api_get_path(SYS_PATH).'home/'; //homep for Home Path

+ 2 - 2
plugin/ticket/start.php

@@ -7,9 +7,9 @@
  * Initialization
  */
 
-$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
+$course_plugin = 'ticket'; //needed in order to load the plugin lang variables
 require_once dirname(__FILE__).'/config.php';
-$tool_name = get_lang('Videoconference');
+$tool_name = get_lang('Ticket');
 $tpl = new Template($tool_name);
 $bbb = new bbb();