1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

removing anyDir / e_CURDIR code. May revisit in the future

This commit is contained in:
mcfly
2008-03-11 01:47:05 +00:00
parent 447257a9c4
commit 9a237a7128
2 changed files with 6 additions and 11 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/class2.php,v $ | $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.49 $ | $Revision: 1.50 $
| $Date: 2008-02-17 05:01:28 $ | $Date: 2008-03-11 01:47:01 $
| $Author: mcfly_e107 $ | $Author: mcfly_e107 $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -430,8 +430,6 @@ if ($pref['user_tracking'] == "session") {
} }
define("e_SELF", ($pref['ssl_enabled'] == '1' ? "https://".$_SERVER['HTTP_HOST'] : "http://".$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME'])); define("e_SELF", ($pref['ssl_enabled'] == '1' ? "https://".$_SERVER['HTTP_HOST'] : "http://".$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']));
$parts = pathinfo(e_SELF);
define('e_CURDIR', substr($parts['dirname'], strrpos($parts['dirname'], '/')+1));
// if the option to force users to use a particular url for the site is enabled, redirect users there as needed // if the option to force users to use a particular url for the site is enabled, redirect users there as needed
// Now matches RFC 2616 (sec 3.2): case insensitive, https/:443 and http/:80 are equivalent. // Now matches RFC 2616 (sec 3.2): case insensitive, https/:443 and http/:80 are equivalent.

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
| $Revision: 1.34 $ | $Revision: 1.35 $
| $Date: 2008-02-17 03:42:33 $ | $Date: 2008-03-11 01:47:02 $
| $Author: mcfly_e107 $ | $Author: mcfly_e107 $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -130,9 +130,8 @@ class e107plugin
$eplug_addons = $this->getAddons($plugin_path); // Returns comma-separated list $eplug_addons = $this->getAddons($plugin_path); // Returns comma-separated list
// $eplug_addons = $this->getAddons($plugin_path,'check'); // Checks opening/closing tags on addon files // $eplug_addons = $this->getAddons($plugin_path,'check'); // Checks opening/closing tags on addon files
//Ensure the plugin path lives in the same folder as is configured in the plugin.php/plugin.xml, unless //Ensure the plugin path lives in the same folder as is configured in the plugin.php/plugin.xml
//anyDir is set to true. if ($plugin_path == $plug_info['folder'])
if ($plugin_path == $plug_info['folder'] || $plug_info['folder'] == '*anyDir*')
{ {
if(array_key_exists($plugin_path, $pluginDBList)) if(array_key_exists($plugin_path, $pluginDBList))
{ // Update the addons needed by the plugin { // Update the addons needed by the plugin
@@ -641,7 +640,6 @@ class e107plugin
{ {
preg_match("/CREATE TABLE(.*?)\(/si", $sql_table, $match); preg_match("/CREATE TABLE(.*?)\(/si", $sql_table, $match);
$tablename = trim($match[1]); $tablename = trim($match[1]);
$tablename = str_replace("[folder]", $_folder, $tablename);
if($function == 'uninstall' && isset($_POST['delete_tables']) && $_POST['delete_tables']) if($function == 'uninstall' && isset($_POST['delete_tables']) && $_POST['delete_tables'])
{ {
@@ -651,7 +649,6 @@ class e107plugin
if($function == 'install') if($function == 'install')
{ {
$sql_table = preg_replace("/create table\s+/si", "CREATE TABLE ".MPREFIX, $sql_table); $sql_table = preg_replace("/create table\s+/si", "CREATE TABLE ".MPREFIX, $sql_table);
$sql_table = str_replace("[folder]", $_folder, $sql_table);
$txt .= "Adding table: {$tablename} ... "; $txt .= "Adding table: {$tablename} ... ";
$result = $this->manage_tables('add', array($sql_table)); $result = $this->manage_tables('add', array($sql_table));
$txt .= ($result ? "Success" : "Failed!")."<br />"; $txt .= ($result ? "Success" : "Failed!")."<br />";