Ejemplo n.º 1
0
 protected function makePublic($id, $user_id = false)
 {
     $asset = $this->getAssetInfo($id);
     if ($user_id) {
         if ($asset['user_id'] != $user_id) {
             return false;
         }
     }
     $connection = $this->getConnectionDetails($asset['connection_id']);
     $connection_type = CASHSystem::getConnectionTypeSettings($connection['type']);
     if (is_array($connection_type)) {
         $seed_type = $connection_type['seed'];
         $seed = new $seed_type($asset['user_id'], $asset['connection_id']);
         return $seed->makePublic($asset['location']);
     } else {
         return false;
     }
 }