private function DeleteOldLogItems()
    {
        $days = SettingsProxy::Singleton()->Settings()->GetLogLifetime();
        $deleteBefore = Date::Now();
        $deleteBefore->AddDays(-$days);
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $where = $sql->LT($tblLogItem->Field('Changed'), $sql->Value($deleteBefore));
        LogItem::Schema()->Delete($where);
    }
private function DeleteOldLogItems()
    {
        $days = SettingsProxy::Singleton()->Settings()->GetLogLifetime();
        $deleteBefore = Date::Now();
        $deleteBefore->AddDays(-$days);
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $where = $sql->LT($tblLogItem->Field('Changed'), $sql->Value($deleteBefore));
        LogItem::Schema()->Delete($where);
    }
private function DeleteOldLogItems ( ) { $ days = SettingsProxy :: Singleton ( ) -> Settings ( ) -> GetLogLifetime ( ) ; $ deleteBefore = Date :: Now ( ) ; $ deleteBefore -> AddDays ( - $ days ) ; $ tblLogItem = LogItem :: Schema ( ) -> Table ( ) ; $ sql = Access :: SqlBuilder ( ) ; $ where = $ sql -> LT ( $ tblLogItem -> Field ( 'Changed' ) , $ sql -> Value ( $ deleteBefore ) ) ; LogItem :: Schema ( ) -> Delete ( $ where ) ; }
Deletes log items older then the given amount of days
@param int $days The days
Deletes log items older then the given amount of days