Revert "fixes #2166 add feature to send anonymous stats to piwigo.org"

This reverts commit 1106612fc3.

Theses changes were committed on 14.x by mistake
This commit is contained in:
plegall
2024-06-10 21:32:35 +02:00
parent 1106612fc3
commit ec5bce90bf
6 changed files with 119 additions and 512 deletions
+45 -11
View File
@@ -301,10 +301,33 @@ $template->assign(
);
// graphics library
$graphics_library = get_graphics_library_label();
if (!empty($graphics_library))
switch (pwg_image::get_library())
{
$template->assign('GRAPHICS_LIBRARY', $graphics_library);
case 'imagick':
$library = 'ImageMagick';
$img = new Imagick();
$version = $img->getVersion();
if (preg_match('/ImageMagick \d+\.\d+\.\d+-?\d*/', $version['versionString'], $match))
{
$library = $match[0];
}
$template->assign('GRAPHICS_LIBRARY', $library);
break;
case 'ext_imagick':
$library = 'External ImageMagick';
exec($conf['ext_imagick_dir'].'convert -version', $returnarray);
if (preg_match('/Version: ImageMagick (\d+\.\d+\.\d+-?\d*)/', $returnarray[0], $match))
{
$library .= ' ' . $match[1];
}
$template->assign('GRAPHICS_LIBRARY', $library);
break;
case 'gd':
$gd_info = gd_info();
$template->assign('GRAPHICS_LIBRARY', 'GD '.@$gd_info['GD Version']);
break;
}
if ($conf['gallery_locked'])
@@ -324,15 +347,26 @@ else
);
}
$installed_on = get_installation_date();
if (!empty($installed_on))
$query = '
SELECT
registration_date
FROM '.USER_INFOS_TABLE.'
WHERE user_id = 2
;';
$users = query2array($query);
if (count($users) > 0)
{
$template->assign(
array(
'INSTALLED_ON' => format_date($installed_on, array('day', 'month', 'year')),
'INSTALLED_SINCE' => time_since($installed_on, 'day'),
)
);
$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'),
)
);
}
}
// +-----------------------------------------------------------------------+