diff options
| author | lsces <lester@lsces.co.uk> | 2016-02-07 21:38:59 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2016-02-07 21:38:59 +0000 |
| commit | 2d7dc539a3bde6d3eab6e6c9822c1821cbd5e32c (patch) | |
| tree | 1d56a516b2eb6ba6e1f2d2c9ed9f89eb44237840 | |
| parent | 4dad4adf910a1dd95b6db102978803b968b55e51 (diff) | |
| download | newsletters-2d7dc539a3bde6d3eab6e6c9822c1821cbd5e32c.tar.gz newsletters-2d7dc539a3bde6d3eab6e6c9822c1821cbd5e32c.tar.bz2 newsletters-2d7dc539a3bde6d3eab6e6c9822c1821cbd5e32c.zip | |
Move from Smarty2 to Smarty3 function style
| -rw-r--r-- | admin/admin_newsletters.php | 4 | ||||
| -rw-r--r-- | admin/mail_queue.php | 2 | ||||
| -rw-r--r-- | admin/send.php | 10 | ||||
| -rw-r--r-- | edition.php | 2 | ||||
| -rw-r--r-- | edition_edit.php | 4 | ||||
| -rw-r--r-- | index.php | 2 | ||||
| -rw-r--r-- | lookup_newsletter_edition_inc.php | 2 | ||||
| -rw-r--r-- | lookup_newsletter_inc.php | 2 | ||||
| -rw-r--r-- | newsletters.php | 4 | ||||
| -rw-r--r-- | sub.php | 4 |
10 files changed, 18 insertions, 18 deletions
diff --git a/admin/admin_newsletters.php b/admin/admin_newsletters.php index ed573c3..26376b4 100644 --- a/admin/admin_newsletters.php +++ b/admin/admin_newsletters.php @@ -39,8 +39,8 @@ if( isset( $_REQUEST["remove"] ) && $gContent->isValid() ) { $gContent->invokeServices( 'content_edit_function' ); $newsletters = $gContent->getList( $listHash ); -$gBitSmarty->assign_by_ref( 'newsletters', $newsletters ); -$gBitSmarty->assign_by_ref( 'listInfo', $listHash ); +$gBitSmarty->assignByRef( 'newsletters', $newsletters ); +$gBitSmarty->assignByRef( 'listInfo', $listHash ); // Fill array with possible number of questions per page /* diff --git a/admin/mail_queue.php b/admin/mail_queue.php index 19ef69e..7aaad7b 100644 --- a/admin/mail_queue.php +++ b/admin/mail_queue.php @@ -28,7 +28,7 @@ if( !empty( $_REQUEST['batch_command'] ) && !empty( $_REQUEST['queue_id'] ) ) { if( empty( $_REQUEST['batch_command'] ) || $_REQUEST['batch_command'] != 'send' ) { $listHash = array(); $queue = $gBitNewsletterMailer->getQueue( $listHash ); - $gBitSmarty->assign_by_ref( 'queue', $queue ); + $gBitSmarty->assignByRef( 'queue', $queue ); $gBitSystem->display( 'bitpackage:newsletters/mail_queue.tpl' , NULL, array( 'display_mode' => 'admin' )); } diff --git a/admin/send.php b/admin/send.php index 4b93928..bd34a5c 100644 --- a/admin/send.php +++ b/admin/send.php @@ -33,7 +33,7 @@ $validated = !empty( $_REQUEST["validated"] ) ? TRUE : FALSE; if( $gContent->isValid() && isset( $_REQUEST['preview'] ) && isset( $_REQUEST['send_group'] ) ) { $recipients = $gContent->getRecipients( $_REQUEST['send_group'], $validated, !empty( $_REQUEST['test_mode'] ) ); - $gBitSmarty->assign_by_ref( 'recipientList', $recipients ); + $gBitSmarty->assignByRef( 'recipientList', $recipients ); $gBitSmarty->assign( 'validated', $validated ); $gBitSmarty->assign( 'sending', TRUE ); } elseif( $gContent->isValid() && isset( $_REQUEST["send"] ) ) { @@ -52,19 +52,19 @@ if( $gContent->isValid() ) { $groupListHash = array(); $groups = $gBitUser->getAllGroups( $groupListHash ); $groups['send_subs']['group_name'] = 'Send to subscribers'; - $gBitSmarty->assign_by_ref( 'groupList', $groups ); + $gBitSmarty->assignByRef( 'groupList', $groups ); } else { $listHash = array(); $editions = $gContent->getList( $listHash ); - $gBitSmarty->assign_by_ref( 'editionList', $editions ); + $gBitSmarty->assignByRef( 'editionList', $editions ); /* if( $gBitSystem->isFeatureActive( 'bit_p_use_content_templates' ) ) { $templates = $bitlib->list_templates('newsletters', 0, -1, 'name_asc', ''); - $gBitSmarty->assign_by_ref('templates', $templates["data"]); + $gBitSmarty->assignByRef('templates', $templates["data"]); }*/ } -$gBitSmarty->assign_by_ref( 'feedback', $feedback ); +$gBitSmarty->assignByRef( 'feedback', $feedback ); // Display the template $gBitSystem->display( 'bitpackage:newsletters/send_newsletters.tpl' , tra( "Send Newsletter" ).': '.$gContent->getTitle() , array( 'display_mode' => 'admin' )); diff --git a/edition.php b/edition.php index 002da30..2436177 100644 --- a/edition.php +++ b/edition.php @@ -48,7 +48,7 @@ if( $gContent->isValid() ) { } else { $listHash = array(); $editions = $gContent->getList( $listHash ); - $gBitSmarty->assign_by_ref( 'editionList', $editions ); + $gBitSmarty->assignByRef( 'editionList', $editions ); $gBitSmarty->assign( 'listInfo', $listHash ); $title = tra("List Editions"); $mid = 'bitpackage:newsletters/list_editions.tpl'; diff --git a/edition_edit.php b/edition_edit.php index 39d7647..4a43c9b 100644 --- a/edition_edit.php +++ b/edition_edit.php @@ -62,7 +62,7 @@ if (isset($_REQUEST["preview"])) { $parsed = $gContent->parseData( $formInfo['data'],( !empty( $_REQUEST['format_guid'] ) ? $_REQUEST['format_guid'] : ( isset( $gContent->mInfo['format_guid'] ) ? $gContent->mInfo['format_guid'] : 'tikiwiki' ) ) ); - $gBitSmarty->assign_by_ref( 'parsed', $parsed ); + $gBitSmarty->assignByRef( 'parsed', $parsed ); $gContent->invokeServices( 'content_preview_function' ); } elseif (isset($_REQUEST["save"])) { @@ -90,7 +90,7 @@ if( empty( $formInfo ) ) { $formInfo = &$gContent->mInfo; } -$gBitSmarty->assign_by_ref( 'pageInfo', $formInfo ); +$gBitSmarty->assignByRef( 'pageInfo', $formInfo ); $gBitSmarty->assign( 'errors', $gContent->mErrors ); // Display the template @@ -10,7 +10,7 @@ require_once( '../kernel/setup_inc.php' ); $feedback = array(); $gDefaultCenter = 'bitpackage:newsletters/center_list_newsletters.tpl'; -$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter ); +$gBitSmarty->assignByRef( 'gDefaultCenter', $gDefaultCenter ); $gBitSmarty->assign( 'feedback', $feedback ); diff --git a/lookup_newsletter_edition_inc.php b/lookup_newsletter_edition_inc.php index 7663ca2..5442e78 100644 --- a/lookup_newsletter_edition_inc.php +++ b/lookup_newsletter_edition_inc.php @@ -21,7 +21,7 @@ if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) { $nlId = !empty( $_REQUEST['nl_id'] ) ? $_REQUEST['nl_id'] : NULL; $gContent = new BitNewsletterEdition( $editionId, $conId, $nlId ); $gContent->load(); - $gBitSmarty->assign_by_ref( 'gContent', $gContent ); + $gBitSmarty->assignByRef( 'gContent', $gContent ); } diff --git a/lookup_newsletter_inc.php b/lookup_newsletter_inc.php index 203dc9e..bdb0909 100644 --- a/lookup_newsletter_inc.php +++ b/lookup_newsletter_inc.php @@ -20,7 +20,7 @@ if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) { $conId = !empty( $_REQUEST['content_id'] ) ? $_REQUEST['content_id'] : !empty( $_REQUEST['nl_content_id'] ) && is_numeric( $_REQUEST['nl_content_id'] ) ? $_REQUEST['nl_content_id'] : NULL; $gContent = new BitNewsletter( $nlId, $conId ); $gContent->load(); - $gBitSmarty->assign_by_ref( 'gContent', $gContent ); + $gBitSmarty->assignByRef( 'gContent', $gContent ); } ?> diff --git a/newsletters.php b/newsletters.php index 127e349..be4cd04 100644 --- a/newsletters.php +++ b/newsletters.php @@ -50,8 +50,8 @@ if( isset( $_REQUEST["remove"] ) && $gContent->isValid() ) { $gContent->invokeServices( 'content_edit_function' ); $newsletters = $gContent->getList( $listHash ); -$gBitSmarty->assign_by_ref( 'newsletters', $newsletters ); -$gBitSmarty->assign_by_ref( 'listInfo', $listHash ); +$gBitSmarty->assignByRef( 'newsletters', $newsletters ); +$gBitSmarty->assignByRef( 'listInfo', $listHash ); // Fill array with possible number of questions per page /* @@ -30,8 +30,8 @@ $feedback = array(); /* List newsletters */ $listHash = array(); $newsletters = $gContent->getList( $listHash ); -$gBitSmarty->assign_by_ref( 'subs', BitNewsletter::getUserSubscriptions( $gBitUser->getField( 'user_id' ), $gBitUser->getField( 'email' ) ) ); -$gBitSmarty->assign_by_ref('newsletters', $newsletters ); +$gBitSmarty->assignByRef( 'subs', BitNewsletter::getUserSubscriptions( $gBitUser->getField( 'user_id' ), $gBitUser->getField( 'email' ) ) ); +$gBitSmarty->assignByRef('newsletters', $newsletters ); $foo = parse_url($_SERVER["REQUEST_URI"]); $gBitSmarty->assign('url_subscribe', httpPrefix(). $foo["path"]); |
