Ticket #850: FormState_PublicGarbageCollect_for_Cron.patch

File FormState_PublicGarbageCollect_for_Cron.patch, 1.1 KB (added by vaibhav, 2 years ago)

DBBackedFormStateHandler GC made public

  • includes/qcubed/_core/qform_state_handlers/QDbBackedFormStateHandler.class.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    6565                 * @static 
    6666                 * This function is responsible for removing the old values from 
    6767                 */ 
    68                 private static function GarbageCollect() { 
     68                public static function GarbageCollect() { 
    6969                        // Its not perfect and not sure but should be executed on expected intervals 
    7070                        $objDatabase = QApplication::$Database[self::$intDbIndex]; 
    7171                        $query = ' 
     
    7474                                        WHERE 
    7575                                                ' . $objDatabase->EscapeIdentifier('save_time') . ' < ' . $objDatabase->SqlVariable(time() - 60 * 60 * 24 * self::$intGarbageCollectDaysOld); 
    7676 
    77                         $result = $objDatabase->Query($query); 
     77                        $objDatabase->NonQuery($query); 
    7878                } 
    7979 
    8080                /**