mirror of
https://github.com/e107inc/e107.git
synced 2025-05-01 17:57:56 +02:00
Install fixes and notice removal
This commit is contained in:
parent
8f1e2bea62
commit
db3a16fdc6
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/emote_filter.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-09-01 20:09:35 $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2009-09-17 00:13:39 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -35,6 +35,11 @@ class e_emotefilter {
|
||||
|
||||
|
||||
$this->emotes = $sysprefs->getArray("emote_".$pref['emotepack']);
|
||||
|
||||
if(!vartrue($this->emotes))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($this->emotes as $key => $value)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| ©Steve Dunstan 2001-2002
|
||||
| <EFBFBD>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/event_class.php,v $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2009-01-22 23:14:48 $
|
||||
| $Author: lisa_ $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2009-09-17 00:13:39 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -71,11 +71,12 @@ class e107_event
|
||||
}
|
||||
if(isset($pref['e_admin_events_list']) && is_array($pref['e_admin_events_list']))
|
||||
{
|
||||
$called = getcachedvars('admin_events_called');
|
||||
// $called = getcachedvars('admin_events_called');
|
||||
$called = e107::getRegistry('core/cachedvars/admin_events_called', false);
|
||||
if(!is_array($called)) { $called = array(); }
|
||||
foreach($pref['e_admin_events_list'] as $plugin)
|
||||
{
|
||||
if(plugInstalled($plugin))
|
||||
if(e107::isInstalled($plugin))
|
||||
{
|
||||
$func = 'plugin_'.$plugin.'_admin_events';
|
||||
if(!function_exists($func))
|
||||
@ -89,7 +90,8 @@ class e107_event
|
||||
if ($event_func && function_exists($event_func) && !in_array($event_func, $called))
|
||||
{
|
||||
$called[] = $event_func;
|
||||
cachevars('admin_events_called', $called);
|
||||
// cachevars('admin_events_called', $called);
|
||||
e107::setRegistry('core/cachedvars/admin_events_called', $called);
|
||||
call_user_func($event_func);
|
||||
}
|
||||
}
|
||||
@ -120,7 +122,7 @@ class e107_event
|
||||
{
|
||||
foreach($pref['e_event_list'] as $hook)
|
||||
{
|
||||
if(plugInstalled($hook))
|
||||
if(e107::isInstalled($hook))
|
||||
{
|
||||
if(is_readable(e_PLUGIN.$hook."/e_event.php"))
|
||||
{
|
||||
|
@ -9,9 +9,9 @@
|
||||
* mySQL Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||
* $Revision: 1.52 $
|
||||
* $Date: 2009-09-13 10:29:56 $
|
||||
* $Author: secretr $
|
||||
* $Revision: 1.53 $
|
||||
* $Date: 2009-09-17 00:13:39 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
if(defined('MYSQL_LIGHT'))
|
||||
@ -24,7 +24,7 @@ if(defined('MYSQL_LIGHT'))
|
||||
$sql = new db;
|
||||
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
|
||||
}
|
||||
elseif(defined('E107_INSTALL')) //TODO Remove the need for this if possible
|
||||
elseif(defined('E107_INSTALL'))
|
||||
{
|
||||
define('E107_DEBUG_LEVEL', 0);
|
||||
define('e_QUERY', '');
|
||||
@ -49,8 +49,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
|
||||
*
|
||||
* @package e107
|
||||
* @category e107_handlers
|
||||
* @version $Revision: 1.52 $
|
||||
* @author $Author: secretr $
|
||||
* @version $Revision: 1.53 $
|
||||
* @author $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
class e_db_mysql {
|
||||
@ -93,8 +93,9 @@ class e_db_mysql {
|
||||
e107::getSingleton('e107_traffic')->BumpWho('Create db object', 1);
|
||||
|
||||
$this->mySQLPrefix = MPREFIX; // Set the default prefix - may be overridden
|
||||
$langid = 'e107language_'.$pref['cookie_name'];
|
||||
if ($pref['user_tracking'] == 'session')
|
||||
|
||||
$langid = (isset($pref['cookie_name'])) ? 'e107language_'.$pref['cookie_name'] : 'e107language_temp';
|
||||
if (isset($pref['user_tracking']) && ($pref['user_tracking'] == 'session'))
|
||||
{
|
||||
if (!isset($_SESSION[$langid])) { return; }
|
||||
$this->mySQLlanguage = $_SESSION[$langid];
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
|
||||
| $Revision: 1.86 $
|
||||
| $Date: 2009-09-16 13:01:17 $
|
||||
| $Revision: 1.87 $
|
||||
| $Date: 2009-09-17 00:13:39 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -1058,10 +1058,10 @@ class e107plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//main menu items
|
||||
if(isset($plug_vars['menuLink']))
|
||||
{
|
||||
|
||||
foreach($plug_vars['menuLink'] as $link)
|
||||
{
|
||||
$attrib = $link['@attributes'];
|
||||
@ -1147,12 +1147,18 @@ class e107plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Plugin pref items
|
||||
if(isset($plug_vars['pluginPrefs']))
|
||||
{
|
||||
//TODO plugin pref handling.
|
||||
}
|
||||
|
||||
//Userclasses
|
||||
//$this->manage_userclass('add', $eplug_userclass, $eplug_userclass_description);
|
||||
if(isset($plug_vars['userclass']))
|
||||
{
|
||||
$uclass_list = (isset($plug_vars['userclass'][0]) ? $plug_vars['userclass'] : array($plug_vars['userclass']));
|
||||
foreach($uclass_list as $uclass)
|
||||
{
|
||||
$attrib = $uclass['@attributes'];
|
||||
@ -1195,7 +1201,6 @@ class e107plugin
|
||||
//Extended user fields
|
||||
if(isset($plug_vars['extendedField']))
|
||||
{
|
||||
$efield_list = (isset($plug_vars['extendedField'][0]) ? $plug_vars['extendedField'] : array($plug_vars['extendedFields']));
|
||||
foreach($efield_list as $efield)
|
||||
{
|
||||
$attrib = $efield['@attributes'];
|
||||
@ -1244,8 +1249,7 @@ class e107plugin
|
||||
//If any commentIDs are configured, we need to remove all comments on uninstall
|
||||
if($function == 'uninstall' && isset($plug_vars['commentID']))
|
||||
{
|
||||
$commentArray = (is_array($plug_vars['commentID']) ? $plug_vars['commentID'] : array($plug_vars['commentID']));
|
||||
$txt .= 'Removing all plugin comments: ('.implode(', ', $commentArray).')<br />';
|
||||
$txt .= 'Removing all plugin comments: ('.implode(', ', $plug_vars['commentID']).')<br />';
|
||||
$this->manage_comments('remove', $commentArray);
|
||||
}
|
||||
|
||||
@ -1749,7 +1753,7 @@ class e107plugin
|
||||
$ret['@attributes']['name'] = varset($eplug_name);
|
||||
$ret['@attributes']['compatibility'] = varset($eplug_compatible);
|
||||
$ret['folder'] = varset($eplug_folder);
|
||||
$ret['category'] = $this->manage_category($eplug_category);
|
||||
$ret['category'] = varset($eplug_category) ? $this->manage_category($eplug_category) : "misc";
|
||||
$ret['description'] = varset($eplug_description);
|
||||
$ret['author']['@attributes']['name'] = varset($eplug_author);
|
||||
$ret['author']['@attributes']['url'] = varset($eplug_url);
|
||||
@ -1779,7 +1783,7 @@ class e107plugin
|
||||
// loadLanFiles($plugName, 'admin'); // Look for LAN files on default paths
|
||||
require_once(e_HANDLER.'xml_class.php');
|
||||
$xml = new xmlClass;
|
||||
$xml->setOptArrayTags('extendedField,userclass,menuLink'); // always arrays for these tags.
|
||||
$xml->setOptArrayTags('extendedField,userclass,menuLink,commentID'); // always arrays for these tags.
|
||||
$this->plug_vars = $xml->loadXMLfile(e_PLUGIN.$plugName.'/plugin.xml', true, true);
|
||||
|
||||
if ($this->plug_vars === FALSE)
|
||||
@ -1790,7 +1794,7 @@ class e107plugin
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->plug_vars['category'] = $this->manage_category($this->plug_vars['category']);
|
||||
$this->plug_vars['category'] = (isset($this->plug_vars['category'])) ? $this->manage_category($this->plug_vars['category']) : "misc";
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* e107 Admin Theme Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
||||
* $Revision: 1.51 $
|
||||
* $Date: 2009-09-02 02:38:50 $
|
||||
* $Revision: 1.52 $
|
||||
* $Date: 2009-09-17 00:13:39 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@ -33,6 +33,7 @@ class themeHandler{
|
||||
var $frm;
|
||||
var $fl;
|
||||
var $themeConfigObj = null;
|
||||
var $noLog = FALSE;
|
||||
public $allowedCategories = array(
|
||||
'generic',
|
||||
'adult',
|
||||
@ -58,8 +59,7 @@ class themeHandler{
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
$this->frm = new e_form(); //enable inner tabindex counter
|
||||
|
||||
require_once(e_HANDLER."file_class.php");
|
||||
$this->fl = new e_file;
|
||||
$this->fl = e107::getFile();
|
||||
|
||||
|
||||
if (isset($_POST['upload']))
|
||||
@ -67,7 +67,7 @@ class themeHandler{
|
||||
$this -> themeUpload();
|
||||
}
|
||||
|
||||
$this -> themeArray = $this -> getThemes();
|
||||
$this->themeArray = (defined('E107_INSTALL')) ? $this -> getThemes('xml') : $this -> getThemes();
|
||||
|
||||
// print_a($this -> themeArray);
|
||||
|
||||
@ -155,6 +155,7 @@ class themeHandler{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getThemes($mode=FALSE)
|
||||
{
|
||||
@ -165,6 +166,11 @@ class themeHandler{
|
||||
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if(($mode == 'xml') && !is_readable(e_THEME.$file."/theme.xml"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file != "." && $file != ".." && $file != "CVS" && $file != "templates" && is_dir(e_THEME.$file) && is_readable(e_THEME.$file."/theme.php") )
|
||||
{
|
||||
if($mode == "id")
|
||||
@ -267,8 +273,13 @@ class themeHandler{
|
||||
* @param object $categoryfromXML
|
||||
* @return
|
||||
*/
|
||||
function getThemeCategory($categoryfromXML)
|
||||
function getThemeCategory($categoryfromXML='')
|
||||
{
|
||||
if(!$categoryfromXML)
|
||||
{
|
||||
return 'generic';
|
||||
}
|
||||
|
||||
$tmp = explode(",",$categoryfromXML);
|
||||
$category = array();
|
||||
foreach($tmp as $cat)
|
||||
@ -280,7 +291,7 @@ class themeHandler{
|
||||
}
|
||||
else
|
||||
{
|
||||
$category[] = '(invalid category)';
|
||||
$category[] = 'generic';
|
||||
}
|
||||
}
|
||||
|
||||
@ -891,8 +902,7 @@ class themeHandler{
|
||||
{
|
||||
|
||||
$astext = "";
|
||||
require_once(e_HANDLER."file_class.php");
|
||||
$file = new e_file;
|
||||
$file = e107::getFile();
|
||||
|
||||
$adminstyles = $file -> get_files(e_ADMIN."includes");
|
||||
|
||||
@ -1013,34 +1023,54 @@ class themeHandler{
|
||||
$ns->tablerender(TPVLAN_2, $text);
|
||||
}
|
||||
|
||||
function setTheme()
|
||||
|
||||
/**
|
||||
* Set Theme as Main Theme.
|
||||
* @param object $name [optional] name (folder) of the theme to set.
|
||||
* @return
|
||||
*/
|
||||
function setTheme($name='')
|
||||
{
|
||||
global $pref, $e107cache, $ns, $sql, $emessage;
|
||||
$core = e107::getConfig('core');
|
||||
$sql = e107::getDb();
|
||||
$emessage = eMessage::getInstance();
|
||||
|
||||
$themeArray = $this -> getThemes("id");
|
||||
|
||||
$pref['sitetheme'] = $themeArray[$this -> id];
|
||||
$pref['themecss'] ='style.css';
|
||||
$pref['sitetheme_deflayout'] = $this->findDefault($themeArray[$this -> id]);
|
||||
$pref['sitetheme_layouts'] = is_array($this->themeArray[$pref['sitetheme']]['layouts']) ? $this->themeArray[$pref['sitetheme']]['layouts'] : array();
|
||||
$pref['sitetheme_custompages'] = $this->themeArray[$pref['sitetheme']]['custompages'];
|
||||
$pref['sitetheme_version'] = $this->themeArray[$pref['sitetheme']]['version'];
|
||||
$pref['sitetheme_releaseUrl'] = $this->themeArray[$pref['sitetheme']]['releaseUrl'];
|
||||
|
||||
$name = ($name) ? $name : $themeArray[$this -> id];
|
||||
$layout = $pref['sitetheme_layouts'] = is_array($this->themeArray[$name]['layouts']) ? $this->themeArray[$name]['layouts'] : array();
|
||||
$deflayout = $this->findDefault($name);
|
||||
$customPages = $this->themeArray[$name]['custompages'];
|
||||
$version = $this->themeArray[$name]['version'];
|
||||
|
||||
$core->set('sitetheme',$name);
|
||||
$core->set('themecss','style.css');
|
||||
$core->set('sitetheme_layouts',$layout);
|
||||
$core->set('sitetheme_deflayout',$deflayout);
|
||||
$core->set('sitetheme_custompages',$customPages);
|
||||
$core->set('sitetheme_version',$version);
|
||||
$core->set('sitetheme_releaseUrl',$this->themeArray[$name]['releaseUrl']);
|
||||
|
||||
$sql -> db_Delete("menus", "menu_layout !='' ");
|
||||
|
||||
$e107cache->clear_sys();
|
||||
if(save_prefs())
|
||||
ecache::clear_sys();
|
||||
|
||||
if($core->save())
|
||||
{
|
||||
$emessage->add(TPVLAN_3." <b>'".$themeArray[$this -> id]."'</b>", E_MESSAGE_SUCCESS);
|
||||
//TODO LANs
|
||||
$emessage->add(TPVLAN_3." <b>'".$themeArray[$this -> id]." v".$version."'</b>", E_MESSAGE_SUCCESS);
|
||||
$emessage->add("Default Layout: ".$deflayout,E_MESSAGE_SUCCESS);
|
||||
$emessage->add("Custom Pages: ".$customPages,E_MESSAGE_SUCCESS);
|
||||
|
||||
$this->theme_adminlog('01',$name.', style.css');
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(TPVLAN_3." <b>'".$themeArray[$this -> id]."'</b>", E_MESSAGE_ERROR);
|
||||
$emessage->add(TPVLAN_3." <b>'".$name."'</b>", E_MESSAGE_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->theme_adminlog('01',$pref['sitetheme'].', '.$pref['themecss']);
|
||||
|
||||
// $ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_3." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
||||
|
||||
}
|
||||
|
||||
function findDefault($theme)
|
||||
@ -1155,6 +1185,10 @@ class themeHandler{
|
||||
// Log event to admin log
|
||||
function theme_adminlog($msg_num='00', $woffle='')
|
||||
{
|
||||
if($this->noLog)
|
||||
{
|
||||
return;
|
||||
}
|
||||
global $pref, $admin_log;
|
||||
// if (!varset($pref['admin_log_log']['admin_banlist'],0)) return;
|
||||
$admin_log->log_event('THEME_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
|
||||
@ -1239,6 +1273,7 @@ class themeHandler{
|
||||
// loadLanFiles($path, 'admin'); // Look for LAN files on default paths
|
||||
require_once(e_HANDLER.'xml_class.php');
|
||||
$xml = new xmlClass;
|
||||
$xml->setOptArrayTags('layout'); // layout should always be an array.
|
||||
$vars = $xml->loadXMLfile(e_THEME.$path.'/theme.xml', true, true);
|
||||
|
||||
$vars['name'] = varset($vars['@attributes']['name']);
|
||||
@ -1249,43 +1284,31 @@ class themeHandler{
|
||||
$vars['email'] = varset($vars['author']['@attributes']['email']);
|
||||
$vars['website'] = varset($vars['author']['@attributes']['url']);
|
||||
$vars['author'] = varset($vars['author']['@attributes']['name']);
|
||||
$vars['info'] = $vars['description'];
|
||||
$vars['category'] = $this->getThemeCategory($vars['category']);
|
||||
$vars['info'] = varset($vars['description']);
|
||||
$vars['category'] = $this->getThemeCategory(varset($vars['category']));
|
||||
$vars['xhtmlcompliant'] = varset($vars['compliance']['@attributes']['xhtml']);
|
||||
$vars['csscompliant'] = varset($vars['compliance']['@attributes']['css']);
|
||||
$vars['path'] = $path;
|
||||
$vars['@attributes']['default'] = (strtolower($vars['@attributes']['default'])=='true') ? 1 : 0;
|
||||
$vars['@attributes']['default'] = (varset($vars['@attributes']['default']) && strtolower($vars['@attributes']['default']) == 'true') ? 1 : 0;
|
||||
|
||||
unset($vars['authorEmail'],$vars['authorUrl'],$vars['xhtmlCompliant'],$vars['cssCompliant'],$vars['description']);
|
||||
|
||||
// Compile layout information into a more usable format.
|
||||
|
||||
|
||||
|
||||
$custom = array();
|
||||
|
||||
foreach($vars['layouts'] as $layout)
|
||||
{
|
||||
if(is_array($layout[0]))
|
||||
foreach($layout as $key=>$val)
|
||||
{
|
||||
foreach($layout as $key=>$val)
|
||||
$name = $val['@attributes']['name'];
|
||||
unset($val['@attributes']['name']);
|
||||
$lays[$name] = $val;
|
||||
if(isset($val['customPages']))
|
||||
{
|
||||
|
||||
$name = $val['@attributes']['name'];
|
||||
unset($val['@attributes']['name']);
|
||||
|
||||
$lays[$name] = $val;
|
||||
if(isset($val['customPages']))
|
||||
{
|
||||
$custom[$name] = array_filter(explode(" ",$val['customPages']));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$name = $layout['@attributes']['name'];
|
||||
unset($layout['@attributes']['name']);
|
||||
$lays[$name] = $layout;
|
||||
if(isset($val['customPages']))
|
||||
{
|
||||
$custom[$name] = array_filter(explode(" ",$layout['customPages']));
|
||||
$custom[$name] = array_filter(explode(" ",$val['customPages']));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1293,7 +1316,7 @@ class themeHandler{
|
||||
$vars['layouts'] = $lays;
|
||||
$vars['path'] = $path;
|
||||
$vars['custompages'] = $custom;
|
||||
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| ©Steve Dunstan 2001-2002
|
||||
| <EFBFBD>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/userclass_class.php,v $
|
||||
| $Revision: 1.41 $
|
||||
| $Date: 2009-08-22 21:27:34 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.42 $
|
||||
| $Date: 2009-09-17 00:13:40 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@ -69,7 +69,7 @@ class user_class
|
||||
function user_class()
|
||||
{
|
||||
|
||||
$this->sql_r = new db;
|
||||
$this->sql_r = e107::getDb('sql_r');
|
||||
$this->isAdmin = FALSE;
|
||||
|
||||
$this->fixed_classes = array(e_UC_PUBLIC => UC_LAN_0,
|
||||
|
@ -9,8 +9,8 @@
|
||||
* Simple XML Parser
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/xml_class.php,v $
|
||||
* $Revision: 1.25 $
|
||||
* $Date: 2009-09-16 13:01:19 $
|
||||
* $Revision: 1.26 $
|
||||
* $Date: 2009-09-17 00:13:40 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@ -541,11 +541,10 @@ class xmlClass
|
||||
return $vars;
|
||||
}
|
||||
|
||||
// $array_tags = array("extendedField","userclass","menuLink");
|
||||
foreach($this->arrayTags as $vl)
|
||||
{
|
||||
|
||||
if(is_array($vars[$vl]) && !varset($vars[$vl][0]))
|
||||
if(isset($vars[$vl]) && is_array($vars[$vl]) && !varset($vars[$vl][0]))
|
||||
{
|
||||
|
||||
$vars[$vl] = array($vars[$vl]);
|
||||
@ -762,9 +761,9 @@ class xmlClass
|
||||
|
||||
$pref = array();
|
||||
foreach($XMLData['prefs'][$prefType] as $val)
|
||||
{
|
||||
$value = (substr($val['@value'],0,7) == "array (") ? e107::getArrayStorage()->ReadArray($val['@value']) : $val['@value'];
|
||||
{
|
||||
$name = $val['@attributes']['name'];
|
||||
$value = (substr($val['@value'],0,7) == "array (") ? e107::getArrayStorage()->ReadArray($val['@value']) : $val['@value'];
|
||||
$pref[$name] = $value;
|
||||
}
|
||||
|
||||
|
31
install_.php
31
install_.php
@ -9,8 +9,8 @@
|
||||
* Installation file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/install_.php,v $
|
||||
* $Revision: 1.38 $
|
||||
* $Date: 2009-09-13 12:12:23 $
|
||||
* $Revision: 1.39 $
|
||||
* $Date: 2009-09-17 00:13:40 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
@ -54,6 +54,8 @@ define("e_UC_MEMBER", 253);
|
||||
define("e_UC_ADMIN", 254);
|
||||
define("e_UC_NOBODY", 255);
|
||||
|
||||
define("E107_INSTALL",TRUE);
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
|
||||
@ -930,7 +932,7 @@ class e_install
|
||||
{
|
||||
// Basic stuff to get the handlers/classes to work.
|
||||
|
||||
define("E107_INSTALL",TRUE); //FIXME - remove the need for this - ie. make the MySQL class work without it.
|
||||
|
||||
$udirs = "admin/|plugins/|temp";
|
||||
$e_SELF = $_SERVER['PHP_SELF'];
|
||||
$e_HTTP = preg_replace("#".$udirs."#i", "", substr($e_SELF, 0, strrpos($e_SELF, "/"))."/");
|
||||
@ -966,6 +968,7 @@ class e_install
|
||||
$tp = e107::getParser();
|
||||
|
||||
include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'].$this->previous_steps['language']."/lan_prefs.php");
|
||||
include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'].$this->previous_steps['language']."/admin/lan_theme.php");
|
||||
|
||||
//Create default plugin-table entries.
|
||||
e107::getSingleton('e107plugin')->update_plugins_table();
|
||||
@ -984,11 +987,13 @@ class e_install
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
e107::getSingleton('xmlClass')->e107Import($XMLImportfile,'add'); // Add missing core pref values
|
||||
e107::getSingleton('e107plugin')->save_addon_prefs(); // save plugin addon pref-lists. eg. e_latest_list.
|
||||
$tm = e107::getSingleton('themeHandler');
|
||||
$tm->noLog = TRUE;
|
||||
$tm->setTheme($this->previous_steps['prefs']['sitetheme']);
|
||||
|
||||
|
||||
// Set Preferences defined during install - overwriting those that may exist in the XML.
|
||||
|
||||
@ -1094,6 +1099,7 @@ class e_install
|
||||
|
||||
function get_themes()
|
||||
{
|
||||
|
||||
$handle = opendir($this->e107->e107_dirs['THEMES_DIRECTORY']);
|
||||
$lanlist = array();
|
||||
while ($file = readdir($handle))
|
||||
@ -1114,15 +1120,22 @@ class e_install
|
||||
|
||||
function get_theme_xml($theme_folder)
|
||||
{
|
||||
if(!defined("SITEURL"))
|
||||
{
|
||||
define("SITEURL","");
|
||||
}
|
||||
$path = $this->e107->e107_dirs['THEMES_DIRECTORY'].$theme_folder."/theme.xml";
|
||||
|
||||
if(!is_readable($path))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
require_once($this->e107->e107_dirs['HANDLERS_DIRECTORY']."xml_class.php");
|
||||
$xml = new xmlClass;
|
||||
$xmlArray = $xml->loadXMLfile($path,'advanced');
|
||||
require_once($this->e107->e107_dirs['HANDLERS_DIRECTORY']."theme_handler.php");
|
||||
$tm = new themeHandler;
|
||||
$xmlArray = $tm->parse_theme_xml($theme_folder);
|
||||
// require_once($this->e107->e107_dirs['HANDLERS_DIRECTORY']."xml_class.php");
|
||||
// $xml = new xmlClass;
|
||||
// $xmlArray = $xml->loadXMLfile($path,'advanced');
|
||||
return (is_array($xmlArray)) ? $xmlArray : FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user