fixed: Editting matrix listings shows fields from other matrix assets
fixed: Matrix assets show pending listings from all matrix assets on a site
This commit is contained in:
parent
ab6f4defe3
commit
8c2c8b8b8f
2 changed files with 8 additions and 5 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
- Add Gallery search limiting by user ID
|
- Add Gallery search limiting by user ID
|
||||||
- Remaining i18n for Gallery templates
|
- Remaining i18n for Gallery templates
|
||||||
- Fix: Search form now visible in Photo assets
|
- Fix: Search form now visible in Photo assets
|
||||||
|
- fixed: Editting matrix listings shows fields from other matrix assets
|
||||||
|
- fixed: Matrix assets show pending listings from all matrix assets on a site
|
||||||
|
|
||||||
7.5.7
|
7.5.7
|
||||||
- fixed: HttpProxy mixes original site's content encoding with WebGUI's
|
- fixed: HttpProxy mixes original site's content encoding with WebGUI's
|
||||||
|
|
|
||||||
|
|
@ -629,10 +629,11 @@ sub www_editListing {
|
||||||
$f->raw('<tr><td colspan="2"><b>'.$category.'</b></td></tr>');
|
$f->raw('<tr><td colspan="2"><b>'.$category.'</b></td></tr>');
|
||||||
my $a;
|
my $a;
|
||||||
if ($self->session->form->process("listingId") ne "new") {
|
if ($self->session->form->process("listingId") ne "new") {
|
||||||
$a = $self->session->db->read("select a.name, a.fieldType, a.defaultValue, a.description, a.label, b.value, a.fieldId
|
$a = $self->session->db->read(
|
||||||
from Matrix_field a left join Matrix_listingData b on a.fieldId=b.fieldId and
|
"select a.name, a.fieldType, a.defaultValue, a.description, a.label, b.value, a.fieldId
|
||||||
listingId=".$self->session->db->quote($self->session->form->process("listingId"))." where
|
from Matrix_field a left join Matrix_listingData b on a.fieldId=b.fieldId and
|
||||||
a.category=".$self->session->db->quote($category)." order by a.label");
|
listingId=? where a.category=? and a.assetId=? order by a.label",
|
||||||
|
[$self->session->form->process("listingId"), $category, $self->getId]);
|
||||||
} else {
|
} else {
|
||||||
$a = $self->session->db->read("select name, fieldType, defaultValue, description, label, fieldId
|
$a = $self->session->db->read("select name, fieldType, defaultValue, description, label, fieldId
|
||||||
from Matrix_field where category=".$self->session->db->quote($category)." and assetId=".$self->session->db->quote($self->getId));
|
from Matrix_field where category=".$self->session->db->quote($category)." and assetId=".$self->session->db->quote($self->getId));
|
||||||
|
|
@ -1102,7 +1103,7 @@ sub view {
|
||||||
($var{'user.count'}) = $self->session->db->quickArray("select count(*) from users");
|
($var{'user.count'}) = $self->session->db->quickArray("select count(*) from users");
|
||||||
($var{'current.user.count'}) = $self->session->db->quickArray("select count(*)+0 from userSession where lastPageView>".($self->session->datetime->time()-600));
|
($var{'current.user.count'}) = $self->session->db->quickArray("select count(*)+0 from userSession where lastPageView>".($self->session->datetime->time()-600));
|
||||||
($var{'listing.count'}) = $self->session->db->quickArray("select count(*) from Matrix_listing where status = 'approved' and assetId=".$self->session->db->quote($self->getId));
|
($var{'listing.count'}) = $self->session->db->quickArray("select count(*) from Matrix_listing where status = 'approved' and assetId=".$self->session->db->quote($self->getId));
|
||||||
$sth = $self->session->db->read("select listingId,productName from Matrix_listing where status='pending'");
|
$sth = $self->session->db->read("select listingId,productName from Matrix_listing where status='pending' and assetId=?",[$self->getId]);
|
||||||
while (my ($id,$name) = $sth->array) {
|
while (my ($id,$name) = $sth->array) {
|
||||||
push(@{$var{pending_list}},{
|
push(@{$var{pending_list}},{
|
||||||
url=>$self->formatURL("viewDetail",$id),
|
url=>$self->formatURL("viewDetail",$id),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue