Пример #1
0
 public static function getClear()
 {
     $path = Player_Flags::getFlag('path');
     $files = Player_Flags::getFlag('files', 'refresh');
     $filename = $path['config'] . $files['file'];
     if (file_exists($filename)) {
         Player_File::unsetFile($filename);
         return true;
     }
     return false;
 }
Пример #2
0
 public function setDownload()
 {
     Player_Debug::setDebug('Saving settings...');
     Player_Debug::setStatus('Finishing download...');
     $path = Player_Flags::getFlag('path');
     $files = Player_Flags::getFlag('files');
     $label = Player_Flags::getFlag('label');
     $status = Player_Flags::getFlag('status');
     $file = Player_File::getFile($path['config'] . $files['config']['file']);
     $xml = Player_Convert::getXML($file, $label['config']);
     $xml[$status['download']] = 1;
     $file = Player_Convert::setXML($label['config'], $xml);
     if (Player_File::setFile($path['config'] . $files['config']['file'], $file, true)) {
         if (file_exists($path['config'] . $files['download']['file'])) {
             if (Player_File::unsetFile($path['config'] . $files['download']['file'])) {
                 return true;
             } else {
                 return false;
             }
         }
         return true;
     }
     return false;
 }