1
limit 0,1
;';
if (mysql_fetch_array(pwg_query($query)))
{
$can_be_deactivate = false;
add_c13y(
l10n('c13y_dbl_email_user'),
null,
null,
l10n('c13y_correction_dbl_email_user'));
}
/* Check plugin included in Piwigo sources */
$included_plugins = array('dew');
$query = '
select
id
from
'.PLUGINS_TABLE.'
where
id in ('.
implode(
',',
array_map(
create_function('$s', 'return "\'".$s."\'";'),
$included_plugins
)
)
.')
;';
$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
{
$can_be_deactivate = false;
$uninstall_msg_link =
''.
sprintf(l10n('c13y_correction_obsolete_plugin'), $row['id']).'';
add_c13y(
l10n('c13y_obsolete_plugin'),
null,
null,
$uninstall_msg_link);
}
/* Check if this plugin must deactivate */
if ($can_be_deactivate)
{
$deactivate_msg_link =
''.
l10n('c13y_upgrade_deactivate').'';
add_c13y(
l10n('c13y_upgrade_no_anomaly'),
'c13y_upgrade_correction',
'deactivate_plugin',
$deactivate_msg_link
);
}
}
function c13y_upgrade_correction($action)
{
$result = false;
switch ($action)
{
case 'deactivate_plugin':
{
$query = '
REPLACE INTO '.PLUGINS_TABLE.'
(id, state)
VALUES (\'c13y_upgrade\', \'inactive\')
;';
pwg_query($query);
$result = true;
}
break;
}
return $result;
}
?>