From 1eaa523e611abb7ba0217da77a70837ea9547812 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 20 Sep 2018 21:02:28 -0400 Subject: [PATCH] Remove unused App->page['end'] - Remove unused empty templates --- include/conversation.php | 15 --------------- include/text.php | 3 --- mod/cal.php | 5 ----- mod/contacts.php | 9 --------- mod/editpost.php | 9 --------- mod/events.php | 5 ----- mod/message.php | 20 -------------------- mod/profile_photo.php | 1 - mod/profiles.php | 3 --- mod/settings.php | 5 ----- mod/videos.php | 6 ------ mod/wallmessage.php | 7 ------- src/App.php | 1 - view/templates/contact_end.tpl | 1 - view/templates/contacts-end.tpl | 1 - view/templates/cropend.tpl | 1 - view/templates/end.tpl | 1 - view/templates/event_end.tpl | 1 - view/templates/jot-end.tpl | 1 - view/templates/message-end.tpl | 1 - view/templates/msg-end.tpl | 1 - view/templates/profed_end.tpl | 1 - view/templates/videos_end.tpl | 0 view/templates/wallmsg-end.tpl | 1 - 24 files changed, 99 deletions(-) delete mode 100644 view/templates/contact_end.tpl delete mode 100644 view/templates/contacts-end.tpl delete mode 100644 view/templates/cropend.tpl delete mode 100644 view/templates/end.tpl delete mode 100644 view/templates/event_end.tpl delete mode 100644 view/templates/jot-end.tpl delete mode 100644 view/templates/message-end.tpl delete mode 100644 view/templates/msg-end.tpl delete mode 100644 view/templates/profed_end.tpl delete mode 100644 view/templates/videos_end.tpl delete mode 100644 view/templates/wallmsg-end.tpl diff --git a/include/conversation.php b/include/conversation.php index ca01997f6a..d791fa4141 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1091,21 +1091,6 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) '$delitems' => L10n::t("Delete item\x28s\x29?") ]); - $tpl = get_markup_template('jot-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$newpost' => 'true', - '$baseurl' => System::baseUrl(true), - '$geotag' => $geotag, - '$nickname' => $x['nickname'], - '$ispublic' => L10n::t('Visible to everybody'), - '$linkurl' => L10n::t('Please enter a link URL:'), - '$vidurl' => L10n::t("Please enter a video link/URL:"), - '$audurl' => L10n::t("Please enter an audio link/URL:"), - '$term' => L10n::t('Tag term:'), - '$fileas' => L10n::t('Save to Folder:'), - '$whereareu' => L10n::t('Where are you right now?') - ]); - $jotplugins = ''; Addon::callHooks('jot_tool', $jotplugins); diff --git a/include/text.php b/include/text.php index d251824e2b..53b8061221 100644 --- a/include/text.php +++ b/include/text.php @@ -1191,9 +1191,6 @@ function prepare_body(array &$item, $attach = false, $is_preview = false) $a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), [ '$baseurl' => System::baseUrl(), ]); - $a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), [ - '$baseurl' => System::baseUrl(), - ]); } $url_parts = explode('/', $the_url); diff --git a/mod/cal.php b/mod/cal.php index bdedaaacfa..ae1060c47a 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -94,11 +94,6 @@ function cal_content(App $a) '$i18n' => $i18n, ]); - $etpl = get_markup_template('event_end.tpl'); - $a->page['end'] .= replace_macros($etpl, [ - '$baseurl' => System::baseUrl(), - ]); - $mode = 'view'; $y = 0; $m = 0; diff --git a/mod/contacts.php b/mod/contacts.php index 4e87697172..86d7e2ac65 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -112,12 +112,6 @@ function contacts_init(App $a) '$baseurl' => System::baseUrl(true), '$base' => $base ]); - - $tpl = get_markup_template("contacts-end.tpl"); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(true), - '$base' => $base - ]); } function contacts_batch_actions(App $a) @@ -503,9 +497,6 @@ function contacts_content(App $a, $update = 0) $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), [ '$baseurl' => System::baseUrl(true), ]); - $a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), [ - '$baseurl' => System::baseUrl(true), - ]); $contact['blocked'] = Contact::isBlockedByUser($contact['id'], local_user()); $contact['readonly'] = Contact::isIgnoredByUser($contact['id'], local_user()); diff --git a/mod/editpost.php b/mod/editpost.php index 258585ef1c..b8ccff470e 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -51,15 +51,6 @@ function editpost_content(App $a) '$nickname' => $a->user['nickname'] ]); - $tpl = get_markup_template('jot-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(), - '$ispublic' => ' ', // L10n::t('Visible to everybody'), - '$geotag' => $geotag, - '$nickname' => $a->user['nickname'] - ]); - - $tpl = get_markup_template("jot.tpl"); if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) { diff --git a/mod/events.php b/mod/events.php index 91474022fc..fd658a9cef 100644 --- a/mod/events.php +++ b/mod/events.php @@ -229,11 +229,6 @@ function events_content(App $a) { '$i18n' => $i18n, ]); - $etpl = get_markup_template('event_end.tpl'); - $a->page['end'] .= replace_macros($etpl, [ - '$baseurl' => System::baseUrl(), - ]); - $o = ''; $tabs = ''; // tabs diff --git a/mod/message.php b/mod/message.php index 8c9aa657df..23d528a8aa 100644 --- a/mod/message.php +++ b/mod/message.php @@ -46,12 +46,6 @@ function message_init(App $a) '$baseurl' => System::baseUrl(true), '$base' => $base ]); - - $end_tpl = get_markup_template('message-end.tpl'); - $a->page['end'] .= replace_macros($end_tpl, [ - '$baseurl' => System::baseUrl(true), - '$base' => $base - ]); } function message_post(App $a) @@ -199,13 +193,6 @@ function message_content(App $a) '$linkurl' => L10n::t('Please enter a link URL:') ]); - $tpl = get_markup_template('msg-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(true), - '$nickname' => $a->user['nickname'], - '$linkurl' => L10n::t('Please enter a link URL:') - ]); - $preselect = isset($a->argv[2]) ? [$a->argv[2]] : []; $prename = $preurl = $preid = ''; @@ -344,13 +331,6 @@ function message_content(App $a) '$linkurl' => L10n::t('Please enter a link URL:') ]); - $tpl = get_markup_template('msg-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(true), - '$nickname' => $a->user['nickname'], - '$linkurl' => L10n::t('Please enter a link URL:') - ]); - $mails = []; $seen = 0; $unknown = false; diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 567a7f3a25..984ebfed6f 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -317,7 +317,6 @@ function profile_photo_crop_ui_head(App $a, Image $image) } $a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), []); - $a->page['end'] .= replace_macros(get_markup_template("cropend.tpl"), []); $imagecrop = [ 'hash' => $hash, diff --git a/mod/profiles.php b/mod/profiles.php index d951a470d7..76491c553e 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -527,9 +527,6 @@ function profiles_content(App $a) { $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), [ '$baseurl' => System::baseUrl(true), ]); - $a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), [ - '$baseurl' => System::baseUrl(true), - ]); $opt_tpl = get_markup_template("profile-hide-friends.tpl"); $hide_friends = replace_macros($opt_tpl,[ diff --git a/mod/settings.php b/mod/settings.php index 84bc230e30..78fa446ce0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -982,11 +982,6 @@ function settings_content(App $a) '$theme_config' => $theme_config, ]); - $tpl = get_markup_template('settings/display_end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$theme' => ['theme', L10n::t('Display Theme:'), $theme_selected, '', $themes] - ]); - return $o; } diff --git a/mod/videos.php b/mod/videos.php index e622e17f0f..4bd0ab4f32 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -105,12 +105,6 @@ function videos_init(App $a) $a->page['htmlhead'] .= replace_macros($tpl,[ '$baseurl' => System::baseUrl(), ]); - - $tpl = get_markup_template("videos_end.tpl"); - $a->page['end'] .= replace_macros($tpl,[ - '$baseurl' => System::baseUrl(), - ]); - } return; diff --git a/mod/wallmessage.php b/mod/wallmessage.php index 5606b6feed..5e08420ecb 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -120,13 +120,6 @@ function wallmessage_content(App $a) { '$linkurl' => L10n::t('Please enter a link URL:') ]); - $tpl = get_markup_template('wallmsg-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(true), - '$nickname' => $user['nickname'], - '$linkurl' => L10n::t('Please enter a link URL:') - ]); - $tpl = get_markup_template('wallmessage.tpl'); $o = replace_macros($tpl, [ '$header' => L10n::t('Send Private Message'), diff --git a/src/App.php b/src/App.php index 1a26dd6507..26bc7362f1 100644 --- a/src/App.php +++ b/src/App.php @@ -318,7 +318,6 @@ class App 'aside' => '', 'bottom' => '', 'content' => '', - 'end' => '', 'footer' => '', 'htmlhead' => '', 'nav' => '', diff --git a/view/templates/contact_end.tpl b/view/templates/contact_end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/contact_end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/contacts-end.tpl b/view/templates/contacts-end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/contacts-end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/cropend.tpl b/view/templates/cropend.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/cropend.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/end.tpl b/view/templates/end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/event_end.tpl b/view/templates/event_end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/event_end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/jot-end.tpl b/view/templates/jot-end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/jot-end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/message-end.tpl b/view/templates/message-end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/message-end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/msg-end.tpl b/view/templates/msg-end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/msg-end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/profed_end.tpl b/view/templates/profed_end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/profed_end.tpl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/view/templates/videos_end.tpl b/view/templates/videos_end.tpl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/view/templates/wallmsg-end.tpl b/view/templates/wallmsg-end.tpl deleted file mode 100644 index 8b13789179..0000000000 --- a/view/templates/wallmsg-end.tpl +++ /dev/null @@ -1 +0,0 @@ -