Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
1fc9e978
Commit
1fc9e978
authored
Apr 21, 2010
by
Richard Mansfield
Browse files
Don't show 'latest version is ...' until latest version is available
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
50187098
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/registration.php
View file @
1fc9e978
...
...
@@ -236,18 +236,20 @@ function site_statistics($full=false) {
$data
[
'name'
]
=
get_config
(
'sitename'
);
$data
[
'release'
]
=
get_config
(
'release'
);
$data
[
'version'
]
=
get_config
(
'version'
);
$data
[
'latest_version'
]
=
get_config
(
'latest_version'
);
$data
[
'installdate'
]
=
format_date
(
strtotime
(
get_config
(
'installation_time'
)),
'strftimedate'
);
$data
[
'dbsize'
]
=
db_total_size
();
$data
[
'diskusage'
]
=
get_field
(
'site_data'
,
'value'
,
'type'
,
'disk-usage'
);
$data
[
'cronrunning'
]
=
!
record_exists_select
(
'cron'
,
'nextrun < CURRENT_DATE'
);
if
(
$data
[
'release'
]
==
$data
[
'latest_version'
])
{
$data
[
'strlatestversion'
]
=
get_string
(
'uptodate'
,
'admin'
);
}
else
{
$download_page
=
'https://launchpad.net/mahara/+download'
;
$data
[
'strlatestversion'
]
=
get_string
(
'latestversionis'
,
'admin'
,
$download_page
,
$data
[
'latest_version'
]);
if
(
$latestversion
=
get_config
(
'latest_version'
))
{
$data
[
'latest_version'
]
=
$latestversion
;
if
(
$data
[
'release'
]
==
$latestversion
)
{
$data
[
'strlatestversion'
]
=
get_string
(
'uptodate'
,
'admin'
);
}
else
{
$download_page
=
'https://launchpad.net/mahara/+download'
;
$data
[
'strlatestversion'
]
=
get_string
(
'latestversionis'
,
'admin'
,
$download_page
,
$latestversion
);
}
}
$data
[
'strrankingsupdated'
]
=
get_string
(
'rankingsupdated'
,
'admin'
,
date
(
'Y-m-d H:i'
,
get_config
(
'registration_lastsent'
)));
...
...
htdocs/theme/raw/templates/admin/stats.tpl
View file @
1fc9e978
...
...
@@ -26,7 +26,7 @@
{
if
$sitedata.diskusage
}
<p><strong>
{
str
tag
=
diskusage
section
=
admin
}
:
</strong>
{
$sitedata.diskusage
|
display_size
}
</p>
{/
if
}
<p><strong>
{
str
tag
=
maharaversion
section
=
admin
}
:
</strong>
{
$sitedata.release
}
(
{
$sitedata.strlatestversion
}
)
</p>
<p><strong>
{
str
tag
=
maharaversion
section
=
admin
}
:
</strong>
{
$sitedata.release
}
{
if
$sitedata.strlatestversion
}
(
{
$sitedata.strlatestversion
}
)
{/
if
}
</p>
<p><strong>
{
str
tag
=
Cron
section
=
admin
}
:
</strong>
{
if
$sitedata.cronrunning
}{
str
tag
=
runningnormally
section
=
admin
}{
else
}{
str
tag
=
cronnotrunning
section
=
admin
}{/
if
}
</p>
</div>
<div
class=
"cb"
></div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment