summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php7
-rw-r--r--web/lib/aurjson.class.php2
-rw-r--r--web/template/pkg_details.php2
3 files changed, 6 insertions, 5 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 793f8ca..d21e6ae 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -256,7 +256,7 @@ if ($uid):
}
if (isset($pkg_name)) {
- $incoming_pkgdir = INCOMING_DIR . $pkg_name;
+ $incoming_pkgdir = INCOMING_DIR . substr($pkg_name, 0, 2) . "/" . $pkg_name;
}
if (!$error) {
@@ -268,7 +268,8 @@ if ($uid):
rm_tree($incoming_pkgdir);
}
- if (!@mkdir($incoming_pkgdir)) {
+ # The mode is masked by the current umask, so not as scary as it looks
+ if (!mkdir($incoming_pkgdir, 0777, true)) {
$error = __( "Could not create directory %s.", $incoming_pkgdir);
}
} else {
@@ -286,7 +287,7 @@ if ($uid):
}
if (!$error) {
- if (!@chdir($incoming_pkgdir)) {
+ if (!chdir($incoming_pkgdir)) {
$error = __("Could not change directory to %s.", $incoming_pkgdir);
}
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 5d15b89..277c824 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -125,7 +125,7 @@ class AurJSON {
$search_data = array();
while ( $row = mysql_fetch_assoc($result) ) {
$name = $row['Name'];
- $row['URLPath'] = URL_DIR . $name . "/" . $name . ".tar.gz";
+ $row['URLPath'] = URL_DIR . substr($name, 0, 2) . "/" . $name . "/" . $name . ".tar.gz";
if ($type == 'info') {
$search_data = $row;
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 0658063..5239123 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -90,7 +90,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
<p><span class='f3'>
<?php
- $urlpath = URL_DIR . $row['Name'];
+ $urlpath = URL_DIR . substr($row['Name'], 0, 2) . "/" . $row['Name'];
print "<a href='$urlpath/" . $row['Name'] . ".tar.gz'>".__("Tarball")."</a> :: ";
print "<a href='$urlpath/PKGBUILD'>".__("PKGBUILD")."</a></span>";