Exemplo n.º 1
0
 function mainwp_backup_checkpid()
 {
     $this->secure_request('mainwp_backup_checkpid');
     try {
         if (!isset($_POST['site_id']) || !MainWP_Utility::ctype_digit($_POST['site_id'])) {
             throw new MainWP_Exception('Invalid request');
         }
         die(json_encode(MainWP_Manage_Sites::backupCheckpid($_POST['site_id'], $_POST['pid'], $_POST['type'], $_POST['subfolder'], $_POST['filename'])));
     } catch (MainWP_Exception $e) {
         die(json_encode(array('error' => array('message' => $e->getMessage(), 'extra' => $e->getMessageExtra()))));
     }
 }