diff --git a/cronjobs/tables_cleanup.php b/cronjobs/tables_cleanup.php index b47918ae2..c2f42780e 100755 --- a/cronjobs/tables_cleanup.php +++ b/cronjobs/tables_cleanup.php @@ -59,7 +59,7 @@ } $log->logInfo(sprintf($strLogMask, 'cleanupTokens', $affected, number_format(microtime(true) - $start, 3), $status, $message)); -// Clenaup shares archive +// Cleanup shares archive $start = microtime(true); $status = 'OK'; $message = ''; @@ -73,7 +73,7 @@ } $log->logInfo(sprintf($strLogMask, 'purgeArchive', $affected, number_format(microtime(true) - $start, 3), $status, $message)); -// Clenaup shares archive +// Cleanup shares archive $start = microtime(true); $status = 'OK'; $message = ''; diff --git a/include/classes/csrftoken.class.php b/include/classes/csrftoken.class.php index 373a1210a..130b42807 100644 --- a/include/classes/csrftoken.class.php +++ b/include/classes/csrftoken.class.php @@ -16,19 +16,22 @@ public function getBasic($user, $type) { } /** - * Returns +1 min and +1 hour rollovers hashes + * Returns +1 min up to +15 min rollovers hashes * @param string $user user or IP/host address * @param string $type page name or other unique per-page identifier - * @return array 1min and 1hour hashes + * @return array 1 minute ago up to 15 minute ago hashes */ + public function checkAdditional($user, $type) { $date = date('m/d/y/H/i'); $d = explode('/', $date); - // minute may have rolled over - $seed1 = $this->buildSeed($user.$type, $d[0], $d[1], $d[2], $d[3], ($d[4]-1)); - // hour may have rolled over - $seed2 = $this->buildSeed($user.$type, $d[0], $d[1], $d[2], ($d[3]-1), 59); - return array($this->getHash($seed1), $this->getHash($seed2)); + $hashes = array(); + for ($x = 1; $x < 16; $x++){ + for ($y = 4;$d[$y]-- == 0;$y--); + if ($d[4] < 0) { $d[4] = 59; } + $hashes[$x-1] = $this->getHash($this->buildSeed($user.$type, $d[0], $d[1], $d[2], $d[3], $d[4])); + } + return $hashes; } /** diff --git a/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl b/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl index 234e31cec..dfa260403 100644 --- a/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl +++ b/templates/bootstrap/dashboard/round_statistics/pplns/round.tpl @@ -70,7 +70,7 @@

{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}

-

Est Next Difficulty{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}

+

Est. Next Difficulty{if $GLOBAL.config.coindiffchangetarget > 1}{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}{/if}

diff --git a/templates/bootstrap/dashboard/round_statistics/pps/round.tpl b/templates/bootstrap/dashboard/round_statistics/pps/round.tpl index 7fc95e6c5..7ed86472f 100644 --- a/templates/bootstrap/dashboard/round_statistics/pps/round.tpl +++ b/templates/bootstrap/dashboard/round_statistics/pps/round.tpl @@ -130,7 +130,7 @@

{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}

-

Est Next Difficulty{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}

+

Est. Next Difficulty{if $GLOBAL.config.coindiffchangetarget > 1}{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}{/if}

diff --git a/templates/bootstrap/dashboard/round_statistics/prop/round.tpl b/templates/bootstrap/dashboard/round_statistics/prop/round.tpl index 1fe67f59c..8ea54a2e9 100644 --- a/templates/bootstrap/dashboard/round_statistics/prop/round.tpl +++ b/templates/bootstrap/dashboard/round_statistics/prop/round.tpl @@ -70,7 +70,7 @@

{if $GLOBAL.nethashrate > 0}{$NETWORK.EstNextDifficulty|number_format:"8"}{else}n/a{/if}

-

Est Next Difficulty{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}

+

Est. Next Difficulty{if $GLOBAL.config.coindiffchangetarget > 1}{if $GLOBAL.nethashrate > 0}
Change in {$NETWORK.BlocksUntilDiffChange} Blocks{else}No Estimates{/if}{/if}