Esempio n. 1
0
 public function checkPackageExistMethod($product, $name)
 {
     $result = array();
     $packageItem = new Package();
     $resultArray = $packageItem->getVersionList($name, $product);
     if (!empty($resultArray)) {
         $result = array('exist' => true, 'msg' => '指定包名已存在');
         return $result;
     }
     $directory = $this->pkgHome . "/{$product}/{$name}/.svn";
     if (is_dir($directory)) {
         $result = array('exist' => true, 'msg' => '指定包名已存在svn服务器');
         return $result;
     }
     $result = array('exist' => false, 'msg' => '包不存在');
     return $result;
 }
Esempio n. 2
0
 /**
  * [getPackageVersionList 获取包版本列表]
  * @return [type] [description]
  */
 public function getPackageVersionList()
 {
     $this->log('START FUNCTION ' . __FUNCTION__);
     $errorArray = array('error' => '');
     $data = Flight::request()->query->getData();
     $needPara = array('product', 'name');
     $error = $this->checkParameter($needPara, $data);
     $package = new Package();
     $result = $package->getVersionList($data['name'], $data['product']);
     $errorArray = $result;
     Flight::json($errorArray, 200);
 }