Commit 18e21607 authored by jlopez's avatar jlopez
Browse files

Fix conda install -c option, See #19

parent e329829d
......@@ -8,7 +8,7 @@ require_once "./dao/DBquery.php";
$db = new DBquery();
$type = "all";
$author = NULL;
$author = "";
$labels = array();
$tags = array();
$descriptions = array();
......
......@@ -400,10 +400,19 @@ function generate_container() {
nrow += 11;
for(var i = 0; i < SELECTED_PACKAGES["Conda"].length; i++) {
PREVIEW += "\n" + startType + "conda install "+SELECTED_PACKAGES["Conda"][i][0] + "=" + SELECTED_PACKAGES["Conda"][i][1];
value = SELECTED_PACKAGES["Conda"][i][0].split('/');
if(value.length == 2) {
author = value[0];
name = value[1];
PREVIEW += "\n" + startType + "conda install -c " + author + " " + name + "=" + SELECTED_PACKAGES["Conda"][i][1];
nrow += 1;
}
}
}
......
......@@ -645,8 +645,12 @@ function findCondaPackage($os_name, $version_num, $version_name, $keyword, $limi
}
$vv = $tr[$i]->getElementsByTagName('a')[1];
$name = $vv->childNodes[1]->nodeValue;
$author = cleanValue($tr[$i]->getElementsByTagName('a')[0]->nodeValue);
$name = $author . "/" . $vv->childNodes[1]->nodeValue;
$version = $vv->childNodes[3]->nodeValue;
$description = cleanValue($vv->parentNode->parentNode->childNodes[2]->nodeValue);
$other = $tr[$i]->childNodes[3]->nodeValue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment