1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Syntax and Notice fixes.

This commit is contained in:
CaMer0n
2009-09-06 20:04:04 +00:00
parent 4177c1607b
commit c0041d69d0
8 changed files with 85 additions and 86 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/admin.php,v $
| $Revision: 1.14 $
| $Date: 2009-08-31 13:12:02 $
| $Revision: 1.15 $
| $Date: 2009-09-06 20:04:02 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -355,7 +355,7 @@ function getPluginLinks($iconSize = E_16_PLUGMANAGER, $linkStyle = 'adminb')
{
include(e_PLUGIN.$plugin_path."/plugin.php");
}
if ($eplug_conffile)
if (varset($eplug_conffile))
{
$eplug_name = $tp->toHTML($eplug_name,FALSE,"defs, emotes_off");
$plugin_icon = $eplug_icon_small ? "<img class='icon S16' src='".e_PLUGIN.$eplug_icon_small."' alt='' />" : E_16_PLUGIN;

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $
| $Revision: 1.47 $
| $Date: 2009-09-04 15:24:40 $
| $Revision: 1.48 $
| $Date: 2009-09-06 20:04:02 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -965,7 +965,7 @@ function addIndexToTable($target, $indexSpec, $just_check, &$updateMessages, $op
function catch_error(&$target)
{
if ($target->mySQLlastErrText != '' && E107_DEBUG_LEVEL != 0)
if (vartrue($target->mySQLlastErrText) && E107_DEBUG_LEVEL != 0)
{
$tmp2 = debug_backtrace();
$tmp = $target->mySQLlastErrText;

View File

@@ -9,8 +9,8 @@
* e107 Menu Class
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
* $Revision: 1.12 $
* $Date: 2009-09-04 14:35:01 $
* $Revision: 1.13 $
* $Date: 2009-09-06 20:04:03 $
* $Author: e107coders $
*/
@@ -232,7 +232,7 @@ class e_menu
ob_start();
}
if($error_handler->debug == true)
if(vartrue($error_handler->debug))
{
echo "\n<!-- Menu Start: ".$mname." -->\n";
}

View File

@@ -9,8 +9,8 @@
* mySQL Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
* $Revision: 1.47 $
* $Date: 2009-09-05 23:02:23 $
* $Revision: 1.48 $
* $Date: 2009-09-06 20:04:03 $
* $Author: e107coders $
*/
@@ -61,7 +61,7 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
* MySQL Abstraction class
*
* @package e107
* @version $Revision: 1.47 $
* @version $Revision: 1.48 $
* @author $Author: e107coders $
*/
class db {
@@ -529,7 +529,8 @@ class db {
$arg = $new_data .(isset($arg['WHERE']) ? ' WHERE '. $arg['WHERE'] : '');
}
if ($result = $this->mySQLresult = $this->db_Query('UPDATE '.$this->mySQLPrefix.$table.' SET '.$arg, NULL, 'db_Update', $debug, $log_type, $log_remark))
$query = 'UPDATE '.$this->mySQLPrefix.$table.' SET '.$arg;
if ($result = $this->mySQLresult = $this->db_Query($query, NULL, 'db_Update', $debug, $log_type, $log_remark))
{
$result = mysql_affected_rows($this->mySQLaccess);
$this->dbError('db_Update');

View File

@@ -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.78 $
| $Date: 2009-09-03 22:27:32 $
| $Revision: 1.79 $
| $Date: 2009-09-06 20:04:03 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -124,12 +124,10 @@ class e107plugin
$sql = e107::getDb();
$sql2 = e107::getDb('sql2');
$tp = e107::getParser();
$fl = e107::getFile();
global $mySQLprefix, $menu_pref, $pref;
require_once(e_HANDLER.'file_class.php');
$fl = new e_file;
$pluginList = $fl->get_files(e_PLUGIN, "^plugin\.(php|xml)$", "standard", 1);
$sp = FALSE;
@@ -298,6 +296,7 @@ class e107plugin
$sql = e107::getDb();
$tp = e107::getParser();
$fl = e107::getFile();
$query = "SELECT * FROM #plugin WHERE plugin_installflag =0 ORDER BY plugin_path ASC";
$sql->db_Select_gen($query);
@@ -311,9 +310,6 @@ class e107plugin
$reject_plugin[] = $val['plugin_path']."/images";
}
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
$filesrch = implode("|",array("_16.png","_16.PNG","_32.png","_32.PNG","_48.png","_48.PNG","_64.png","_64.PNG","_128.png","_128.png"));
if($plugin_icons = $fl->get_files(e_PLUGIN,$filesrch,$reject_plugin,2))
@@ -363,12 +359,7 @@ class e107plugin
$iconpool[$key][] = $tp->createConstants($file['path'],1).$file['fname'];
}
// TODO Review pref-class method used below (a new function?), to simply add or update existing prefs. (without a global $pref)
foreach($iconpool as $key=>$val)
{
e107::getConfig('ipool')->set($key,$val);
}
e107::getConfig('ipool')->setPref($iconpool);
return (e107::getConfig('ipool')->save(FALSE)) ? TRUE : FALSE;
}
@@ -600,10 +591,9 @@ class e107plugin
}
}
// e107::getConfig('core')->save(FALSE);
// save_prefs(); //FIXME doesn't work from install.php
e107::getConfig()->loadData($pref, false)->save(false, true);
e107::getConfig('core')->setPref($pref)->save();
// e107::getConfig()->loadData($pref, false)->save(false, true);
}
@@ -682,7 +672,7 @@ class e107plugin
// Handle prefs from arrays (mostly 0.7 stuff, possibly apart from the special cases)
function manage_plugin_prefs($action, $prefname, $plugin_folder, $varArray = '')
{ // These prefs are 'cumulative' - several plugins may contribute an array element
global $pref;
// global $pref;
/*
if ($prefname == 'plug_sc' || $prefname == 'plug_bb')
{ // Special cases - shortcodes and bbcodes - each plugin may contribute several elements
@@ -721,8 +711,12 @@ class e107plugin
{
$pref[$prefname] = substr($pref[$prefname], 1);
}
e107::getConfig('core')->setPref($pref);
e107::getConfig('core')->save();
// save_prefs(); //FIXME - should be a better way to do this.
e107::getConfig()->loadData($pref, false)->save(false, true);
// e107::getConfig()->loadData($pref, false)->save(false, true);
}
@@ -784,10 +778,9 @@ class e107plugin
{
unset($search_prefs['comments_handlers'][$eplug_folder]);
}
// $tmp = addslashes(serialize($search_prefs));
$tmp = e107::getArrayStorage()->WriteArray($search_prefs);
//TODO Use preference class instead of this.
$sql->db_Update("core", "e107_value = '{$tmp}' WHERE e107_name = 'search_prefs' ");
e107::getConfig('search')->setPref($search_prefs)->save();
}
function manage_notify($action, $eplug_folder)
@@ -1272,11 +1265,7 @@ class e107plugin
}
}
// save_prefs(); //FIXME replace with pref-class equivalent
e107::getConfig()->loadData($pref, false)->save(false, true);
e107::getConfig()->setPref($pref)->save(false);
if ($canContinue)
{ // Let's call any custom post functions defined in <management> section
@@ -1514,8 +1503,7 @@ class e107plugin
function save_addon_prefs() // scan the plugin table and create path-array-prefs for each addon.
{
$sql = e107::getDb();
$addpref = array();
$core = e107::getConfig('core');
// $query = "SELECT * FROM #plugin WHERE plugin_installflag = 1 AND plugin_addons !='' ORDER BY plugin_path ASC";
$query = "SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC";
@@ -1534,7 +1522,8 @@ class e107plugin
{
if(strpos($val, 'e_') === 0)
{
$addpref[$val."_list"][$path] = $path;
// $addpref[$val."_list"][$path] = $path;
$core->setPref($val.'_list/'.$path,$path);
}
}
}
@@ -1562,11 +1551,12 @@ class e107plugin
{
$bb_name = substr($adds, 0,-3); // remove the .bb
$bb_array[$bb_name] = "0"; // default userclass.
}
if($is_installed && (substr($adds,-4) == "_sql"))
{
$addpref['e_sql_list'][$path] = $adds;
$core->setPref('e_sql_list/'.$path,$adds);
}
}
@@ -1574,27 +1564,19 @@ class e107plugin
if(count($bb_array) > 0)
{
ksort($bb_array);
$addpref['bbcode_list'][$path] = $bb_array;
$core->setPref('bbcode_list/'.$path,$sc_array);
}
// Build shortcode list - do if uninstalled as well
if(count($sc_array) > 0)
{
ksort($sc_array);
$addpref['shortcode_list'][$path] = $sc_array;
$core->setPref('shortcode_list/'.$path,$sc_array);
}
}
}
// TODO Review pref-class method used below (a new function?), to simply add or update existing prefs. (without a global $pref)
foreach($addpref as $key=>$val)
{
e107::getConfig('core')->set($key,$val);
}
e107::getConfig('core')->save(FALSE);
$core->save(FALSE);
if($this->manage_icons())
{
@@ -1612,11 +1594,9 @@ class e107plugin
// $debug = 'check' - checks each file found for php tags - prints 'pass' or 'fail'
function getAddons($plugin_path, $debug=FALSE)
{
global $fl;
if(!is_object($fl)){
require_once(e_HANDLER.'file_class.php');
$fl = new e_file;
}
$fl = e107::getFile();
$p_addons = array();
$addonlist = $fl->get_files(e_PLUGIN.$plugin_path, "^e_.*\.php$", "standard", 1);
// print_a($addonlist);

View File

@@ -1,7 +1,7 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: lan_admin.php,v 1.27 2009-08-30 08:23:51 e107coders Exp $
* $Id: lan_admin.php,v 1.28 2009-09-06 20:04:03 e107coders Exp $
*
* Admin Language File
*/
@@ -180,7 +180,7 @@ define("ADLAN_158", "Cron Jobs and Automated Tasks");
define("ADLAN_159", "URL Configuration");
define("ADLAN_160", "Configure Site URLs");
define("ADLAN_161", "");
define("ADLAN_161", "Custom Fields?");
define("ADLAN_162", "A newer version of your site-theme is available:");
define("ADLAN_163", "A newer version of an installed plugin is available:");

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/footer_default.php,v $
| $Revision: 1.15 $
| $Date: 2009-07-12 02:29:24 $
| $Revision: 1.16 $
| $Date: 2009-09-06 20:04:04 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -67,7 +67,7 @@ if(varset($e107_popup)!=1)
//
// B.2 Send footer template, stop timing, send simple page stats
//
parseheader(($ph ? $cust_footer : $FOOTER));
parseheader((varset($ph) ? $cust_footer : $FOOTER));
$eTimingStop = microtime();
global $eTimingStart;

View File

@@ -9,8 +9,8 @@
* Installation file
*
* $Source: /cvs_backup/e107_0.8/install_.php,v $
* $Revision: 1.36 $
* $Date: 2009-09-05 12:48:28 $
* $Revision: 1.37 $
* $Date: 2009-09-06 20:04:04 $
* $Author: e107coders $
*
*/
@@ -302,11 +302,13 @@ class e_install
$this->template->SetTag("stage_pre", LANINS_002);
$this->template->SetTag("stage_num", LANINS_021);
$this->template->SetTag("stage_title", LANINS_022);
$this->template->SetTag("onload", "document.getElementById('name').focus()");
$page_info = nl2br(LANINS_023);
$e_forms->start_form("versions", $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING'] == "debug" ? "?debug" : ""));
$output = "
<br /><br />
<div style='width: 100%; padding-left: auto; padding-right: auto;'>
<br /><br />
<table cellspacing='0'>
<tr>
<td style='border-top: 1px solid #999;' class='row-border'><label for='server'>".LANINS_024."</label></td>
@@ -335,8 +337,9 @@ class e_install
<td class='row-border'>".LANINS_034."</td>
</tr>
</table>
<br /><br />
</div>
<br /><br />\n";
\n";
$e_forms->add_plain_html($output);
$this->finish_form();
$e_forms->add_button("submit", LANINS_035);
@@ -353,6 +356,9 @@ class e_install
$this->template->SetTag("installation_heading", LANINS_001);
$this->template->SetTag("stage_pre", LANINS_002);
$this->template->SetTag("stage_num", LANINS_036);
$this->template->SetTag("onload", "document.getElementById('name').focus()");
$this->previous_steps['mysql']['server'] = trim($_POST['server']);
$this->previous_steps['mysql']['user'] = trim($_POST['name']);
$this->previous_steps['mysql']['password'] = $_POST['password'];
@@ -367,7 +373,7 @@ class e_install
$e_forms->start_form("versions", $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING'] == "debug" ? "?debug" : ""));
$head = LANINS_039."<br /><br />\n";
$output = "
<br /><br />
<div style='width: 100%; padding-left: auto; padding-right: auto;'>
<table cellspacing='0'>
<tr>
@@ -377,7 +383,7 @@ class e_install
</tr>
<tr>
<td class='row-border'><label for='name'>".LANINS_025."</label></td>
<td class='row-border'><input class='tbox' type='text' name='name' id='name' size='40' value='{$this->previous_steps['mysql']['user']}' maxlength='100' /></td>
<td class='row-border'><input class='tbox' type='text' name='name' id='name' size='40' value='{$this->previous_steps['mysql']['user']}' maxlength='100' onload='this.focus()' /></td>
<td class='row-border'>".LANINS_031."</td>
</tr>
<tr>
@@ -402,8 +408,9 @@ class e_install
}
$output .= "
</table>
<br /><br />
</div>
<br /><br />\n";
\n";
$e_forms->add_plain_html($output);
$e_forms->add_button("submit", LANINS_035);
$this->template->SetTag("stage_title", LANINS_040);
@@ -596,6 +603,9 @@ class e_install
$this->template->SetTag("stage_pre", LANINS_002);
$this->template->SetTag("stage_num", LANINS_046);
$this->template->SetTag("stage_title", LANINS_047);
$this->template->SetTag("onload", "document.getElementById('u_name').focus()");
$e_forms->start_form("admin_info", $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING'] == "debug" ? "?debug" : ""));
$output = "
<div style='width: 100%; padding-left: auto; padding-right: auto;'>
@@ -626,8 +636,9 @@ class e_install
<td class='row-border'>".LANINS_081."</td>
</tr>
</table>
<br /><br />
</div>
<br /><br />\n";
\n";
$e_forms->add_plain_html($output);
$this->finish_form();
$e_forms->add_button("submit", LANINS_035);
@@ -708,6 +719,7 @@ class e_install
$this->template->SetTag("stage_pre", LANINS_002);
$this->template->SetTag("stage_num", LANINS_056);
$this->template->SetTag("stage_title", LANINS_117); // Website Preferences;
$this->template->SetTag("onload", "document.getElementById('sitename').focus()");
$e_forms->start_form("pref_info", $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING'] == "debug" ? "?debug" : ""));
@@ -725,7 +737,7 @@ class e_install
</tr>
<tr>
<td class='row-border'><label for='sitetheme'>".LANINS_109."</label><br />".LANINS_110."</td>
<td class='row-border'><label>".LANINS_109."</label><br />".LANINS_110."</td>
<td class='row-border'>
<table style='width:100%'>
<tr>
@@ -928,11 +940,22 @@ class e_install
define("e_LANGUAGE", $this->previous_steps['language']);
define('e_SELF', 'http://'.$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']);
$themeImportFile = array();
$themeImportFile[0] = $this->e107->e107_dirs['THEMES_DIRECTORY'].$this->previous_steps['prefs']['sitetheme']."/install.xml";
$themeImportFile[1] = $this->e107->e107_dirs['THEMES_DIRECTORY'].$this->previous_steps['prefs']['sitetheme']."/install/install.xml";
$themeImportFile[3] = $this->e107->e107_dirs['FILES_DIRECTORY']. "default_install.xml";
$themeImportFile = $this->e107->e107_dirs['THEMES_DIRECTORY'].$this->previous_steps['prefs']['sitetheme']."/install.xml";
if($this->previous_steps['generate_content']==1 && is_readable($themeImportFile))
if($this->previous_steps['generate_content']==1)
{
$XMLImportfile = $themeImportFile;
foreach($themeImportFile as $file)
{
if(is_readable($file))
{
$XMLImportfile = $file;
break;
}
}
}
else
{
@@ -985,12 +1008,7 @@ class e_install
$cookiename = str_replace(" ","_",$this->previous_steps['prefs']['sitename']);
$this->previous_steps['prefs']['cookie_name'] = substr($cookiename,0,5)."cookie";
// foreach($this->previous_steps['prefs'] as $key=>$val)
// {
// e107::getConfig('core')->set($key,$val);
// }
e107::getConfig('core')->setPref($this->previous_steps['prefs']);
e107::getConfig('core')->save(FALSE); // save preferences made during install.
@@ -1531,7 +1549,7 @@ function template_data()
<meta http-equiv=\"content-style-type\" content=\"text/css\" />
<link rel=\"stylesheet\" href=\"{installer_css_http}\" type=\"text/css\" />
</head>
<body>
<body onload=\"{onload}\">
<!-- Installer theme is a ripped version of 'Leaf' by Que, based on the nucleus cms theme by Ivan Fong aka Stanch. -->
<div id=\"header\">
<h1>{installation_heading}</h1>