Example #1
0
 public function postfile_put_contents($path, $data)
 {
     if (self::$DO_LOG) {
         error_log("postfile_put_contents {$path}");
     }
     PersistentMap::remove($path);
     return true;
 }
Example #2
0
 public static function remove($key)
 {
     if (self::$array === false) {
         self::$array = self::get_paths();
     }
     if (array_key_exists($key, self::$array)) {
         unset(self::$array[$key]);
         self::save(self::$array);
     }
 }
Example #3
0
 /**
  * returns true if a case study can be used for launching scripts.
  * If all the statuses of 
  * 
  * @param type $study
  */
 public static function is_study_runnable($study)
 {
     $array = PersistentMap::get_paths();
     foreach (array_keys($array) as $key) {
         if (strpos($key, $study) > 0) {
             #$syncing = self::$SYNC_STATUS[$key];
             $syncing = $array[$key];
             if ($syncing) {
                 return false;
             }
         }
     }
     return true;
 }