mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-02 07:52:15 +02:00
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:
+45
-11
@@ -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'),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user