1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

PHP8 Plugin code cleanup

This commit is contained in:
Cameron
2021-01-21 09:38:38 -08:00
parent 9e0d014e39
commit f055b49d91
83 changed files with 753 additions and 675 deletions

View File

@@ -17,7 +17,7 @@
| Based on code by: Thomas Bouve (crahan@gmx.net)
*/
require_once("../../class2.php");
require_once(__DIR__."/../../class2.php");
require_once(e_HANDLER."userclass_class.php");
e107::includeLan(e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php");
@@ -74,6 +74,8 @@ $end_year = $cur_year;
$year_selector = "<div class='forumheader' style='text-align: center; margin-bottom: 2px;'>";
$year_selector .= "".BLOGCAL_ARCHIV1.": <select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>\n";
$day_links = array();
for($i = $start_year; $i <= $end_year; $i++)
{
$start = mktime(0, 0, 0, 1, 1, intval($req_year));
@@ -148,7 +150,7 @@ for($i = 1; $i <= 12; $i++)
{
$req_day = "";
}
$archive .= "<div>".calendar($req_day, $i, $req_year, $day_links[$i], $pref['blogcal_ws'])."</div></td>\n";
$archive .= "<div>".calendar($req_day, $i, $req_year, varset($day_links[$i]), $pref['blogcal_ws'])."</div></td>\n";
}
$archive .= "</tr></table></div>";

View File

@@ -10,7 +10,7 @@
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
require_once(__DIR__.'/../../class2.php');
require_once(e_HANDLER."userclass_class.php");
e107::includeLan(e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php");
@@ -49,8 +49,7 @@ $text = "
<select class='tbox' name='blogcal_mpr'>";
// if the nr of months per row is undefined, default to 3
$months_per_row = $pref['blogcal_mpr']?$pref['blogcal_mpr']:
"3";
$months_per_row = isset($pref['blogcal_mpr']) ? $pref['blogcal_mpr']: 3;
for($i = 1; $i <= 12; $i++) {
$text .= "<option value='$i'";
$text .= $months_per_row == $i?"selected":
@@ -66,8 +65,7 @@ $text = "
<td>".BLOGCAL_CONF2.": </td>
<td><input class='tbox' type='text' name='blogcal_padding' size='20' value='";
// if the cellpadding isn't defined
$padding = $pref['blogcal_padding']?$pref['blogcal_padding']:
"2";
$padding = isset($pref['blogcal_padding']) ? $pref['blogcal_padding'] : 2;
$text .= $padding;
$text .= "' maxlength='100' />
</td>