]> git.mxchange.org Git - friendica.git/commitdiff
don't use load_view_file() except in email templates and install of htconfig - to...
authorFriendika <info@friendika.com>
Tue, 10 May 2011 23:12:50 +0000 (16:12 -0700)
committerFriendika <info@friendika.com>
Tue, 10 May 2011 23:12:50 +0000 (16:12 -0700)
32 files changed:
boot.php
include/api.php
include/conversation.php
include/items.php
include/nav.php
include/notifier.php
include/salmon.php
mod/contacts.php
mod/crepair.php
mod/dfrn_request.php
mod/directory.php
mod/editpost.php
mod/follow.php
mod/group.php
mod/install.php
mod/invite.php
mod/lostpass.php
mod/message.php
mod/notifications.php
mod/oexchange.php
mod/opensearch.php
mod/photos.php
mod/profile.php
mod/profile_photo.php
mod/profiles.php
mod/register.php
mod/removeme.php
mod/salmon.php
mod/settings.php
mod/viewcontacts.php
mod/xrd.php
view/it/strings.php

index e3798c7ad14f05ac8aefca3e07f60f2c29b0f31f..12d392b44eb301a4850a1d420bb9f8875559cc1b 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -378,7 +378,7 @@ class App {
 
        function init_pagehead() {
                $this->page['title'] = $this->config['sitename'];
-               $tpl = load_view_file('view/head.tpl');
+               $tpl = file_get_contents('view/head.tpl');
                $this->page['htmlhead'] = replace_macros($tpl,array(
                        '$baseurl' => $this->get_baseurl(),
                        '$generator' => 'Friendika' . ' ' . FRIENDIKA_VERSION,
@@ -828,7 +828,7 @@ function escape_tags($string) {
 if(! function_exists('login')) {
 function login($register = false) {
        $o = "";
-       $register_tpl = (($register) ? load_view_file("view/register-link.tpl") : "");
+       $register_tpl = (($register) ? file_get_contents("view/register-link.tpl") : "");
        
        $register_html = replace_macros($register_tpl,array(
                '$title' => t('Create a New Account'),
@@ -852,10 +852,10 @@ function login($register = false) {
        $lostlink = t('Password Reset');
 
        if(local_user()) {
-               $tpl = load_view_file("view/logout.tpl");
+               $tpl = file_get_contents("view/logout.tpl");
        }
        else {
-               $tpl = load_view_file("view/login.tpl");
+               $tpl = file_get_contents("view/login.tpl");
 
        }
 
@@ -2307,7 +2307,7 @@ function profile_sidebar($profile) {
 
        $homepage = ((x($profile,'homepage') == 1) ? '<div class="homepage"><span class="homepage-label">' . t('Homepage:') . ' </span><span class="homepage-url">' . linkify($profile['homepage']) . '</span></div><div class="profile-clear"></div>' : '');
 
-       $tpl = load_view_file('view/profile_vcard.tpl');
+       $tpl = file_get_contents('view/profile_vcard.tpl');
 
        $o .= replace_macros($tpl, array(
                '$fullname' => $fullname,
index 82790a6383f8a329bbe2cd7caed36416c8b811cf..0753962ab983621a0db8985afff378e50807dc03 100644 (file)
                        case "atom":
                        case "xml":
                                $data = api_xmlify($data);
-                               $tpl = load_view_file("view/api_".$templatename."_".$type.".tpl");
+                               $tpl = file_get_contents("view/api_".$templatename."_".$type.".tpl");
                                $ret = replace_macros($tpl, $data);
                                break;
                        case "json":
index 7752342842a918601a710ba13bcd2ead1315b1ba..d3744e21f5418c2ec6e93e3e981e9c9b4bd34627 100644 (file)
@@ -104,11 +104,11 @@ function conversation(&$a, $items, $mode, $update) {
        load_contact_links(local_user());
 
 
-       $cmnt_tpl    = load_view_file('view/comment_item.tpl');
-       $like_tpl    = load_view_file('view/like.tpl');
-       $noshare_tpl = load_view_file('view/like_noshare.tpl');
-       $tpl         = load_view_file('view/wall_item.tpl');
-       $wallwall    = load_view_file('view/wallwall_item.tpl');
+       $cmnt_tpl    = file_get_contents('view/comment_item.tpl');
+       $like_tpl    = file_get_contents('view/like.tpl');
+       $noshare_tpl = file_get_contents('view/like_noshare.tpl');
+       $tpl         = file_get_contents('view/wall_item.tpl');
+       $wallwall    = file_get_contents('view/wallwall_item.tpl');
 
        $alike = array();
        $dlike = array();
@@ -120,8 +120,8 @@ function conversation(&$a, $items, $mode, $update) {
                        // "New Item View" on network page or search page results 
                        // - just loop through the items and format them minimally for display
 
-                       $tpl = load_view_file('view/search_item.tpl');
-                       $droptpl = load_view_file('view/wall_fake_drop.tpl');
+                       $tpl = file_get_contents('view/search_item.tpl');
+                       $droptpl = file_get_contents('view/wall_fake_drop.tpl');
 
                        foreach($items as $item) {
 
@@ -383,7 +383,7 @@ function conversation(&$a, $items, $mode, $update) {
                                        ? '<a class="editpost" href="' . $a->get_baseurl() . '/editpost/' . $item['id'] 
                                                . '" title="' . t('Edit') . '"><img src="images/pencil.gif" /></a>'
                                        : '');
-                       $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
+                       $drop = replace_macros(file_get_contents('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
 
                        $photo = $item['photo'];
                        $thumb = $item['thumb'];
@@ -662,9 +662,9 @@ function status_editor($a,$x) {
 
        $o = '';
                
-       $geotag = (($x['allow_location']) ? load_view_file('view/jot_geotag.tpl') : '');
+       $geotag = (($x['allow_location']) ? file_get_contents('view/jot_geotag.tpl') : '');
 
-               $tpl = load_view_file('view/jot-header.tpl');
+               $tpl = file_get_contents('view/jot-header.tpl');
        
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$baseurl' => $a->get_baseurl(),
@@ -680,7 +680,7 @@ function status_editor($a,$x) {
                ));
 
 
-               $tpl = load_view_file("view/jot.tpl");
+               $tpl = file_get_contents("view/jot.tpl");
                
                $jotplugins = '';
                $jotnets = '';
index b7863f838d104f2e333dac20523946da7e0de234..c75e509cf360724599a3926bec65fc06f3cafef6 100644 (file)
@@ -113,7 +113,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
 
        $items = $r;
 
-       $feed_template = load_view_file('view/atom_feed.tpl');
+       $feed_template = file_get_contents('view/atom_feed.tpl');
 
        $atom = '';
 
index 2ead5c07e9465db1167faf36b6ad2aa0557593a2..602385c32c448d622c1e0573ba48f4350cba0790 100644 (file)
@@ -125,7 +125,7 @@ function nav(&$a) {
                $banner .= '<a href="http://project.friendika.com"><img id="logo-img" src="images/friendika-32.png" alt="logo" /></a><span id="logo-text"><a href="http://project.friendika.com">Friendika</a></span>';
 
 
-       $tpl = load_view_file('view/nav.tpl');
+       $tpl = file_get_contents('view/nav.tpl');
 
        $a->page['nav'] .= replace_macros($tpl, array(
                '$langselector' => lang_selector(),
index b009cc8700defafa6ba3ba0074c0f32eabe52b28..bd061a0c6ea356137112135d110d5539ea35a3dc 100644 (file)
@@ -191,8 +191,8 @@ function notifier_run($argv, $argc){
                        $contacts = $r;
        }
 
-       $feed_template = load_view_file('view/atom_feed.tpl');
-       $mail_template = load_view_file('view/atom_mail.tpl');
+       $feed_template = file_get_contents('view/atom_feed.tpl');
+       $mail_template = file_get_contents('view/atom_mail.tpl');
 
        $atom = '';
        $slaps = array();
index b5c21a87b5641f8636fca2f24d5d6c6ad0aa9ad0..b96ca774f5a14bf2b8626a467d83d78cee61812e 100644 (file)
@@ -161,7 +161,7 @@ EOT;
 
        $signature2  = base64url_encode($rsa->sign($data));
 
-       $salmon_tpl = load_view_file('view/magicsig.tpl');
+       $salmon_tpl = file_get_contents('view/magicsig.tpl');
        $salmon = replace_macros($salmon_tpl,array(
                '$data'      => $data,
                '$encoding'  => $encoding,
index c22bc3c836031ca23afb667bcea19edbd9de4a9c..df75ab2dd95065b18283df668b5d8722643bd5bc 100644 (file)
@@ -14,7 +14,7 @@ function contacts_init(&$a) {
        if(strlen(get_config('system','directory_submit_url')))
                $a->page['aside'] .= '<div class="side-link" id="side-match-link"><a href="match" >' . t('Find People With Shared Interests') . '</a></div>';
 
-       $tpl = load_view_file('view/follow.tpl');
+       $tpl = file_get_contents('view/follow.tpl');
        $a->page['aside'] .= replace_macros($tpl,array(
                '$label' => t('Connect/Follow'),
                '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
@@ -168,7 +168,7 @@ function contacts_content(&$a) {
                        // create an unfollow slap
 
                        if($orig_record[0]['network'] === 'stat') {
-                               $tpl = load_view_file('view/follow_slap.tpl');
+                               $tpl = file_get_contents('view/follow_slap.tpl');
                                $slap = replace_macros($tpl, array(
                                        '$name' => $a->user['username'],
                                        '$profile_page' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
@@ -215,12 +215,12 @@ function contacts_content(&$a) {
                        return;
                }
 
-               $tpl = load_view_file('view/contact_head.tpl');
+               $tpl = file_get_contents('view/contact_head.tpl');
                $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
 
                require_once('include/contact_selectors.php');
 
-               $tpl = load_view_file("view/contact_edit.tpl");
+               $tpl = file_get_contents("view/contact_edit.tpl");
 
                switch($r[0]['rel']) {
                        case REL_BUD:
@@ -317,7 +317,7 @@ function contacts_content(&$a) {
 
        $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');
 
-       $tpl = load_view_file("view/contacts-top.tpl");
+       $tpl = file_get_contents("view/contacts-top.tpl");
        $o .= replace_macros($tpl,array(
                '$header' => t('Contacts'),
                '$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ),
@@ -351,7 +351,7 @@ function contacts_content(&$a) {
 
        if(count($r)) {
 
-               $tpl = load_view_file("view/contact_template.tpl");
+               $tpl = file_get_contents("view/contact_template.tpl");
 
                foreach($r as $rr) {
                        if($rr['self'])
index 617c381f7d52a10bd3b3686a7603784d64038f87..fa50e7219c20706fa2d591ce6f5f4c33609f3d4a 100644 (file)
@@ -80,7 +80,7 @@ function crepair_content(&$a) {
 
        $o .= '<div class="error-message">' . $msg2 . EOL . EOL. $msg3 . '</div>';
 
-       $tpl = load_view_file('view/crepair.tpl');
+       $tpl = file_get_contents('view/crepair.tpl');
        $o .= replace_macros($tpl, array(
                '$label_name' => t('Name'),
                '$label_nick' => t('Account Nickname'),
index 1af0dc85ddf6f6b9103b24fa495e9bc5a1f19c5a..f1807c738ca3d8b6f8b8f43b630b6849fd172b97 100644 (file)
@@ -499,7 +499,7 @@ function dfrn_request_content(&$a) {
                $dfrn_url = notags(trim(hex2bin($_GET['dfrn_url'])));
                $aes_allow = (((x($_GET,'aes_allow')) && ($_GET['aes_allow'] == 1)) ? 1 : 0);
                $confirm_key = (x($_GET,'confirm_key') ? $_GET['confirm_key'] : "");
-               $o .= load_view_file("view/dfrn_req_confirm.tpl");
+               $o .= file_get_contents("view/dfrn_req_confirm.tpl");
                $o  = replace_macros($o,array(
                        '$dfrn_url' => $dfrn_url,
                        '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
@@ -622,9 +622,9 @@ function dfrn_request_content(&$a) {
                 */
 
                if($a->profile['page-flags'] == PAGE_NORMAL)
-                       $tpl = load_view_file('view/dfrn_request.tpl');
+                       $tpl = file_get_contents('view/dfrn_request.tpl');
                else
-                       $tpl = load_view_file('view/auto_request.tpl');
+                       $tpl = file_get_contents('view/auto_request.tpl');
 
                $o .= replace_macros($tpl,array(
                        '$header' => t('Friend/Connection Request'),
index 95ddbda21a162ae3d4bb646466efd5624798ab2c..a83eae3f0be957cb6f065b316c7490bfc54a79fc 100644 (file)
@@ -29,7 +29,7 @@ function directory_content(&$a) {
        else
                $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
 
-       $tpl = load_view_file('view/directory_header.tpl');
+       $tpl = file_get_contents('view/directory_header.tpl');
 
        $globaldir = '';
        $gdirpath = dirname(get_config('system','directory_submit_url'));
@@ -65,7 +65,7 @@ function directory_content(&$a) {
        );
        if(count($r)) {
 
-               $tpl = load_view_file('view/directory_item.tpl');
+               $tpl = file_get_contents('view/directory_item.tpl');
 
                if(in_array('small', $a->argv))
                        $photo = 'thumb';
index fd84fc26d5a4ba24f9ba386315221524854f7741..523f64fd2703b884ef7d82e3ce4fd131ba311bd3 100644 (file)
@@ -31,7 +31,7 @@ function editpost_content(&$a) {
 
        $o .= '<h2>' . t('Edit post') . '</h2>';
 
-       $tpl = load_view_file('view/jot-header.tpl');
+       $tpl = file_get_contents('view/jot-header.tpl');
        
        $a->page['htmlhead'] .= replace_macros($tpl, array(
                '$baseurl' => $a->get_baseurl(),
@@ -41,7 +41,7 @@ function editpost_content(&$a) {
        ));
 
 
-       $tpl = load_view_file("view/jot.tpl");
+       $tpl = file_get_contents("view/jot.tpl");
                
        if(($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))))
                $lockstate = 'lock';
index a1412e6c4e097584b22147a85e03765143d666be..2f3cb3c4d7074069714fe9420de6eea299161d5b 100644 (file)
@@ -133,7 +133,7 @@ function follow_post(&$a) {
 
        // create a follow slap
 
-       $tpl = load_view_file('view/follow_slap.tpl');
+       $tpl = file_get_contents('view/follow_slap.tpl');
        $slap = replace_macros($tpl, array(
                '$name' => $a->user['username'],
                '$profile_page' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
index 75fd0f995760cf10177683f9d82e6529a8e66bfa..2e2c8ab23139c34729aeb40d2fdfbc8bd2ed0905 100644 (file)
@@ -69,7 +69,7 @@ function group_content(&$a) {
        }
 
        if(($a->argc == 2) && ($a->argv[1] === 'new')) {
-               $tpl = load_view_file('view/group_new.tpl');
+               $tpl = file_get_contents('view/group_new.tpl');
                $o .= replace_macros($tpl,array(
                        '$desc' => t('Create a group of contacts/friends.'),
                        '$name' => t('Group Name: '),
@@ -140,7 +140,7 @@ function group_content(&$a) {
                }
 
 
-               $drop_tpl = load_view_file('view/group_drop.tpl');
+               $drop_tpl = file_get_contents('view/group_drop.tpl');
                $drop_txt = replace_macros($drop_tpl, array(
                        '$id' => $group['id'],
                        '$delete' => t('Delete')
@@ -148,7 +148,7 @@ function group_content(&$a) {
 
                $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
-               $tpl = load_view_file('view/group_edit.tpl');
+               $tpl = file_get_contents('view/group_edit.tpl');
                $o .= replace_macros($tpl, array(
                        '$gid' => $group['id'],
                        '$name' => $group['name'],
index 740df6ca98b5c5b6645c49573e73c94c5b87385a..2db3ae08369e27dfd31c46024bcd3e3e24c6cafa 100644 (file)
@@ -116,7 +116,7 @@ function install_content(&$a) {
 
        require_once('datetime.php');
 
-       $tpl = load_view_file('view/install_db.tpl');
+       $tpl = file_get_contents('view/install_db.tpl');
        $o .= replace_macros($tpl, array(
                '$lbl_01' => t('Friendika Social Network'),
                '$lbl_02' => t('Installation'),
index 1c511959574820d0a4646ec8ccea2a3538306559..325ba9fbdefc54d510ff76f597dff2c2736b0b68 100644 (file)
@@ -55,7 +55,7 @@ function invite_content(&$a) {
                return;
        }
 
-       $tpl = load_view_file('view/invite.tpl');
+       $tpl = file_get_contents('view/invite.tpl');
        
        $o = replace_macros($tpl, array(
                '$invite' => t('Send invitations'),
index 8d1cf7629db26155d824d997d0b6ee004bf65047..9a1cf4a9d62a27554f54253ae002c98fdb2f516f 100644 (file)
@@ -73,7 +73,7 @@ function lostpass_content(&$a) {
                        intval($uid)
                );
                if($r) {
-                       $tpl = load_view_file('view/pwdreset.tpl');
+                       $tpl = file_get_contents('view/pwdreset.tpl');
                        $o .= replace_macros($tpl,array(
                                '$lbl1' => t('Password Reset'),
                                '$lbl2' => t('Your password has been reset as requested.'),
@@ -108,7 +108,7 @@ function lostpass_content(&$a) {
        
        }
        else {
-               $tpl = load_view_file('view/lostpass.tpl');
+               $tpl = file_get_contents('view/lostpass.tpl');
 
                $o .= replace_macros($tpl,array(
                        '$title' => t('Forgot your Password?'),
index 7f17a362b3cb518770fd5a2ac3994bc11d8825a0..0f56502566b0c90d065755d412a8d1acdf631abc 100644 (file)
@@ -120,7 +120,7 @@ function message_content(&$a) {
        $myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
 
 
-       $tpl = load_view_file('view/mail_head.tpl');
+       $tpl = file_get_contents('view/mail_head.tpl');
        $header = replace_macros($tpl, array(
                '$messages' => t('Messages'),
                '$inbox' => t('Inbox'),
@@ -164,7 +164,7 @@ function message_content(&$a) {
 
        if(($a->argc > 1) && ($a->argv[1] === 'new')) {
                
-               $tpl = load_view_file('view/msg-header.tpl');
+               $tpl = file_get_contents('view/msg-header.tpl');
 
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$baseurl' => $a->get_baseurl(),
@@ -175,7 +175,7 @@ function message_content(&$a) {
                $preselect = (isset($a->argv[2])?array($a->argv[2]):false);
        
                $select = contact_select('messageto','message-to-select', $preselect, 4, true);
-               $tpl = load_view_file('view/prv_message.tpl');
+               $tpl = file_get_contents('view/prv_message.tpl');
                $o .= replace_macros($tpl,array(
                        '$header' => t('Send Private Message'),
                        '$to' => t('To:'),
@@ -225,7 +225,7 @@ function message_content(&$a) {
                        return $o;
                }
 
-               $tpl = load_view_file('view/mail_list.tpl');
+               $tpl = file_get_contents('view/mail_list.tpl');
                foreach($r as $rr) {
                        $o .= replace_macros($tpl, array(
                                '$id' => $rr['id'],
@@ -275,7 +275,7 @@ function message_content(&$a) {
 
                require_once("include/bbcode.php");
 
-               $tpl = load_view_file('view/msg-header.tpl');
+               $tpl = file_get_contents('view/msg-header.tpl');
        
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$nickname' => $a->user['nickname'],
@@ -283,7 +283,7 @@ function message_content(&$a) {
                ));
 
 
-               $tpl = load_view_file('view/mail_conv.tpl');
+               $tpl = file_get_contents('view/mail_conv.tpl');
                foreach($messages as $message) {
                        if($message['from-url'] == $myprofile) {
                                $from_url = $myprofile;
@@ -309,7 +309,7 @@ function message_content(&$a) {
                }
                $select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />';
                $parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
-               $tpl = load_view_file('view/prv_message.tpl');
+               $tpl = file_get_contents('view/prv_message.tpl');
                $o .= replace_macros($tpl,array(
                        '$header' => t('Send Reply'),
                        '$to' => t('To:'),
index c3f8449ed5340a6148d21f15c039ef841bfc3c26..0c695d0b4799245c4715d522e7de2b9bcb87a796 100644 (file)
@@ -89,13 +89,13 @@ function notifications_content(&$a) {
        if(($r !== false) && (count($r))) {
 
 
-               $tpl = load_view_file("view/intros.tpl");
+               $tpl = file_get_contents("view/intros.tpl");
 
                foreach($r as $rr) {
 
                        $friend_selected = (($rr['network'] !== 'stat') ? ' checked="checked" ' : ' disabled ');
                        $fan_selected = (($rr['network'] === 'stat') ? ' checked="checked" disabled ' : '');
-                       $dfrn_tpl = load_view_file('view/netfriend.tpl');
+                       $dfrn_tpl = file_get_contents('view/netfriend.tpl');
 
                        $knowyou   = '';
                        $dfrn_text = '';
index f97356559ed811648dc228e97d81f7ec4bd56e60..f77cc5262f32a2b606b7f5e70c650cf5640531e5 100644 (file)
@@ -4,7 +4,7 @@
 function oexchange_init(&$a) {
 
        if(($a->argc > 1) && ($a->argv[1] === 'xrd')) {
-               $tpl = load_view_file('view/oexchange_xrd.tpl');
+               $tpl = file_get_contents('view/oexchange_xrd.tpl');
 
                $o = replace_macros($tpl, array('$base' => $a->get_baseurl()));
                echo $o;
index 69afba75c89f7eeb0ea62f2e660af8c7dc353b50..a264bf977e2420da7a02c92f2daecaab285a06c9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
     function opensearch_content(&$a) {
        
-               $tpl = load_view_file('view/opensearch.tpl');
+               $tpl = file_get_contents('view/opensearch.tpl');
        
                header("Content-type: application/opensearchdescription+xml");
        
index 86754cdf4e20b1d44cae3ec576ccfa40168b9c81..b10399215a8c804892c03604255ce29777ed634a 100644 (file)
@@ -828,7 +828,7 @@ function photos_content(&$a) {
 
  
 
-               $tpl = load_view_file('view/photos_upload.tpl');
+               $tpl = file_get_contents('view/photos_upload.tpl');
                $o .= replace_macros($tpl,array(
                        '$pagename' => t('Upload Photos'),
                        '$sessid' => session_id(),
@@ -874,7 +874,7 @@ function photos_content(&$a) {
                if($cmd === 'edit') {           
                        if(($album != t('Profile Photos')) && ($album != t('Contact Photos'))) {
                                if($can_post) {
-                                       $edit_tpl = load_view_file('view/album_edit.tpl');
+                                       $edit_tpl = file_get_contents('view/album_edit.tpl');
                                        $o .= replace_macros($edit_tpl,array(
                                                '$nametext' => t('New album name: '),
                                                '$nickname' => $a->data['user']['nickname'],
@@ -895,7 +895,7 @@ function photos_content(&$a) {
                                }
                        }
                }
-               $tpl = load_view_file('view/photo_album.tpl');
+               $tpl = file_get_contents('view/photo_album.tpl');
                if(count($r))
                        foreach($r as $rr) {
                                $o .= replace_macros($tpl,array(
@@ -1073,7 +1073,7 @@ function photos_content(&$a) {
 
                $edit = Null;
                if(($cmd === 'edit') && ($can_post)) {
-                       $edit_tpl = load_view_file('view/photo_edit.tpl');
+                       $edit_tpl = file_get_contents('view/photo_edit.tpl');
                        $edit = replace_macros($edit_tpl, array(
                                '$id' => $ph[0]['id'],
                                '$album' => $ph[0]['album'],
@@ -1095,11 +1095,11 @@ function photos_content(&$a) {
 
                if(count($linked_items)) {
 
-                       $cmnt_tpl = load_view_file('view/comment_item.tpl');
-                       $tpl = load_view_file('view/photo_item.tpl');
+                       $cmnt_tpl = file_get_contents('view/comment_item.tpl');
+                       $tpl = file_get_contents('view/photo_item.tpl');
                        $return_url = $a->cmd;
 
-                       $like_tpl = load_view_file('view/like_noshare.tpl');
+                       $like_tpl = file_get_contents('view/like_noshare.tpl');
 
                        $likebuttons = '';
 
@@ -1225,7 +1225,7 @@ function photos_content(&$a) {
                                        $drop = '';
 
                                        if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
-                                               $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
+                                               $drop = replace_macros(file_get_contents('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete')));
 
 
                                        $comments .= replace_macros($template,array(
@@ -1247,7 +1247,7 @@ function photos_content(&$a) {
                        $paginate = paginate($a);
                }
                
-               $photo_tpl = load_view_file('view/photo_view.tpl');
+               $photo_tpl = file_get_contents('view/photo_view.tpl');
                $o .= replace_macros($photo_tpl, array(
                        '$id' => $ph[0]['id'],
                        '$album' => array($album_link,$ph[0]['album']),
@@ -1298,7 +1298,7 @@ function photos_content(&$a) {
                        . $a->data['user']['nickname'] . '/upload' . '">' . t('Upload New Photos') . '</a></div>';
        }
 
-       $tpl = load_view_file('view/photo_top.tpl');
+       $tpl = file_get_contents('view/photo_top.tpl');
        if(count($r)) {
                foreach($r as $rr) {
                        $o .= replace_macros($tpl,array(
index 2af6f2429bb1033fa5694cf5f0ce8a18ca64c8a6..0691c64b33f6e10181a8dd5a784d8c560de4e42f 100644 (file)
@@ -104,7 +104,7 @@ function profile_content(&$a, $update = 0) {
                if(x($_GET,'tab'))
                        $tab = notags(trim($_GET['tab']));
 
-               $tpl = load_view_file('view/profile_tabs.tpl');
+               $tpl = file_get_contents('view/profile_tabs.tpl');
 
                $o .= replace_macros($tpl,array(
                        '$url' => $a->get_baseurl() . '/' . $a->cmd,
index e9008ab29ed419552671898db93140024a244070..f77cbfecda829a7493371a1d6ae3f6800da78f84 100644 (file)
@@ -186,7 +186,7 @@ function profile_photo_content(&$a) {
 
        if(! x($a->config,'imagecrop')) {
        
-               $tpl = load_view_file('view/profile_photo.tpl');
+               $tpl = file_get_contents('view/profile_photo.tpl');
 
                $o .= replace_macros($tpl,array(
                        '$user' => $a->user['nickname'],
@@ -201,7 +201,7 @@ function profile_photo_content(&$a) {
        else {
                $filename = $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'] . '.jpg';
                $resolution = $a->config['imagecrop_resolution'];
-               $tpl = load_view_file("view/cropbody.tpl");
+               $tpl = file_get_contents("view/cropbody.tpl");
                $o .= replace_macros($tpl,array(
                        '$filename' => $filename,
                        '$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
@@ -252,7 +252,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
 
        $a->config['imagecrop'] = $hash;
        $a->config['imagecrop_resolution'] = $smallest;
-       $a->page['htmlhead'] .= load_view_file("view/crophead.tpl");
+       $a->page['htmlhead'] .= file_get_contents("view/crophead.tpl");
        return;
 }}
 
index cb8e8c59dc057164f387fe22c53be63b4d1de1c9..32ee130342d2aeca11f4817c0d90cfaaa4d1d0a0 100644 (file)
@@ -347,9 +347,9 @@ function profiles_content(&$a) {
 
                require_once('include/profile_selectors.php');
 
-               $tpl = load_view_file('view/profed_head.tpl');
+               $tpl = file_get_contents('view/profed_head.tpl');
 
-               $opt_tpl = load_view_file("view/profile-hide-friends.tpl");
+               $opt_tpl = file_get_contents("view/profile-hide-friends.tpl");
                $hide_friends = replace_macros($opt_tpl,array(
                        '$desc' => t('Hide my contact/friend list from viewers of this profile?'),
                        '$yes_str' => t('Yes'),
@@ -364,7 +364,7 @@ function profiles_content(&$a) {
 
 
                $is_default = (($r[0]['is-default']) ? 1 : 0);
-               $tpl = load_view_file("view/profile_edit.tpl");
+               $tpl = file_get_contents("view/profile_edit.tpl");
                $o .= replace_macros($tpl,array(
                        '$banner' => t('Edit Profile Details'),
                        '$submit' => t('Submit'),
@@ -451,7 +451,7 @@ function profiles_content(&$a) {
                        local_user());
                if(count($r)) {
 
-                       $tpl_header = load_view_file('view/profile_listing_header.tpl');
+                       $tpl_header = file_get_contents('view/profile_listing_header.tpl');
                        $o .= replace_macros($tpl_header,array(
                                '$header' => t('Profiles'),
                                '$chg_photo' => t('Change profile photo'),
@@ -459,7 +459,7 @@ function profiles_content(&$a) {
                        ));
 
 
-                       $tpl = load_view_file('view/profile_entry.tpl');
+                       $tpl = file_get_contents('view/profile_entry.tpl');
 
                        foreach($r as $rr) {
                                $o .= replace_macros($tpl, array(
index 83e9e289106e98255d34aea773f6847728cdbf12..21d5a1033c37378c775b02afe2d8a14e8eb63013 100644 (file)
@@ -435,7 +435,7 @@ function register_content(&$a) {
                $profile_publish_reg = '<input type="hidden" name="profile_publish_reg" value="1" />';
        }
        else {
-               $publish_tpl = load_view_file("view/profile_publish.tpl");
+               $publish_tpl = file_get_contents("view/profile_publish.tpl");
                $profile_publish = replace_macros($publish_tpl,array(
                        '$instance'     => 'reg',
                        '$pubdesc'      => t('Include your profile in member directory?'),
@@ -450,7 +450,7 @@ function register_content(&$a) {
        $license = t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.');
 
 
-       $o = load_view_file("view/register.tpl");
+       $o = file_get_contents("view/register.tpl");
        $o = replace_macros($o, array(
                '$oidhtml' => $oidhtml,
                '$realpeople' => $realpeople,
index 62b9a6d13aa561491ca8af6d9f7cfcdfcf6ae84e..89b08cdc52c7a4050833b5e9999c0f81bb353f01 100644 (file)
@@ -35,7 +35,7 @@ function removeme_content(&$a) {
 
        $_SESSION['remove_account_verify'] = $hash;
 
-       $tpl = load_view_file('view/removeme.tpl');
+       $tpl = file_get_contents('view/removeme.tpl');
        $o .= replace_macros($tpl, array(
                '$basedir' => $a->get_baseurl(),
                '$hash' => $hash,
index 885ba470c8458e64a8456f9015e52c2cbfd2da82..e93703001cb5f28c302c2a3d81ed389fcdb4d551 100644 (file)
@@ -89,7 +89,7 @@ function salmon_post(&$a) {
 
        // Create a fake feed wrapper so simplepie doesn't choke
 
-       $tpl = load_view_file('view/fake_feed.tpl');
+       $tpl = file_get_contents('view/fake_feed.tpl');
        
        $base = substr($data,strpos($data,'<entry'));
 
index 66b66d22df715e5f77a2591f8eab544b2f3fedf2..22dc794dc054ff9b31ab4993419a7e72fe4f6072 100644 (file)
@@ -310,7 +310,7 @@ function settings_content(&$a) {
        $mail_pubmail = ((count($r)) ? $r[0]['pubmail'] : 0);
 
 
-       $pageset_tpl = load_view_file('view/pagetypes.tpl');
+       $pageset_tpl = file_get_contents('view/pagetypes.tpl');
        $pagetype = replace_macros($pageset_tpl,array(
                '$normal'         => (($a->user['page-flags'] == PAGE_NORMAL)      ? " checked=\"checked\" " : ""),
                '$soapbox'        => (($a->user['page-flags'] == PAGE_SOAPBOX)     ? " checked=\"checked\" " : ""),
@@ -344,7 +344,7 @@ function settings_content(&$a) {
                $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
        }
        else {
-               $opt_tpl = load_view_file("view/profile-in-directory.tpl");
+               $opt_tpl = file_get_contents("view/profile-in-directory.tpl");
                $profile_in_dir = replace_macros($opt_tpl,array(
                        '$desc'         => t('Publish your default profile in site directory?'),
                        '$yes_str'      => t('Yes'),
@@ -355,7 +355,7 @@ function settings_content(&$a) {
        }
 
        if(strlen(get_config('system','directory_submit_url'))) {
-               $opt_tpl = load_view_file("view/profile-in-netdir.tpl");
+               $opt_tpl = file_get_contents("view/profile-in-netdir.tpl");
 
                $profile_in_net_dir = replace_macros($opt_tpl,array(
                        '$desc'         => t('Publish your default profile in global social directory?'),
@@ -397,7 +397,7 @@ function settings_content(&$a) {
 
        $subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl() . '/profile/' . $nickname : '');
 
-       $tpl_addr = load_view_file("view/settings_nick_set.tpl");
+       $tpl_addr = file_get_contents("view/settings_nick_set.tpl");
 
        $prof_addr = replace_macros($tpl_addr,array(
                '$desc' => t('Your Identity Address is'),
@@ -406,7 +406,7 @@ function settings_content(&$a) {
                '$basepath' => $a->get_hostname()
        ));
 
-       $stpl = load_view_file('view/settings.tpl');
+       $stpl = file_get_contents('view/settings.tpl');
 
        $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
index c970db33aa5298c2e531faa3533dc174767372f1..996f7e476e3518c4433292466e4acea209b02303 100644 (file)
@@ -41,7 +41,7 @@ function viewcontacts_content(&$a) {
                return $o;
        }
 
-       $tpl = load_view_file("view/viewcontact_template.tpl");
+       $tpl = file_get_contents("view/viewcontact_template.tpl");
 
        foreach($r as $rr) {
                if($rr['self'])
index a0ecbaea806890aeffa4339abfb2197c30d3b66d..8ac6ff7cfca81d5b174f2d9f7ac309ab17dcbc26 100644 (file)
@@ -27,7 +27,7 @@ function xrd_content(&$a) {
 
        header("Content-type: text/xml");
 
-       $tpl = load_view_file('view/xrd_person.tpl');
+       $tpl = file_get_contents('view/xrd_person.tpl');
 
        $o = replace_macros($tpl, array(
                '$accturi'     => $uri,
index 40cec1c6b9409428a56b15dc5775b4d2aa232fb7..de67aad4d773146ef8ba1e6a2bc3bdfc7090d27a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 function string_plural_select($n){
-       return ($n != 1)\$n";
+       return ($n != 1);
 }
 ;
 $a->strings["Post successful."] = "Inviato con successo.";