Skip to content

Commit 05a3a91

Browse files
xh3n1Sam Tuke
authored andcommitted
Add checkupdate time on first install and check if its a dev version
Signed-off-by: Xheni Myrtaj <[email protected]>
1 parent b38c7e7 commit 05a3a91

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

public_html/lists/admin/index.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -520,32 +520,34 @@ function mb_strtolower($string)
520520
echo Info($GLOBALS['I18N']->get('Running in testmode, no emails will be sent. Check your config file.'));
521521
}
522522

523-
$updaterdir = __DIR__ . '/../updater';
523+
if (!strpos(VERSION, 'dev')){
524524

525-
include 'updatelib.php';
525+
$updaterdir = __DIR__ . '/../updater';
526526

527-
if (showUpdateNotification()) {
527+
include 'updateLib.php';
528528

529-
try {
529+
if (showUpdateNotification()) {
530+
try {
530531

531-
$updateNotif = checkForUpdate('init.php');
532+
$updateNotif = checkForUpdate('init.php');
532533

533-
} catch (Exception $e) {
534+
} catch (Exception $e) {
534535

535-
echo s('Error: '), $e->getMessage(), "\n";
536+
echo s('Error: '), $e->getMessage(), "\n";
536537

537-
}
538+
}
538539

539-
$moreInfo = '<a href="https://www.phplist.com/download?utm_source=pl'.VERSION.'&amp;utm_medium=updatedownload&amp;utm_campaign=phpList" title="'.s('Download the new version').'" target="_blank">'.s('Download the new version').'</a>';
540+
$moreInfo = '<a href="https://www.phplist.com/download?utm_source=pl' . VERSION . '&amp;utm_medium=updatedownload&amp;utm_campaign=phpList" title="' . s('Download the new version') . '" target="_blank">' . s('Download the new version') . '</a>';
540541

541-
if (file_exists($updaterdir) && ALLOW_UPDATER) {
542+
if (file_exists($updaterdir) && ALLOW_UPDATER) {
542543

543-
$moreInfo.= s(' or update').' <a href="?page=redirecttoupdater" title="'.s('automatic updater').'">'.s('here.').'</a>';
544-
}
544+
$moreInfo .= s(' or update') . ' <a href="?page=redirecttoupdater" title="' . s('automatic updater') . '">' . s('here.') . '</a>';
545+
}
545546

546-
if ($updateNotif!== '') {
547+
if ($updateNotif !== '') {
547548

548-
Info($updateNotif.''.$moreInfo);
549+
Info($updateNotif . '' . $moreInfo);
550+
}
549551
}
550552
}
551553

public_html/lists/admin/initialise.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ function output($message)
193193
SaveConfig('message_from_address', $adminemail);
194194
SaveConfig('message_from_name', strip_tags($_REQUEST['adminname']));
195195
SaveConfig('message_replyto_address', $adminemail);
196+
SaveConfig('lastcheckupdate', date('m/d/Y h:i:s', time()), 0, true);
196197

197198
if (!empty($_REQUEST['orgname'])) {
198199
SaveConfig('organisation_name', strip_tags($_REQUEST['orgname']), 1);

0 commit comments

Comments
 (0)