Remove unused variable from r_printable.
Modify RootTitle to return root-1 instead of root.
This commit is contained in:
parent
8818309eaa
commit
5757842e46
2 changed files with 13 additions and 11 deletions
|
|
@ -32,17 +32,19 @@ is returned. Otherwise an empty string is returned.
|
|||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
if ($session->asset) {
|
||||
my $lineage = $session->asset->get("lineage");
|
||||
$lineage = substr($lineage,0,6);
|
||||
my $root = WebGUI::Asset->newByLineage($session,$lineage);
|
||||
if (defined $root) {
|
||||
return $root->get("title");
|
||||
}
|
||||
}
|
||||
return "";
|
||||
return "" unless $session->asset;
|
||||
|
||||
my $lineage = $session->asset->get("lineage");
|
||||
return $session->asset->getTitle
|
||||
if (length($lineage) == 6); ##I am the super root.
|
||||
|
||||
##Get my root.
|
||||
$lineage = substr($lineage,0,12);
|
||||
my $root = WebGUI::Asset->newByLineage($session,$lineage);
|
||||
|
||||
return "" unless defined $root;
|
||||
return $root->get("title");
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ is used.
|
|||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
my ($temp, @param, $styleId);
|
||||
my ($temp, @param);
|
||||
@param = @_;
|
||||
my $append = 'op=makePrintable';
|
||||
if ($session->env->get("REQUEST_URI") =~ /op\=/) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue