示例#1
0
 /**
  *
  */
 static function getbackuppath($id)
 {
     return assets::getbackupfolder($id) . "/" . assets::getbackupname($id);
 }
示例#2
0
     $dir = dirname($path);
     $id = arg('id');
 }
 $error_detected = false;
 if (!is_writable($assetsLCL . $dir)) {
     $error_detected = true;
     $msg .= $dir . " is not writable. ";
 }
 if ($id) {
     // replacement checks
     switch (model::getKey($id, 'mode')) {
         case '1':
         default:
             if (!is_writable($assetsLCL . assets::getbackupfolder($id))) {
                 $error_detected = true;
                 $msg .= assets::getbackupfolder($id) . " is not writable. ";
             }
             if (file_exists($assetsLCL . assets::getbackuppath($id))) {
                 $error_detected = true;
                 $msg .= assets::getbackuppath($id) . " exists. ";
             }
             if (!is_writable($assetsLCL . model::getKey($id, 'file'))) {
                 $error_detected = true;
                 $msg .= model::getKey($id, 'file') . " is not writable. ";
             }
             break;
     }
     if (model::getKey($id, 'lock') && model::getKey(arg('id'), 'lock') != getUser()) {
         $error_detected = true;
         $msg .= model::getKey($id, 'file') . " is locked by " . model::getKey($id, 'lock') . ". ";
     }