Skip to content

Commit

Permalink
Revert "More php82 fixes (#940)"
Browse files Browse the repository at this point in the history
This reverts commit daa31c7.
  • Loading branch information
marianaballa authored Aug 18, 2023
1 parent 41090df commit 5616940
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 25 deletions.
7 changes: 0 additions & 7 deletions public_html/lists/admin/actions/listmembercount.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ function listMemberCounts($listId)
$join"
);
$counts = Sql_Fetch_Assoc($req);
if (empty($counts)) {
$counts = [
'confirmed' => 0,
'notconfirmed' => 0,
'blacklisted' => 0,
];
}
$membersDisplay = sprintf(
'<span class="memberCount text-success" title="%s">%s</span>'.' ('
.'<span class="unconfirmedCount text-warning" title="%s">%s</span>, '.' '
Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/actions/msgstatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
$msgperhour = (int) (3600 / $totaltime) * $sent;
$secpermsg = $totaltime / $sent;
$timeleft = ($num_users - $sent) * $secpermsg;
$eta = date('D j M H:i', time() + (int)$timeleft);
$eta = date('D j M H:i', time() + $timeleft);
} else {
$msgperhour = 0;
$secpermsg = 0;
Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function warn() {
}

echo '<label>'.s('Default Value').':</label>
<input type="text" name="default[' .$row['id'].']" value="'.htmlspecialchars(stripslashes((string)$row['default_value'])).'" size="40" />';
<input type="text" name="default[' .$row['id'].']" value="'.htmlspecialchars(stripslashes($row['default_value'])).'" size="40" />';
echo '<label>'.s('Order of Listing').':</label>
<input type="text" name="listorder[' .$row['id'].']" value="'.$row['listorder'].'" size="5" />';
echo '<label>'.s('Is this attribute required ?').'<input type="checkbox" name="required['.$row['id'].']" value="1" ';
Expand Down
9 changes: 2 additions & 7 deletions public_html/lists/admin/defaultplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ class phplistPlugin
*/
public $pageTitles = array();

/**
* dependencyFailure holds the reason the plugin cannot be initialised
*/

/**
* dependency check
*
Expand Down Expand Up @@ -302,7 +297,7 @@ public function deleteSent()
* write a value to the general config to be retrieved at a later stage
* parameters: name -> name of the variable
* value -> value of the variablesiable, can be a scalar, array or object
* returns success or failure
* returns success or failure $store = '';
*/
public function writeConfig($name, $value)
{
Expand All @@ -314,7 +309,7 @@ public function writeConfig($name, $value)
Sql_Query(sprintf('replace into %s set item = "%s-%s",value="%s",editable=0', $GLOBALS['tables']['config'],
$this->name, addslashes($name), addslashes($store)));
//# force refresh of config in session
unset($_SESSION['config'][$this->name.'-'.addslashes($name)]);
unset($_SESSION['config']);

return 1;
}
Expand Down
2 changes: 0 additions & 2 deletions public_html/lists/admin/inc/userlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,7 @@ function UserAttributeValue($user = 0, $attribute = 0)
$att_table = 'attribute';
$user_att_table = 'user_attribute';
}
$value = "";
$att = Sql_Fetch_array_Query("select * from $att_table where id = $attribute");
if (!empty($att))
switch ($att['type']) {
case 'checkboxgroup':
// print "select value from $user_att_table where userid = $user and attributeid = $attribute";
Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function loadMessageData($msgid)

//# can't do "ungreedy matching, in case the URL has placeholders, but this can potentially
//# throw problems
if (!empty($messagedata['message']) && preg_match('/\[URL:(.*)\]/i', $messagedata['message'], $regs)) {
if (preg_match('/\[URL:(.*)\]/i', $messagedata['message'], $regs)) {
$messagedata['sendurl'] = $regs[1];
}
}
Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function listMemberCounts($listId)

if (isset($_POST['listorder']) && is_array($_POST['listorder'])) {
foreach ($_POST['listorder'] as $key => $val) {
$active = sprintf('%d', !empty($_POST['active'][$key]));
$active = sprintf('%d', $_POST['active'][$key]);
$active = $active || listUsedInSubscribePage($key);
$query = sprintf('update %s set listorder = %d, active = %d where id = %d', $tables['list'], $val, $active,
$key);
Expand Down
2 changes: 1 addition & 1 deletion public_html/lists/admin/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@

// Make statistical integers human readable
foreach ($viewStats as $key => $value) {
$viewStatsFormatted[$key] = number_format((int)$value);
$viewStatsFormatted[$key] = number_format($value);
}
$resultStats = '
<table class="messagesendstats">
Expand Down
4 changes: 0 additions & 4 deletions public_html/lists/admin/send_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@
include dirname(__FILE__).'/actions/storemessage.php';
}

if (empty($messagedata['message'])) {
$messagedata['message'] = "";
}

$htmlformatted = strip_tags($messagedata['message']) != $messagedata['message'];

// sanitise the header fields, what else do we need to check on?
Expand Down

0 comments on commit 5616940

Please sign in to comment.