Patched to use assign_vars() when available.
authorDan
Mon, 22 Dec 2008 13:32:08 -0500
changeset 8 81693fc2f660
parent 7 c3710cbed6d0
child 9 162b0f10e3d0
Patched to use assign_vars() when available.
plugins/Newsboy.php
--- a/plugins/Newsboy.php	Sat Jun 14 22:42:26 2008 -0400
+++ b/plugins/Newsboy.php	Mon Dec 22 13:32:08 2008 -0500
@@ -112,11 +112,15 @@
     
     $x = getConfig('nb_portal_title');
     
-    $template->tpl_strings['PAGE_NAME'] = ( $paths->cpage['urlname_nons'] == 'Portal' ) ?
+    $page_name = ( $paths->cpage['urlname_nons'] == 'Portal' ) ?
           ( ( empty($x) ) ?
               'Welcome to ' . getConfig('site_name') :
               $x ) :
           'News Archive';
+    if ( method_exists($template, 'assign_vars') )
+      $template->assign_vars(array('PAGE_NAME' => $page_name));
+    else
+      $template->tpl_strings['PAGE_NAME'] = $page_name;
     
     if ( !$page->perms->get_permissions('read') )
     {