Skip to content

Commit

Permalink
changed plugin_api.php include order (must be included before lang_ap…
Browse files Browse the repository at this point in the history
…i.php)

autoload skip include for plugins
  • Loading branch information
fmancardi committed Sep 28, 2016
1 parent 478d999 commit db74644
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/functions/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
* @since 1.5
*
* @internal revisions
* @since 1.9.15
* @since 1.9.16
*
*/

/** core and parenthal classes */
require_once('object.class.php');
require_once('metastring.class.php');

/** Testlink Plugin API helper methods, must be included before lang_api.php */
require_once('plugin_api.php');

/** library for localization */
require_once('lang_api.php');

Expand All @@ -46,9 +49,6 @@
/** Initialize the Event System */
require_once('event_api.php' );

/** Testlink Plugin API helper methods */
require_once('plugin_api.php');

// Needed to avoid problems with Smarty 3
spl_autoload_register('tlAutoload');

Expand Down Expand Up @@ -104,6 +104,14 @@ function tlAutoload($class_name)
$classFileName = strtolower($class_name) . "/" . $class_name;
}

// Plugin special processing, class name ends with Plugin (see plugin_register())
// Does not use autoload
if( preg_match('/Plugin$/', $class_name) == 1 )
{
return;
}


// fix provided by BitNami for:
// Reason: We had a problem integrating TestLink with other apps.
// You can reproduce it installing ThinkUp and TestLink applications in the same stack.
Expand Down

2 comments on commit db74644

@edug2006
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La solucion es comentar la funcion que da problemas..
lang_api.php

//$t_plugin_current = plugin_get_current();
$t_plugin_current = 'English';

@fmancardi
Copy link
Contributor Author

@fmancardi fmancardi commented on db74644 Dec 11, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.