Skip to content
Extraits de code Groupes Projets
Valider 3bb68882 rédigé par peterbo's avatar peterbo
Parcourir les fichiers

Fixes #2792

git-svn-id: http://dev.piwik.org/svn/trunk@5479 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 439ba3ea
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -368,7 +368,7 @@ tracking_requests_require_authentication = 1
; otherwise you may lose tracking data.
; delete_logs_schedule_lowest_interval - lowest possible interval between two table deletes (in days, 1|7|30). Default: 7.
; delete_logs_older_than - delete data older than XX (days). Default: 180
; delete_max_rows_per_run - Maximum of rows deleted in one go (in thousands)
; delete_max_rows_per_run - Maximum of rows deleted in one go (in thousands); 0 for no limit
delete_logs_enable = 0
delete_logs_schedule_lowest_interval = 7
delete_logs_older_than = 180
......
......@@ -388,6 +388,7 @@ $translations = array(
'PrivacyManager_DeleteLogsOlderThan' => 'Delete logs older than',
'PrivacyManager_DeleteLogInterval' => 'Delete old logs every',
'PrivacyManager_DeleteMaxRows' => 'Maximum number of rows to delete in one run:',
'PrivacyManager_DeleteMaxRowsNoLimit' => 'no limit',
'PrivacyManager_LastDelete' => 'Last deletion was on',
'PrivacyManager_NextDelete' => 'Next scheduled deletion in',
'PrivacyManager_ClickHereSettings' => 'Click here to access the %s settings.',
......
......@@ -149,7 +149,12 @@ class Piwik_PrivacyManager extends Piwik_Plugin
* LOW_PRIORITY / QUICK / IGNORE read http://dev.mysql.com/doc/refman/5.0/en/delete.html
*/
$sql = 'DELETE LOW_PRIORITY QUICK IGNORE FROM ' . $table . ' WHERE `idvisit` <= ? LIMIT ' . $maxRowsPerRun;
$sql = 'DELETE LOW_PRIORITY QUICK IGNORE FROM ' . $table . ' WHERE `idvisit` <= ? ';
if(isset($maxRowsPerRun)&&$maxRowsPerRun>0) {
$sql .= ' LIMIT ' . $maxRowsPerRun;
}
Piwik_Query($sql, array($maxIdVisit));
}
......
......@@ -127,6 +127,7 @@
<option {if $deleteLogs.config.delete_max_rows_per_run eq '100'} selected="selected" {/if} value="100">100.000</option>
<option {if $deleteLogs.config.delete_max_rows_per_run eq '500'} selected="selected" {/if} value="500">500.000</option>
<option {if $deleteLogs.config.delete_max_rows_per_run eq '1000'} selected="selected" {/if} value="1000">1.000.000</option>
<option {if $deleteLogs.config.delete_max_rows_per_run eq '0'} selected="selected" {/if} value="0">{'PrivacyManager_DeleteMaxRowsNoLimit'|translate}</option>
</select>
</td>
<td width="200"></td>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter