/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/classes/api0.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
class backupbuddy_api0 {
    
    
/* getLastError() -- NOT YET IMPLEMENTED.
     *
     * Retrieve the last error the API encountered. Use if a method returned bool FALSE to get message.
     *
     */
    
public static function getLastError() {
    }
    
    
    
// backupbuddy_api0::getOverview()
    
public static function getOverview() {
        
self::_before();
        
        return array(
            
'backupbuddyVersion'        => pb_backupbuddy::settings'version' ),
            
'localTime'                    => time(),
            
'lastBackupStart'            => pb_backupbuddy::$options['last_backup_start'],
            
'lastBackupSerial'            => pb_backupbuddy::$options['last_backup_serial'],
            
'lastBackupStats'            => pb_backupbuddy::$options['last_backup_stats'],
            
'editsSinceLastBackup'        => pb_backupbuddy::$options['edits_since_last'],
            
'scheduleCount'                => countpb_backupbuddy::$options['schedules'] ),
            
'profileCount'                => countpb_backupbuddy::$options['profiles'] ),
            
'destinationCount'            => countpb_backupbuddy::$options['remote_destinations'] ),
            
'notifications'                => array(), // Array of string notification messages.
        
);
    }
    
    
    
// backupbuddy_api0::getSchedules()
    
public static function getSchedules() {
        
self::_before();
        
        
$schedules = array();
        foreach( 
pb_backupbuddy::$options['schedules'] as $schedule_id => $schedule ) {
            
$schedules[] = array(
                
'title' => strip_tags$schedule['title'] ),
                
'type' => pb_backupbuddy::$options['profiles'][$schedule['profile']]['type'],
                
'interval' => $schedule['interval'],
                
'lastRun' => $schedule['last_run'],
                
'enabled' => $schedule['on_off'],
                
'profileID' => $schedule['profile'],
                
'profileTitle' => strip_tagspb_backupbuddy::$options['profiles'][$schedule['profile']]['title'] ),
                
'id' => $schedule_id
            
);
        }
        return 
$schedules;
    }
    
    
    
    private static function 
_before() {
    }
    
// end class.