1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Improved e_CURRENT_PLUGIN detection when using SEF-URLs and other minor path fixes.

This commit is contained in:
Cameron 2015-04-03 18:42:27 -07:00
parent 71961be7af
commit 619b40b2e3
7 changed files with 44 additions and 35 deletions

View File

@ -37,7 +37,7 @@ e107::coreLan('footer', true);
foreach ($_plugins as $_p)
{
if(in_array($_p, $_globalLans) && e_CURRENT_PLUGIN != $_p) // filter out those with globals unless we are in a plugin folder.
if(in_array($_p, $_globalLans) && defset('e_CURRENT_PLUGIN') != $_p) // filter out those with globals unless we are in a plugin folder.
{
continue;
}

View File

@ -188,7 +188,7 @@ class admin_shortcodes
$e_icon_array = e107::getNav()->getIconArray();
if (e_CURRENT_PLUGIN)
if (deftrue('e_CURRENT_PLUGIN'))
{
$eplug_icon = '';
$eplug_folder = e_CURRENT_PLUGIN.'/';

View File

@ -386,6 +386,7 @@ class eDispatcher
{
case 'plugin':
//if($custom) $custom = 'url/'.$custom;
define('e_CURRENT_PLUGIN', $module); // TODO Move to a better location.
return $sc ? '{e_PLUGIN}'.$module.'url/'.$custom.'url.php' : e_PLUGIN.$module.'url/'.$custom.'url.php';
break;

View File

@ -325,7 +325,7 @@ if (!function_exists('r_emote'))
{
$key = str_replace("!", ".", $key); // Usually '.' was replaced by '!' when saving
$key = preg_replace("#_(\w{3})$#", ".\\1", $key); // '_' followed by exactly 3 chars is file extension
$key = e_IMAGE."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
$key = e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
$value2 = substr($value, 0, strpos($value, " "));
$value = ($value2 ? $value2 : $value);

View File

@ -3440,8 +3440,15 @@ class e_form
$value = e107::unserialize($value); // (saved as array, return it as an array)
}
$value = call_user_func_array(array($this, $method), array($value, 'read', $parms));
if(method_exists($this,$method))
{
$value = call_user_func_array(array($this, $method), array($value, 'read', $parms));
}
else
{
return "<span class='label label-important'>Missing: ".$method."()</span>";
}
// print_a($attributes);
// Inline Editing.
if(!vartrue($attributes['noedit']) && vartrue($parms['editable'])) // avoid bad markup, better solution coming up

View File

@ -209,7 +209,7 @@ $ADMIN_HEADER .= '<div class="container-fluid">
{ADMIN_LATEST=infopanel}
{ADMIN_STATUS=infopanel}
{ADMIN_MSG=request}
{ADMIN_PLUGINS}

View File

@ -12,35 +12,35 @@
* $Id$
*/
/*! \mainpage e107 Content Management System (CMS) - v2
*
* \section intro_sec What is e107?
*
* e107 is a free (open-source) content management system which allows you to easily manage and publish your content online. Developers can save time in building websites and powerful online applications. Users can avoid programming completely! Blogs, Websites, Intranets - e107 does it all.
*
* \section requirements_sec Requirements
*
* - PHP v5.3 or higher
* - MySQL 4.x or higher
*
* \section install_sec Installation
*
* - Point your browser to the http://localhost/YOUR FOLDER/install.php (depending on your webserver setup)
* - Follow the installation wizard
*
* \section reporting_bugs_sec Reporting Bugs
*
* Be sure you are using the most recent version prior to reporting an issue. You may report any bugs or feature requests on GitHub (https://github.com/e107inc/e107/issues)
*
* \section pull_requests_sec Pull-Requests
*
* - Please submit 1 pull-request for each Github #issue you may work on.
* - Make sure that only the lines you have changed actually show up in a file-comparison (diff) ie. some text-editors alter every line so this should be avoided.
*
* \section license_sec License
*
* e107 is released under the terms and conditions of the GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
/*! \mainpage e107 Content Management System (CMS) - v2
*
* \section intro_sec What is e107?
*
* e107 is a free (open-source) content management system which allows you to easily manage and publish your content online. Developers can save time in building websites and powerful online applications. Users can avoid programming completely! Blogs, Websites, Intranets - e107 does it all.
*
* \section requirements_sec Requirements
*
* - PHP v5.3 or higher
* - MySQL 4.x or higher
*
* \section install_sec Installation
*
* - Point your browser to the http://localhost/YOUR FOLDER/install.php (depending on your webserver setup)
* - Follow the installation wizard
*
* \section reporting_bugs_sec Reporting Bugs
*
* Be sure you are using the most recent version prior to reporting an issue. You may report any bugs or feature requests on GitHub (https://github.com/e107inc/e107/issues)
*
* \section pull_requests_sec Pull-Requests
*
* - Please submit 1 pull-request for each Github #issue you may work on.
* - Make sure that only the lines you have changed actually show up in a file-comparison (diff) ie. some text-editors alter every line so this should be avoided.
*
* \section license_sec License
*
* e107 is released under the terms and conditions of the GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
// BOOTSTRAP START
@ -124,6 +124,7 @@
if(file_exists($file))
{
define('e_CURRENT_PLUGIN', $plug);
include_once($file);
exit;
}