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

PHP 7.3 Notice/Warning Fixes.

This commit is contained in:
Cameron
2019-05-27 10:45:35 -07:00
parent eb6401385e
commit 783be29953
10 changed files with 42 additions and 26 deletions

View File

@@ -54,7 +54,7 @@ if (isset($_POST['active']))
}
e107::getRender()->tablerender($caption, $mes->render() . $text);
//e107::getRender()->tablerender($caption, $mes->render() . $text);
/* get packs */
require_once(e_HANDLER."file_class.php");
@@ -102,7 +102,7 @@ foreach($filtered as $key => $value)
}
}
$ns->tablerender($caption, $mes->render() . $text);
// $ns->tablerender($caption, $mes->render() . $text);
$check = TRUE;

View File

@@ -721,7 +721,7 @@ class theme_admin_tree_model extends e_tree_model
* Load data from theme meta file.
* @param bool $force
*/
function load()
function load($force=false)
{
$themeList = e107::getTheme()->getList();
$newArray = array();
@@ -786,7 +786,7 @@ class theme_admin_online_tree_model extends e_tree_model
* Load data from theme meta file.
* @param bool $force
*/
function load()
function load($force=false)
{
$themeList = e107::getTheme()->getList();

View File

@@ -301,10 +301,12 @@ if (!function_exists('asortbyindex'))
}
asort ($sort_values);
reset ($sort_values);
while (list ($arr_key, $arr_val) = each ($sort_values))
foreach($sort_values as $arr_key =>$arr_val)
{
$sorted_arr[] = $array[$arr_key];
}
return $sorted_arr;
}
}

View File

@@ -441,7 +441,7 @@ abstract class e_marketplace_adapter_abstract
$remotefile = $this->downloadUrl."?auth=".$this->getAuthKey()."&".$qry;
$localfile = md5($remotefile.time()).".zip";
$mes->addSuccess(TPVLAN_81);
$mes->addSuccess(LAN_DOWNLOADING."...");
// FIXME call the service, check status first, then download (if status OK), else retireve the error break and show it
@@ -479,7 +479,8 @@ abstract class e_marketplace_adapter_abstract
if($fl->unzipArchive($localfile,$type, true))
{
$mes->addSuccess(TPVLAN_82);
$lan = defset('LAN_DOWNLOAD_COMPLETE', 'Download Complete!');
$mes->addSuccess($lan);
return true;
}
else

View File

@@ -5521,7 +5521,7 @@ var_dump($select_options);*/
break;
case 'method': // Custom Function
$method = $attributes['field']; // prevents table alias in method names. ie. u.my_method.
$method = varset($attributes['field']); // prevents table alias in method names. ie. u.my_method.
$_value = $value;
if(!empty($attributes['data']) && $attributes['data'] == 'array') // FIXME @SecretR - please move this to where it should be.

View File

@@ -577,7 +577,7 @@ class e_menuManager {
$menu_perm['mainadmin'] = e_UC_MAINADMIN;
$menu_perm['admin'] = e_UC_ADMIN;
$menu_perm['nobody'] = e_UC_NOBODY;
$link_class = ($menu_perm[$link_class]) ? $menu_perm[$link_class] : e_UC_PUBLIC;
$link_class = isset($menu_perm[$link_class]) ? $menu_perm[$link_class] : e_UC_PUBLIC;
return $link_class;
}
@@ -926,11 +926,13 @@ class e_menuManager {
$areaID = $menus['@attributes']['id'];
foreach($menus['menu'] as $k=>$v)
{
$perm = isset($v['@attributes']['perm']) ? $v['@attributes']['perm'] : null;
$menuArea[] = array(
'menu_location' => $areaID,
'menu_order' => $k,
'menu_name' => $v['@attributes']['name']."_menu",
'menu_class' => $this->menuPresetPerms($v['@attributes']['perm'])
'menu_class' => $this->menuPresetPerms($perm)
);
}
}

View File

@@ -613,7 +613,7 @@ class e_theme
public static function parse_theme_php($path)
{
$CUSTOMPAGES = "";
$CUSTOMPAGES = null;
$tp = e107::getParser(); // could be used by a theme file.
$sql = e107::getDb(); // could be used by a theme file.
@@ -2038,7 +2038,7 @@ class themeHandler
}
$tdClass = !empty($val['writeParms']['post']) ? 'form-inline' : '';
$text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, $value[$field], $val)."<div class='field-help'>".$val['help']."</div></td></tr>";
$text .= "<tr><td><b>".$val['title']."</b>:</td><td class='".$tdClass."' colspan='2'>".$frm->renderElement($field, $value[$field], $val)."<div class='field-help'>".varset($val['help'])."</div></td></tr>";
}
}
@@ -2115,12 +2115,14 @@ class themeHandler
$frm = e107::getForm();
$tp = e107::getParser();
$author = ($theme['email'] ? "<a href='mailto:".$theme['email']."' title='".$theme['email']."'>".$theme['author']."</a>" : $theme['author']);
$website = ($theme['website'] ? "<a href='".$theme['website']."' rel='external'>".$theme['website']."</a>" : "");
// $preview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
$main_icon = ($pref['sitetheme'] != $theme['path']) ? "<button class='btn btn-default btn-secondary btn-small btn-sm btn-inverse' type='submit' name='selectmain[".$theme['id']."]' alt=\"".TPVLAN_10."\" title=\"".TPVLAN_10."\" >".$tp->toGlyph('fa-home',array('size'=>'2x'))."</button>" : "<button class='btn btn-small btn-default btn-secondary btn-sm btn-inverse' type='button'>".$tp->toGlyph('fa-check',array('size'=>'2x'))."</button>";
// $info_icon = "<a data-toggle='modal' data-target='".e_SELF."' href='#themeInfo_".$theme['id']."' class='e-tip' title='".TPVLAN_7."'><img src='".e_IMAGE_ABS."admin_images/info_32.png' alt='' class='icon S32' /></a>";
$info_icon = "<a class='btn btn-default btn-secondary btn-small btn-sm btn-inverse e-modal' data-modal-caption=\"".$theme['name']." ".$theme['version']."\" href='".e_SELF."?mode=".$_GET['mode']."&id=".$theme['path']."&action=info' title='".TPVLAN_7."'>".$tp->toGlyph('fa-info-circle',array('size'=>'2x'))."</a>";
$info_icon = "<a class='btn btn-default btn-secondary btn-small btn-sm btn-inverse e-modal' data-modal-caption=\"".$theme['name']." ".$theme['version']."\" href='".e_SELF."?mode=".varset($_GET['mode'])."&id=".$theme['path']."&action=info' title='".TPVLAN_7."'>".$tp->toGlyph('fa-info-circle',array('size'=>'2x'))."</a>";
// $preview_icon = "<a title='Preview : ".$theme['name']."' rel='external' class='e-dialog' href='".e_BASE."index.php?themepreview.".$theme['id']."'>".E_32_SEARCH."</a>";
$admin_icon = ($pref['admintheme'] != $theme['path'] ) ? "<button class='btn btn-default btn-secondary btn-small btn-sm btn-inverse' type='submit' name='selectadmin[".$theme['id']."]' alt=\"".TPVLAN_32."\" title=\"".TPVLAN_32."\" >".$tp->toGlyph('fa-gears',array('size'=>'2x'))."</button>" : "<button class='btn btn-small btn-default btn-secondary btn-sm btn-inverse' type='button'>".$tp->toGlyph('fa-check',array('size'=>'2x'))."</button>";
@@ -2670,9 +2672,10 @@ class themeHandler
unset($detected[$vl['name']]);
}
switch($mode)
// frontend
if($mode === self::RENDER_SITEPREFS)
{
case 1: // frontend
if(substr($vl['name'], 0, 6) == "admin_")
{
@@ -2692,10 +2695,10 @@ class themeHandler
continue;
}
break;
case 2: // admin
}
if($mode === self::RENDER_ADMINPREFS)
{
if($vl['name'] == "style.css" || empty($vl['info'])) // Hide the admin css unless it has a header. eg. /* info: Default stylesheet */
{
@@ -2716,11 +2719,11 @@ class themeHandler
{
$remove[$k] = $vl['name'];
}
break;
}
}
foreach($remove as $k=>$file)
@@ -2838,6 +2841,14 @@ class themeHandler
{
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_theme.php");
$text = "<br /><div class='indent'>".TPVLAN_1.".</div><br />";
$srch = array(
'{PREVIEWTHEMENAME}' => PREVIEWTHEMENAME,
'{e_ADMIN}' => e_ADMIN
);
$text = str_replace(array_keys($srch),$srch,$text);
global $ns;
$ns->tablerender(TPVLAN_2, $text);
}

View File

@@ -564,3 +564,5 @@ define("LAN_SUCC_RECALCULATE_COMMENT_COUNT", "Comment count successfully recalcu
define("LAN_NO_RESULTS_FOUND", "No Results Found.");
define("LAN_UI_DROPZONE_DROP_FILES", "Drop files here to upload");
define("LAN_DOWNLOAD_COMPLETE", "Download Complete!");

View File

@@ -271,8 +271,7 @@ define ("EPL_ADLAN_229","Refresh");
define ("EPL_ADLAN_230", "Downloading and Installing: ");
define ("EPL_ADLAN_231", "Remove icons from Media-Manager");
define ("EPL_ADLAN_232", "Create Files");
define ("TPVLAN_81", "Downloading...");
define ("TPVLAN_82", "Download Complete!");
define ("EPL_ADLAN_233", "Adding Link:");
define ("EPL_ADLAN_234", "Removing Link:");
define ("EPL_ADLAN_235", "Automated download not possible.");

View File

@@ -5,7 +5,7 @@
* Theme manager language file
*/
define("TPVLAN_1", "You are looking at a preview of the <b>'".PREVIEWTHEMENAME."'</b> theme. It has not been set as the main theme for your site, it has been activated to provide a preview of how the theme looks.<br />To set this theme as your site theme, <a href='".e_ADMIN."theme.php?choose'>return to your theme manager</a> and select 'Set As Site Theme'.<br />To preview more themes please <a href='".e_ADMIN."theme.php'>click here</a>");
define("TPVLAN_1", "You are looking at a preview of the <b>{PREVIEWTHEMENAME}</b> theme. It has not been set as the main theme for your site, it has been activated to provide a preview of how the theme looks.<br />To set this theme as your site theme, <a href='{e_ADMIN}theme.php?choose'>return to your theme manager</a> and select 'Set As Site Theme'.<br />To preview more themes please <a href='{e_ADMIN}theme.php'>click here</a>");
define("TPVLAN_2", "Theme Preview");
define("TPVLAN_3", "Site theme changed.");
//define("TPVLAN_4", "Author");//LAN_AUTHOR
@@ -114,8 +114,7 @@ define("TPVLAN_CONV_15", "Give this stylesheet a name");
define("TPVLAN_CONV_16", "URL to a live-demo of this theme.");
//marketplace
define("TPVLAN_81","Downloading...");
define("TPVLAN_82","Download Complete!");
define("TPVLAN_83","Automated download not possible!");
define("TPVLAN_84","[Please Download Manually]");
define("TPVLAN_85","Connecting...");