diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2010-11-22 07:38:13 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2010-11-22 07:38:13 (GMT) |
commit | dd96f973d1e0a66d934489d06e1b0aeea27c0a65 (patch) | |
tree | dfbd99bd0b2949ed7ca78bb675cbc76031b46602 | |
parent | 494c06625fc7b3fbe94a4c1f4774bf289568ea30 (diff) |
Use full url in microformat refs; rename micro-format.php's name attribute to collection_name
-rw-r--r-- | site/app/webroot/services/micro-format.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/site/app/webroot/services/micro-format.php b/site/app/webroot/services/micro-format.php index efd0b3b..58d1d43 100644 --- a/site/app/webroot/services/micro-format.php +++ b/site/app/webroot/services/micro-format.php @@ -7,7 +7,7 @@ require_once('./functions.php'); $errors = array(); -foreach (array('name') as $var) { +foreach (array('collection_nickname') as $var) { if (empty($_GET[$var])) $errors[] = 'Required variable '.$var.' not set.'; } @@ -36,7 +36,7 @@ if (empty($errors)) { INNER JOIN versions ON versions.addon_id = addons.id AND (addons_collections.addon_version IS NULL OR versions.version = addons_collections.addon_version) INNER JOIN files ON files.version_id = versions.id WHERE - collections.nickname = '{$_GET['name']}' + collections.nickname = '{$_GET['collection_nickname']}' GROUP BY addons.id "; @@ -66,7 +66,7 @@ if (!empty($errors)) { if (defined(FILES_HOST)) $url = FILES_HOST . '/' . $row['id'] . '/' . $row['filename']; else - $url = '/downloads/file/' . $row['file_id'] . '/' . $row['filename']; + $url = SITE_URL . '/downloads/file/' . $row['file_id'] . '/' . $row['filename']; echo "<tr>\n"; echo "<td class=\"olpc-activity-info\">\n"; echo "<span class=\"olpc-activity-id\">{$row['guid']}</span>\n"; |