issue #1707 display Piwigo age on maintenance page instead of dashboard

This commit is contained in:
plegall
2022-08-19 11:18:57 +02:00
parent 352e256d41
commit 870f1a8129
6 changed files with 27 additions and 25 deletions
-16
View File
@@ -172,22 +172,6 @@ SELECT COUNT(*)
$template->assign('NB_COMMENTS', 0);
}
if ($nb_photos > 0)
{
$query = '
SELECT MIN(date_available)
FROM '.IMAGES_TABLE.'
;';
list($first_date) = pwg_db_fetch_row(pwg_query($query));
$template->assign(
array(
'first_added_date' => format_date($first_date),
'first_added_age' => time_since($first_date, 'year', null, false, false),
)
);
}
if ($conf['show_piwigo_latest_news'])
{
$news = get_piwigo_news(0, 1);
+22
View File
@@ -344,6 +344,28 @@ else
);
}
$query = '
SELECT
registration_date
FROM '.USER_INFOS_TABLE.'
WHERE user_id = 2
;';
$users = query2array($query);
if (count($users) > 0)
{
$installed_on = $users[0]['registration_date'];
if (!empty($installed_on))
{
$template->assign(
array(
'INSTALLED_ON' => format_date($installed_on, array('day', 'month', 'year')),
'INSTALLED_SINCE' => time_since($installed_on, 'day'),
)
);
}
}
// +-----------------------------------------------------------------------+
// | Define advanced features |
// +-----------------------------------------------------------------------+
-7
View File
@@ -174,13 +174,6 @@ let str_size = "";
<span class="number">{$STORAGE_USED}</span><span class="caption">{'Storage used'|translate}</span>
</div>
{if $NB_PHOTOS > 1}
<div class="stat-box">
<i class="icon-back-in-time icon-yellow"></i>
<span class="number">{$first_added_age}</span><span class="caption" title="{'first photo added on %s'|translate:$first_added_date}">{'First photo added'|translate}</span>
</div>
{/if}
</div> {* .stat-boxes *}
<div class="intro-charts">
@@ -13,6 +13,9 @@ const unit_MB = "{"%s MB"|@translate}"
<legend><span class="icon-television icon-red"></span> {'Environment'|@translate}</legend>
<ul style="font-weight:bold">
<li><a href="{$PHPWG_URL}" class="externalLink">Piwigo</a> {$PWG_VERSION} <a href="{$U_CHECK_UPGRADE}&tab=env" class="icon-arrows-cw">{'Check for upgrade'|@translate}</a></li>
{if isset($INSTALLED_ON)}
<li>{'Installed on %s, %s'|translate:$INSTALLED_ON:$INSTALLED_SINCE}</li>
{/if}
<li>{'Operating system'|@translate}: {$OS}</li>
<li>PHP: {$PHP_VERSION} (<a href="{$U_PHPINFO}" class="externalLink">{'Show info'|@translate}</a>) [{$PHP_DATATIME}]</li>
<li>{$DB_ENGINE}: {$DB_VERSION} [{$DB_DATATIME}]</li>
+1 -2
View File
@@ -333,7 +333,6 @@ $lang['File upload stopped by extension'] = 'File upload stopped by extension';
$lang['File'] = "File";
$lang['File/directory read error'] = "File/directory read error";
$lang['Find a new representant by random'] = "Find a new random album thumbnail";
$lang['first photo added on %s'] = "first photo added on %s";
$lang['Follow Orientation'] = 'Follow Orientation';
$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:';
$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:';
@@ -988,7 +987,6 @@ $lang['Dashboard'] = 'Dashboard';
$lang['%sGB'] = '%s GB';
$lang['%sMB'] = '%s MB';
$lang['Storage used'] = 'Storage used';
$lang['First photo added'] = 'First photo added';
$lang['No filter on album. Select one or type to search'] = 'No filter on album. Select one or type to search';
$lang['Piwigo Remote Sync is able to upload a whole folder hierarchy. If you run it again, only new photos will be uploaded.'] = 'Piwigo Remote Sync is able to upload a whole folder hierarchy. If you run it again, only new photos will be uploaded.';
$lang['Share / Send your photos directly from your Mac Os X (10.10 and following) to Piwigo'] = 'Share / Send your photos directly from your macOS (10.10 and later) to Piwigo';
@@ -1316,4 +1314,5 @@ $lang['and %d more'] = 'and %d more';
$lang['Picture to associate formats with'] = 'Picture to associate formats with';
$lang['The original picture will be detected with the filename (without extension).'] = 'The original picture will be detected with the filename (without extension).';
$lang['Delete %s format ?'] = 'Delete %s format ?';
$lang['Installed on %s, %s'] = 'Installed on %s, %s';
// Leave this line empty
+1
View File
@@ -1316,4 +1316,5 @@ $lang['and %d more'] = 'et %d autre(s)';
$lang['Picture to associate formats with'] = 'Photo à associer avec les formats';
$lang['The original picture will be detected with the filename (without extension).'] = 'La photo originale sera détectée en comparant les noms des fichiers (sans extension).';
$lang['Delete %s format ?'] = 'Supprimer le format %s ?';
$lang['Installed on %s, %s'] = 'Installé le %s, %s';
// Leave this line empty