Esempio n. 1
0
File: iq.php Progetto: razzman/mi
 /**
  * remove method
  *
  * @return void
  * @access public
  */
 public function remove()
 {
     if (!$this->args) {
         $id = $this->_choosePackage('to remove', true);
     } else {
         $id = $this->args[0];
     }
     if (!$id) {
         return false;
     }
     $details = MiInstall::details($id);
     if (!$details) {
         $this->out($id . ' does not appear to be installed. Nothing to do');
         return;
     }
     $choice = $this->in("Confirm removing {$id} ?", array('y', 'n'));
     if ($choice != 'y') {
         return false;
     }
     $result = MiInstall::remove($details);
     if (!$result) {
         $this->out("removing {$id} failed");
     }
     $this->_neatOut($result);
 }