Commit 79bf6f78 authored by Robert Lyon's avatar Robert Lyon

Bug 1686501: Allowing submitted collections to get correct $url info

behatnotneeded Change-Id: I41520bf9afa1c822d83b299f6cdd21af53225fcf Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz> (cherry picked from commit a0ca5e00)
parent 6b56d7c1
......@@ -3773,18 +3773,23 @@ class View {
$select .= ',v.submittedtime, v.submittedstatus,
g.id AS submitgroupid, g.name AS submitgroupname, g.urlid AS submitgroupurlid,
h.wwwroot AS submithostwwwroot, h.name AS submithostname';
$selectstr = ', c.submittedtime, c.submittedstatus,
$collselect .= ', c.submittedtime, c.submittedstatus,
g.id AS submitgroupid, g.name AS submitgroupname, g.urlid AS submitgroupurlid,
h.wwwroot AS submithostwwwroot, h.name AS submithostname';
$emptycollselect .= ', c.submittedtime, c.submittedstatus,
NULL AS submitgroupid, NULL AS submitgroupname, NULL AS submitgroupurlid,
NULL AS submithostwwwroot, NULL AS submithostname';
$collselect .= $selectstr;
$emptycollselect .= $selectstr;
$fromstr = '
LEFT OUTER JOIN {group} g ON (v.submittedgroup = g.id AND g.deleted = 0)
LEFT OUTER JOIN {host} h ON (v.submittedhost = h.wwwroot)';
$from .= $fromstr;
$collfrom .= $fromstr;
if (!empty($groupby)) {
$groupby .= ', g.id, h.wwwroot';
$collgroupby .= ', g.id, h.wwwroot';
}
$sort = '
ORDER BY ' . $order . ' vtitle, vid';
......@@ -3829,6 +3834,7 @@ class View {
View::get_extra_collection_info($viewdata, false, 'collid');
require_once('collection.php');
require_once('group.php');
if ($viewdata) {
foreach ($viewdata as $id => &$data) {
$data['uniqueid'] = 'u' . $data['id'] . '_' . $data['collid'];
......
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