Esempio n. 1
0
function compare_activities_by_time_asc($a, $b)
{
    // make sure the activities actually have a timestamp property
    if (!object_property_exists($a, 'timestamp') or !object_property_exists($b, 'timestamp')) {
        return 0;
    }
    if ($a->timestamp == $b->timestamp) {
        return 0;
    }
    return $a->timestamp < $b->timestamp ? -1 : 1;
}
 private function get_backupinfo($info)
 {
     $backupinfo = backup_general_helper::get_backup_information(basename($this->get_task()->get_basepath()));
     if (object_property_exists($backupinfo, $info)) {
         return $backupinfo->{$info};
     }
     return false;
 }