* adjust the checking update logic.

This commit is contained in:
wangchunsheng
2012-03-01 10:27:49 +00:00
parent 7748d796ba
commit a1faf1333f
3 changed files with 9 additions and 8 deletions

View File

@@ -59,15 +59,16 @@ class misc extends control
/**
* Check current version is latest or not.
*
* @param string $latestNote
* @param string $browser
* @access public
* @return void
*/
public function checkUpdate($latestNote = '', $browser = '')
public function checkUpdate()
{
$this->view->latestNote = urldecode(helper::safe64Decode($latestNote));
$this->view->browser = $browser;
$note = isset($_GET['note']) ? $_GET['note'] : '';
$browser = isset($_GET['browser']) ? $_GET['browser'] : '';
$this->view->note = urldecode(helper::safe64Decode($note));
$this->view->browser = $browser;
$this->display();
}
}

View File

@@ -1,8 +1,8 @@
<html xmlns='http://www.w3.org/1999/xhtml'>
<head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head>
<body <?php if($browser != 'opera') echo "bgcolor='transparent'";?> style='color:white; font-size:13px; text-align:center'>
<?php if($latestNote):?>
<?php echo $latestNote;?>
<?php if($note):?>
<?php echo $note;?>
<script language='javascript'>window.parent.document.getElementById('updater').className=''</script>
<?php endif;?>
</body>

View File

@@ -41,7 +41,7 @@ include '../../common/view/colorbox.html.php';
powered by <a href='http://www.zentao.net' target='_blank'>ZenTaoPMS</a>(<?php echo $config->version;?>)
<?php echo $lang->donate;?>
<br />
<iframe id='updater' frameborder='0' scrolling='no' allowtransparency='true' src="http://www.zentao.net/updater-isLatest-<?php echo $config->version;?>-<?php echo $s;?>.html"></iframe>
<iframe id='updater' class='hidden' frameborder='0' scrolling='no' allowtransparency='true' src="http://www.zentao.net/updater-isLatest-<?php echo $config->version;?>-<?php echo $s;?>.html"></iframe>
</div>
</form>
<?php include '../../common/view/footer.lite.html.php';?>