Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Spacinazi. (NoPrintForGuests, facebook)
Signed-off-by: Nao <nao@wedge>
- Loading branch information
Showing
3 changed files
with
91 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
<?php | ||
|
||
function npfg_display_main(){ | ||
|
||
function npfg_display_main() | ||
{ | ||
global $context; | ||
if(we::$is_guest){ // If user is guest, delete print button | ||
unset($context['nav_buttons']['normal']['print']); | ||
} | ||
|
||
// If user is guest, delete print button | ||
if (we::$is_guest) | ||
unset($context['nav_buttons']['normal']['print']); | ||
} | ||
|
||
function npfg_load_theme(){ | ||
function npfg_load_theme() | ||
{ | ||
global $context; | ||
|
||
log_error(print_r($context, true)); | ||
if(we::$is_guest && $context['action'] == 'printpage'){ // If user is guest, and action is printpage, abort it | ||
|
||
// If user is guest, and action is printpage, abort it | ||
if (we::$is_guest && $context['action'] == 'printpage') | ||
redirectexit(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters