Syntax clean.
This commit is contained in:
parent
b5d263e693
commit
c4553012d1
44 changed files with 88 additions and 87 deletions
|
|
@ -34,7 +34,7 @@ process takes one optional parameters for customizing the layout of the Admin ba
|
|||
|
||||
sub process {
|
||||
my $session = shift;
|
||||
return undef unless $session->var->isAdminOn;
|
||||
return undef unless $session->isAdminOn;
|
||||
my $i18n = WebGUI::International->new($session,'Macro_AdminBar');
|
||||
my ($url, $style, $asset, $user, $config) = $session->quick(qw(url style asset user config));
|
||||
$style->setScript($url->extras('yui/build/utilities/utilities.js'));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ string is returned.
|
|||
sub process {
|
||||
my $session = shift;
|
||||
my @param = @_;
|
||||
return "" unless ($session->var->isAdminOn);
|
||||
return "" unless ($session->isAdminOn);
|
||||
return $param[0];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ sub process {
|
|||
my $i18n = WebGUI::International->new($session,'Macro_AdminToggle');
|
||||
my %var;
|
||||
$var{'toggle_text'} = $turnOn || $i18n->get(516);
|
||||
if ($session->var->isAdminOn) {
|
||||
if ($session->isAdminOn) {
|
||||
$var{'toggle_url'} = '#'
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ sub process {
|
|||
if (Exception::Class->caught()) {
|
||||
$session->log->warn('AssetProxy macro called invalid asset: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
||||
if ($session->var->isAdminOn) {
|
||||
if ($session->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('invalid url');
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ sub process {
|
|||
elsif ($asset->get('state') =~ /^trash/) {
|
||||
$session->log->warn('AssetProxy macro called on asset in trash: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
||||
if ($session->var->isAdminOn) {
|
||||
if ($session->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('asset in trash');
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ sub process {
|
|||
elsif ($asset->get('state') =~ /^clipboard/) {
|
||||
$session->log->warn('AssetProxy macro called on asset in clipboard: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
||||
if ($session->var->isAdminOn) {
|
||||
if ($session->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('asset in clipboard');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ sub process {
|
|||
my $i18n = WebGUI::International->new( $session, 'Macro_EditableToggle' );
|
||||
my $turnOn = $param[0] || $i18n->get(516);
|
||||
my $turnOff = $param[1] || $i18n->get(517);
|
||||
if ( $session->var->isAdminOn ) {
|
||||
if ( $session->isAdminOn ) {
|
||||
$var{'toggle.url'} = $session->url->page('op=switchOffAdmin');
|
||||
$var{'toggle.text'} = $turnOff;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ sub process {
|
|||
my $extrasUrl = Path::Class::Dir->new($session->url->make_urlmap_work($session->config->get('extrasURL')));
|
||||
|
||||
##Normal mode
|
||||
if (! $session->var->isAdminOn) {
|
||||
if (! $session->isAdminOn) {
|
||||
# Built files live at /path/to/uploads/filepump/bundle.timestamp/ which is
|
||||
# a sub-dir of uploadsDir, so resolve the dir relative to uploads
|
||||
my $dir = $bundle->getPathClassDir->relative($uploadsDir);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ sub process {
|
|||
my $templateId = $param[2] || "PBtmpl0000000000000044";
|
||||
my %var;
|
||||
my $i18n = WebGUI::International->new($session,'Macro_L_loginBox');
|
||||
$var{'user.isVisitor'} = ($session->var->get("userId") eq "1");
|
||||
$var{'user.isVisitor'} = ($session->user->isVisitor);
|
||||
$var{'customText'} = $param[1];
|
||||
$var{'customText'} =~ s/%(.*?)%/_createURL($session,$1)/ge;
|
||||
$var{'hello.label'} = $i18n->get(48);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue