mirror of
https://github.com/e107inc/e107.git
synced 2025-08-25 23:36:29 +02:00
PHP warning fixes.
This commit is contained in:
@@ -31,7 +31,7 @@ TODO:
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
/*
|
||||
|
||||
define('AUTH_SUCCESS', -1);
|
||||
define('AUTH_NOUSER', 1);
|
||||
@@ -39,7 +39,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
define('AUTH_NOCONNECT', 3);
|
||||
define('AUTH_UNKNOWN', 4);
|
||||
define('AUTH_NOT_AVAILABLE', 5);
|
||||
|
||||
*/
|
||||
|
||||
require_once(e_HANDLER.'user_extended_class.php');
|
||||
require_once(e_PLUGIN.'alt_auth/alt_auth_login_class.php'); // Has base methods class
|
||||
@@ -562,7 +562,11 @@ function alt_auth_adminmenu()
|
||||
{
|
||||
$authlist = alt_auth_admin::alt_auth_get_authlist();
|
||||
}
|
||||
define('ALT_AUTH_ACTION', 'main');
|
||||
|
||||
if(!defined('ALT_AUTH_ACTION'))
|
||||
{
|
||||
define('ALT_AUTH_ACTION', 'main');
|
||||
}
|
||||
|
||||
$var['main']['text'] = LAN_ALT_31;
|
||||
$var['main']['link'] = e_PLUGIN . 'alt_auth/alt_auth_conf.php';
|
||||
|
@@ -182,7 +182,7 @@ $text .= "<option value='1' {$sel} >".LAN_ALT_FALLBACK."</option>
|
||||
<td>".LAN_ALT_8.":<br />
|
||||
|
||||
</td>
|
||||
<td>".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', $pref['auth_method2'], 'none')."
|
||||
<td>".$altAuthAdmin->alt_auth_get_dropdown('auth_method2', varset($pref['auth_method2']), 'none')."
|
||||
<div class='smalltext field-help'>".LAN_ALT_9."</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ if ($euf->userCount)
|
||||
<td class='center'><input type='checkbox' name='auth_euf_include[]' value='{$f['user_extended_struct_name']}'{$checked} /></td>
|
||||
<td>{$f['user_extended_struct_name']}</td>
|
||||
<td>".$tp->toHTML($f['user_extended_struct_text'],FALSE,'TITLE')."</td>
|
||||
<td>{$euf->user_extended_types[$f['user_extended_struct_type']]}</td></tr>\n";
|
||||
<td>". varset($euf->user_extended_types[$f['user_extended_struct_type']])."</td></tr>\n";
|
||||
}
|
||||
$text .= "</tbody>
|
||||
</table><div class='buttons-bar center'>
|
||||
|
@@ -26,14 +26,23 @@ define('AA_DEBUG1',FALSE);
|
||||
|
||||
|
||||
//TODO convert to class constants (but may be more useful as globals, perhaps within a general login manager scheme)
|
||||
define('AUTH_SUCCESS', -1);
|
||||
define('AUTH_NOUSER', 1);
|
||||
define('AUTH_BADPASSWORD', 2);
|
||||
define('AUTH_NOCONNECT', 3);
|
||||
define('AUTH_UNKNOWN', 4);
|
||||
define('AUTH_NOT_AVAILABLE', 5);
|
||||
define('AUTH_NORESOURCE', 6); // Used to indicate, for example, that a required PHP module isn't loaded
|
||||
$authConst = array(
|
||||
'AUTH_SUCCESS' => -1,
|
||||
'AUTH_NOUSER' => 1,
|
||||
'AUTH_BADPASSWORD' => 2,
|
||||
'AUTH_NOCONNECT' => 3,
|
||||
'AUTH_UNKNOWN' => 4,
|
||||
'AUTH_NOT_AVAILABLE' => 5,
|
||||
'AUTH_NORESOURCE' => 6, // Used to indicate => for example => that a required PHP module isn't loaded
|
||||
);
|
||||
|
||||
foreach($authConst as $def => $val)
|
||||
{
|
||||
if(!defined($def))
|
||||
{
|
||||
define($def, $val);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods used by a number of alt_auth classes.
|
||||
|
@@ -97,30 +97,30 @@ $text = "
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".CHBLAN_11.":</td>
|
||||
<td>".$frm->select('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'],'useValues=1')."<span class='field-help'>".CHBLAN_12."</span></td>
|
||||
<td>".$frm->select('chatbox_posts', array(5, 10, 15, 20, 25), varset($pref['chatbox_posts']),'useValues=1')."<span class='field-help'>".CHBLAN_12."</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".CHBLAN_32.": </td>
|
||||
<td>". r_userclass("cb_mod", $pref['cb_mod'], 'off', "nobody,main,admin, classes")."</td>
|
||||
<td>". r_userclass("cb_mod", varset($pref['cb_mod']), 'off', "nobody,main,admin, classes")."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".CHBLAN_36."</td>
|
||||
<td>".$frm->radio('cb_layer', array(0 => CHBLAN_37, 1 => str_replace("[x]", $frm->number('cb_layer_height', $pref['cb_layer_height'], 3), CHBLAN_29), 2 => CHBLAN_38), $pref['cb_layer'], array('sep' => '<br />'))."</td>
|
||||
<td>".$frm->radio('cb_layer', array(0 => CHBLAN_37, 1 => str_replace("[x]", $frm->number('cb_layer_height', varset($pref['cb_layer_height']), 3), CHBLAN_29), 2 => CHBLAN_38), varset($pref['cb_layer']), array('sep' => '<br />'))."</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
if($pref['smiley_activate'])
|
||||
if(!empty($pref['smiley_activate']))
|
||||
{
|
||||
$text .= "<tr>
|
||||
<td>".CHBLAN_31."?: </td>
|
||||
<td>".$frm->radio_switch('cb_emote', $pref['cb_emote'])."</td>
|
||||
<td>".$frm->radio_switch('cb_emote', varset($pref['cb_emote']))."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".CHBLAN_42."</td>
|
||||
<td>".$frm->radio_switch('cb_user_addon', $pref['cb_user_addon'])."</td>
|
||||
<td>".$frm->radio_switch('cb_user_addon', varset($pref['cb_user_addon']))."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_PRUNE.":</td>
|
||||
|
@@ -538,11 +538,12 @@ $columnInfo = array(
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
function orphanFiles() //TODO
|
||||
{
|
||||
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$files = e107::getFile()->get_files(e_DOWNLOAD);
|
||||
$foundSome = false;
|
||||
foreach($files as $file)
|
||||
@@ -569,7 +570,7 @@ $columnInfo = array(
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
@@ -734,7 +735,7 @@ $columnInfo = array(
|
||||
|
||||
|
||||
|
||||
function showMaint() //XXX Deprecated.
|
||||
function showMaint()
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$mes->addInfo("Deprecated Area - please use filter instead under 'Manage' ");
|
||||
@@ -742,6 +743,7 @@ $columnInfo = array(
|
||||
global $pref;
|
||||
$ns = e107::getRender();
|
||||
$sql = e107::getDb();
|
||||
$sql2 = e107::getDb('sql2');
|
||||
$frm = e107::getForm();
|
||||
$tp = e107::getParser();
|
||||
|
||||
@@ -790,7 +792,7 @@ $columnInfo = array(
|
||||
$text .= '<td>*</td>';
|
||||
}
|
||||
$text .= '<td>'.$row['download_id'].'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
|
||||
$text .= '<td>
|
||||
<a href="'.e_SELF.'?create.edit.'.$row["download_id"].'.maint.duplicates">'.ADMIN_EDIT_ICON.'</a>
|
||||
@@ -928,8 +930,8 @@ $columnInfo = array(
|
||||
|
||||
$text .= '<tr>';
|
||||
$text .= '<td>'.$row['download_id'].'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
|
||||
if (strlen($row['download_url']) > 0) {
|
||||
$text .= '<td>'.$row['download_url'].'</td>';
|
||||
} else {
|
||||
@@ -981,9 +983,9 @@ $columnInfo = array(
|
||||
}
|
||||
$text .= '<tr>';
|
||||
$text .= '<td>'.$row['download_id'].'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
|
||||
if (strlen($row['download_url']) > 0) {
|
||||
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
|
||||
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
|
||||
} else {
|
||||
$mirrorArray = download::makeMirrorArray($row['download_mirror'], TRUE);
|
||||
$text .= '<td>';
|
||||
@@ -1037,9 +1039,9 @@ $columnInfo = array(
|
||||
}
|
||||
$text .= '<tr>';
|
||||
$text .= '<td>'.$row['download_id'].'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$e107->tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= '<td>'.$e107->tp->toHTML($row['download_category_name']).'</td>';
|
||||
$text .= '<td>'.$e107->tp->toHTML($row['download_url']).'</td>';
|
||||
$text .= "<td><a href='".e_PLUGIN."download/download.php?view.".$row['download_id']."'>".$tp->toHTML($row['download_name']).'</a></td>';
|
||||
$text .= '<td>'.$tp->toHTML($row['download_category_name']).'</td>';
|
||||
$text .= '<td>'.$tp->toHTML($row['download_url']).'</td>';
|
||||
$text .= '<td>'.$row['download_filesize'].' / ';
|
||||
$text .= $filesize;
|
||||
$text .= '</td>';
|
||||
@@ -1883,7 +1885,7 @@ $columnInfo = array(
|
||||
|
||||
$dlInfo['download_id'] = $id;
|
||||
$this->downloadLog('DOWNL_06',$dlInfo,$dlMirrors);
|
||||
$dlInfo['download_datestamp'] = $time; // This is what 0.7 did, regardless of settings
|
||||
$dlInfo['download_datestamp'] = time(); // $time; // This is what 0.7 did, regardless of settings
|
||||
unset($dlInfo['download_class']); // Also replicating 0.7
|
||||
$e_event->trigger('dlupdate', $dlInfo); // @deprecated
|
||||
|
||||
@@ -1903,7 +1905,7 @@ $columnInfo = array(
|
||||
|
||||
$dlInfo['download_id'] = $download_id;
|
||||
$this->downloadLog('DOWNL_05',$dlInfo,$dlMirrors);
|
||||
$dlInfo['download_datestamp'] = $time; // This is what 0.7 did, regardless of settings
|
||||
$dlInfo['download_datestamp'] = time(); // $time; // This is what 0.7 did, regardless of settings
|
||||
unset($dlInfo['download_class']); // Also replicating 0.7
|
||||
$e_event->trigger("dlpost", $dlInfo); // @deprecated
|
||||
|
||||
|
@@ -7,6 +7,7 @@ if(!e107::isInstalled('poll'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$poll_active = false;
|
||||
|
||||
if(e107::getPlugPref('forum', 'poll') != '255')
|
||||
{
|
||||
|
@@ -440,11 +440,11 @@ class hero_form_ui extends e_admin_form_ui
|
||||
$val = varset($value[$v], array());
|
||||
|
||||
$text .= "<tr>
|
||||
<td class='text-center'>".$this->glyphPicker($name.'[icon]', $val['icon'])."</td>
|
||||
<td>".$this->btnClass($name.'[icon_style]', $val['icon_style'])."</td>
|
||||
<td>".$this->textarea($name.'[text]',$val['text'],1,80,array('size'=>'block-level'))."</td>
|
||||
<td>".$this->select($name.'[animation]',$optAnimation, $val['animation'], array( 'useValues'=>1), true)."</td>
|
||||
<td>".$this->select($name.'[animation_delay]',$optDelay, $val['animation_delay'], array('size'=>'small'), true)."</td>
|
||||
<td class='text-center'>".$this->glyphPicker($name.'[icon]', varset($val['icon']))."</td>
|
||||
<td>".$this->btnClass($name.'[icon_style]', varset($val['icon_style']))."</td>
|
||||
<td>".$this->textarea($name.'[text]', varset($val['text']),1,80,array('size'=>'block-level'))."</td>
|
||||
<td>".$this->select($name.'[animation]',$optAnimation, varset($val['animation']), array( 'useValues'=>1), true)."</td>
|
||||
<td>".$this->select($name.'[animation_delay]',$optDelay, varset($val['animation_delay']), array('size'=>'small'), true)."</td>
|
||||
</tr>";
|
||||
|
||||
}
|
||||
@@ -511,10 +511,10 @@ class hero_form_ui extends e_admin_form_ui
|
||||
|
||||
|
||||
$text .= "<tr>
|
||||
<td class='text-center'>".$this->glyphPicker($name.'[icon]', $val['icon'])."</td>
|
||||
<td>".$this->text($name.'[label]',$val['label'],255,array('size'=>'block-level', 'placeholder'=>'Label'))."</td>
|
||||
<td> ".$this->text($name.'[url]',$val['url'],255,array('size'=>'block-level', 'placeholder'=>'URL'))."</td>
|
||||
<td> ".$this->btnClass($name.'[class]', $val['class'])."</td>
|
||||
<td class='text-center'>".$this->glyphPicker($name.'[icon]', varset($val['icon']))."</td>
|
||||
<td>".$this->text($name.'[label]', varset($val['label']), 255, array('size'=>'block-level', 'placeholder'=>'Label'))."</td>
|
||||
<td> ".$this->text($name.'[url]', varset($val['url']), 255, array('size'=>'block-level', 'placeholder'=>'URL'))."</td>
|
||||
<td> ".$this->btnClass($name.'[class]', varset($val['class']))."</td>
|
||||
</tr>";
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user