Skip to content

Commit c6c3501

Browse files
committed
Move misc inc templates to Includes directory
1 parent 9c881cc commit c6c3501

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+107
-107
lines changed

src/Templates/Comment/Delete.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if ($c)
2626
$c_user_url = $c_user->getURI();
2727
}
2828
$id = $this->getContext()->id;
29-
require('./header.inc.phtml'); ?>
29+
require('./Includes/header.inc.phtml'); ?>
3030
<div class="container">
3131
<? if (is_null($this->getContext()->error)) { ?>
3232

@@ -63,4 +63,4 @@ require('./header.inc.phtml'); ?>
6363

6464
<? } ?>
6565
</div>
66-
<? require('./footer.inc.phtml'); ?>
66+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Comment/Edit.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ($c)
2929
$c_user_url = $c_user->getURI();
3030
$c_user_avatar = $c_user->getAvatarURI(22);
3131
}
32-
require('./header.inc.phtml'); ?>
32+
require('./Includes/header.inc.phtml'); ?>
3333
<div class="container">
3434
<? if (is_null($this->getContext()->error) && !is_null($c)) { ?>
3535

@@ -67,4 +67,4 @@ require('./header.inc.phtml'); ?>
6767

6868
<? } ?>
6969
</div>
70-
<? require('./footer.inc.phtml'); ?>
70+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/Credits.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $top_contributors_by_news_posts = $this->getContext()->top_contributors_by_news_
1212
$top_contributors_by_packets = $this->getContext()->top_contributors_by_packets;
1313
$top_contributors_by_servers = $this->getContext()->top_contributors_by_servers;
1414
$users = []; // used for User object lookup cache
15-
require('./header.inc.phtml');
15+
require('./Includes/header.inc.phtml');
1616
?>
1717
<div class="container">
1818
<h2>Contributors</h2>
@@ -193,4 +193,4 @@ require('./header.inc.phtml');
193193
} ?>
194194
</tbody></table>
195195
</div>
196-
<? require('./footer.inc.phtml'); ?>
196+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/Discord.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $title = 'Discord';
66
$description = 'Join our Discord and have a chat with us!';
77
$this->opengraph->attach(new Pair('url', '/discord'));
88
$this->opengraph->attach(new Pair('type', 'article'));
9-
require('./header.inc.phtml'); ?>
9+
require('./Includes/header.inc.phtml'); ?>
1010
<div class="container">
1111
<h2><?=$title?></h2>
1212
<p><?=$description?></p>
@@ -31,4 +31,4 @@ require('./header.inc.phtml'); ?>
3131
</div>
3232
<? } ?>
3333
</div>
34-
<? require('./footer.inc.phtml'); ?>
34+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/Donate.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $email_address = $this->getContext()->donations->email_address;
1111
$paypal_url = $this->getContext()->donations->paypal_url;
1212
$user_id = $this->getContext()->donations->user_id;
1313
$user = (!empty($user_id) ? new \BNETDocs\Libraries\User\User($user_id) : null);
14-
require('./header.inc.phtml'); ?>
14+
require('./Includes/header.inc.phtml'); ?>
1515
<div class="container">
1616
<h1>Support Us</h1>
1717
<p>The following are the methods available for supporting us:</p>
@@ -39,4 +39,4 @@ require('./header.inc.phtml'); ?>
3939
</ol>
4040
<p>Please see our <a href="<?=Common::relativeUrlToAbsolute('/legal')?>">Legal</a> and <a href="<?=Common::relativeUrlToAbsolute('/privacy')?>">Privacy Policy</a> pages for more info.</p>
4141
</div>
42-
<? require('./footer.inc.phtml'); ?>
42+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/Legal.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $this->opengraph->attach(new Pair('url', '/legal'));
88
$this->opengraph->attach(new Pair('type', 'article'));
99
$email_domain = $this->getContext()->email_domain;
1010
$email_mailbox = $this->getContext()->email_mailbox;
11-
require('./header.inc.phtml'); ?>
11+
require('./Includes/header.inc.phtml'); ?>
1212
<div class="container">
1313
<h1>Disclaimer &amp; Terms of Service</h1>
1414
<p>
@@ -76,4 +76,4 @@ and/or other countries.
7676
<p>Last updated: <time datetime="<?=$this->getContext()->license_version[1]->format('c')?>"><?=$this->getContext()->license_version[1]->format('l, F j, Y')?></time><? if ($this->getContext()->license_version[0]) { ?> (<a href="https://github.com/BNETDocs/bnetdocs-web/commit/<?=$this->getContext()->license_version[0]?>">version</a>)<? } ?></p>
7777
<pre class="border border-primary overflow-auto pre-scrollable rounded bg-dark text-light"><code class="language-plaintext"><?=filter_var($this->getContext()->license, FILTER_SANITIZE_FULL_SPECIAL_CHARS)?></code></pre>
7878
</div>
79-
<? require('./footer.inc.phtml'); ?>
79+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/PrivacyPolicy.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $description = sprintf(
1717
$title, $org, Common::relativeUrlToAbsolute('/')
1818
);
1919

20-
require('./header.inc.phtml'); ?>
20+
require('./Includes/header.inc.phtml'); ?>
2121
<div class="container">
2222
<h1><?=filter_var($title, FILTER_SANITIZE_FULL_SPECIAL_CHARS)?></h1>
2323
<p>Last Updated: March 1, 2024</p>
@@ -106,4 +106,4 @@ require('./header.inc.phtml'); ?>
106106
<?=(Common::$config->discord->enabled ? '<p>Alternatively, you may try reaching ' . filter_var($org, FILTER_SANITIZE_FULL_SPECIAL_CHARS) . ' staff via <a href="' . Common::relativeUrlToAbsolute('/discord') . '">Discord</a>.</p>' : '')?>
107107

108108
</div>
109-
<? require('./footer.inc.phtml'); ?>
109+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Community/Welcome.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $title = 'Welcome';
66
$description = 'Welcome to the documentation and discussion for the Battle.net&trade; protocol';
77
$this->opengraph->attach(new Pair('url', '/welcome'));
88
$this->opengraph->attach(new Pair('type', 'article'));
9-
require('./header.inc.phtml'); ?>
9+
require('./Includes/header.inc.phtml'); ?>
1010
<div class="container">
1111
<h1>Welcome to BNETDocs!</h1>
1212
<p>BNETDocs is a community website that documents and discusses the Battle.net&trade; protocol.</p>
@@ -32,4 +32,4 @@ require('./header.inc.phtml'); ?>
3232
<a class="btn btn-success m-1" href="<?=Common::relativeUrlToAbsolute('/servers')?>">View Servers</a>
3333
</div></div>
3434
</div>
35-
<?php require('./footer.inc.phtml'); ?>
35+
<?php require('./Includes/footer.inc.phtml'); ?>

src/Templates/Core/Legacy.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php namespace BNETDocs\Templates\Core; $title = 'Legacy'; ?>
2-
<?php require('./header.inc.phtml'); ?>
2+
<?php require('./Includes/header.inc.phtml'); ?>
33
<article>
44
<header><?=$title?></header>
55
<section>
@@ -13,4 +13,4 @@
1313
<a href="<?=$this->getContext()->url?>"><?=$this->getContext()->url?></a><br/></p>
1414
</section>
1515
</article>
16-
<?php require('./footer.inc.phtml'); ?>
16+
<?php require('./Includes/footer.inc.phtml'); ?>

src/Templates/Core/Maintenance.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ namespace BNETDocs\Templates\Core;
33
$title = 'Maintenance';
44
$description = $this->getContext()->message;
55
$_header_maintenance = true;
6-
require('./header.inc.phtml'); ?>
6+
require('./Includes/header.inc.phtml'); ?>
77
<div class="container">
88
<div class="alert alert-danger" role="alert">
99
<h4 class="alert-heading"><?=$title?></h4>
1010
<p class="mb-0"><?=$description?></p>
1111
</div>
1212
</div>
13-
<?php require('./footer.inc.phtml'); ?>
13+
<?php require('./Includes/footer.inc.phtml'); ?>

src/Templates/Core/NotFound.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
namespace BNETDocs\Templates\Core;
33
$title = 'Not Found';
44
$description = 'The requested resource does not exist or could not be found.';
5-
require('./header.inc.phtml'); ?>
5+
require('./Includes/header.inc.phtml'); ?>
66
<div class="container">
77
<div class="alert alert-danger" role="alert">
88
<h4 class="alert-heading"><?=$title?></h4>
99
<p class="mb-0"><?=$description?></p>
1010
</div>
1111
</div>
12-
<?php require('./footer.inc.phtml'); ?>
12+
<?php require('./Includes/footer.inc.phtml'); ?>

src/Templates/Core/PhpInfo.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ if (!empty($phpinfo))
2424
$phpinfo = \preg_replace('#\</html\>#', '', $phpinfo);
2525
}
2626

27-
require('./header.inc.phtml');
27+
require('./Includes/header.inc.phtml');
2828

2929
if ($this->getContext()->_responseCode == 401)
3030
{
3131
echo '<div class="container">';
32-
require('./LoginRequired.inc.phtml');
32+
require('./Includes/LoginRequired.inc.phtml');
3333
}
3434
else
3535
{
@@ -38,4 +38,4 @@ else
3838
}
3939

4040
echo '</div>';
41-
require('./footer.inc.phtml');
41+
require('./Includes/footer.inc.phtml');

src/Templates/Core/RedirectSoft.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php /* vim: set colorcolumn= expandtab shiftwidth=2 softtabstop=2 tabstop=4 smarttab: */
22
namespace BNETDocs\Templates\Core;
33
$title = 'Soft Redirect';
4-
require('./header.inc.phtml'); ?>
4+
require('./Includes/header.inc.phtml'); ?>
55
<div class="container">
66
<h1><?=$title?></h1>
77
<div class="alert alert-warning">
88
<p>Location has moved, please follow this link:</p>
99
<p><a href="<?=$this->getContext()->location?>"><?=$this->getContext()->location?></a></p>
1010
</div>
1111
</div>
12-
<? require('./footer.inc.phtml'); ?>
12+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Document/Create.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $form_brief = filter_var($this->getContext()->brief, FILTER_SANITIZE_FULL_SPECIA
2222
$form_content = filter_var($this->getContext()->content, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
2323
$form_markdown = $this->getContext()->markdown;
2424
$form_title = filter_var($this->getContext()->title, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
25-
require('./header.inc.phtml'); ?>
25+
require('./Includes/header.inc.phtml'); ?>
2626
<div class="container">
2727
<h1><?=$title?></h1>
2828
<p><?=$description?></p>
@@ -39,4 +39,4 @@ require('./header.inc.phtml'); ?>
3939
</div>
4040
<? } ?>
4141
</div>
42-
<? require('./footer.inc.phtml'); ?>
42+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Document/Delete.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ switch ($error)
1717
case DeleteModel::ERROR_NOT_LOGGED_IN: $message = 'You must be logged in to delete documents.'; break;
1818
default: $message = $error;
1919
}
20-
require('./header.inc.phtml'); ?>
20+
require('./Includes/header.inc.phtml'); ?>
2121
<div class="container">
2222
<? if ($error === DeleteModel::ERROR_ACL_NOT_SET) { ?>
23-
<? require('./LoginRequired.inc.phtml'); ?>
23+
<? require('./Includes/LoginRequired.inc.phtml'); ?>
2424
<? } else if (\is_null($error)) { ?>
2525
<h1 class="text-danger">Delete Document</h1>
2626
<form method="POST" action="?id=<?=filter_var($id, FILTER_SANITIZE_FULL_SPECIAL_CHARS)?>">
@@ -46,4 +46,4 @@ require('./header.inc.phtml'); ?>
4646
</div>
4747
<? } ?>
4848
</div>
49-
<? require('./footer.inc.phtml'); ?>
49+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Document/Edit.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $form_brief = filter_var($this->getContext()->brief, FILTER_SANITIZE_FULL_SPECIA
2626
$form_content = filter_var($this->getContext()->content, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
2727
$form_markdown = $this->getContext()->markdown;
2828
$form_title = filter_var($this->getContext()->title, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
29-
require('./header.inc.phtml'); ?>
29+
require('./Includes/header.inc.phtml'); ?>
3030
<div class="container">
3131
<? if ($this->getContext()->acl_allowed) { ?>
3232
<h1><?=$title?></h1>
@@ -46,6 +46,6 @@ require('./header.inc.phtml'); ?>
4646
<a class="btn btn-primary" href="<?=Common::relativeUrlToAbsolute('/document/' . rawurlencode($document_id))?>"><img class="float-left" src="<?=Common::relativeUrlToAbsolute('/a/svg/chevron-right-white.svg' . $_unique_asset)?>"/> Return to Document</a>
4747
</div>
4848
<? }
49-
} else { require('./LoginRequired.inc.phtml'); } ?>
49+
} else { require('./Includes/LoginRequired.inc.phtml'); } ?>
5050
</div>
51-
<? require('./footer.inc.phtml'); ?>
51+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/Document/Index.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $form_order_by = [
2121
'user-id-desc' => 'User Id (Descending)',
2222
];
2323
require_once('./MarkdownBootstrapFix.inc.php');
24-
require('./header.inc.phtml'); ?>
24+
require('./Includes/header.inc.phtml'); ?>
2525
<div class="container">
2626
<h2><?=$title?></h2>
2727
<p><?=$description?></p>
@@ -57,7 +57,7 @@ require('./header.inc.phtml'); ?>
5757
$doc_brief = rtrim(Common::stripUpTo(Common::stripUpTo(trim(strip_tags($doc_content)), "\n", 128), '. ', 128), '.');
5858
}
5959
ob_start();
60-
if (!$document->isPublished()) require('./Draft.inc.phtml');
60+
if (!$document->isPublished()) require('./Includes/Draft.inc.phtml');
6161
$doc_draft = ob_get_clean();
6262
if (!empty($doc_draft)) $doc_draft = ' ' . $doc_draft;
6363
printf('<tr><td><strong><a href="%s">%s</a></strong>%s<br/><span class="text-muted">%s</span></td><td>%s</td></tr>',
@@ -77,4 +77,4 @@ require('./header.inc.phtml'); ?>
7777
});
7878
});
7979
</script>
80-
<? $_footer_script = ob_get_clean(); require('./footer.inc.phtml'); ?>
80+
<? $_footer_script = ob_get_clean(); require('./Includes/footer.inc.phtml'); ?>

src/Templates/Document/View.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $delete_url = Common::relativeUrlToAbsolute('/document/delete?id=' . rawurlencod
4343
$edit_visible = ($active_user && $active_user->getOption(User::OPTION_ACL_DOCUMENT_MODIFY));
4444
$delete_visible = ($active_user && $active_user->getOption(User::OPTION_ACL_DOCUMENT_DELETE));
4545
require_once('./MarkdownBootstrapFix.inc.php');
46-
require('./header.inc.phtml'); ?>
46+
require('./Includes/header.inc.phtml'); ?>
4747
<div class="container">
4848
<? if ($object) {
4949
if ($draft) { ?>
@@ -78,4 +78,4 @@ require('./header.inc.phtml'); ?>
7878
<div class="alert alert-danger"><?=filter_var($description, FILTER_SANITIZE_FULL_SPECIAL_CHARS)?></div></div>
7979
<? } ?>
8080
</div>
81-
<? require('./footer.inc.phtml'); ?>
81+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/EventLog/Index.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $order = $this->getContext()->order;
2424
$no_prev = ($page <= 1);
2525
$no_next = ($page >= $pages);
2626

27-
require('./header.inc.phtml'); ?>
27+
require('./Includes/header.inc.phtml'); ?>
2828
<div class="container">
2929
<? if (!$this->getContext()->acl_allowed) { ?>
3030
<div class="alert alert-danger">
@@ -94,4 +94,4 @@ require('./header.inc.phtml'); ?>
9494
</nav>
9595
</div>
9696
<? } ?>
97-
<? require("./footer.inc.phtml"); ?>
97+
<? require("./Includes/footer.inc.phtml"); ?>

src/Templates/EventLog/View.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if (stripos($tpl_referer, '/eventlog/view?id=' . $object_id) !== false)
7171
$tpl_referer = '';
7272
}
7373

74-
require('./header.inc.phtml'); ?>
74+
require('./Includes/header.inc.phtml'); ?>
7575
<div class="container">
7676
<? if (!$this->getContext()->acl_allowed) { ?>
7777
<div class="alert alert-danger">
@@ -101,4 +101,4 @@ require('./header.inc.phtml'); ?>
101101
<? } ?>
102102
<? } ?>
103103
</div>
104-
<? require("./footer.inc.phtml"); ?>
104+
<? require("./Includes/footer.inc.phtml"); ?>
File renamed without changes.

src/Templates/News/Create.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ $form_rss_exempt = $this->getContext()->rss_exempt;
2121
$form_title = filter_var($this->getContext()->title, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
2222
$news_post_id = null;
2323
$news_post_url = null;
24-
require('./header.inc.phtml');
24+
require('./Includes/header.inc.phtml');
2525
if (!$this->getContext()->acl_allowed) {
2626
echo '<div class="container">';
27-
require('./LoginRequired.inc.phtml');
27+
require('./Includes/LoginRequired.inc.phtml');
2828
echo '</div>';
29-
require('./footer.inc.phtml');
29+
require('./Includes/footer.inc.phtml');
3030
return;
3131
} ?>
3232
<div class="container">
@@ -45,4 +45,4 @@ if (!$this->getContext()->acl_allowed) {
4545
</div>
4646
<? } ?>
4747
</div>
48-
<? require('./footer.inc.phtml'); ?>
48+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/News/Delete.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ switch ($error)
1616
case 'INTERNAL_ERROR': $message = 'An internal error occurred while processing your request. Our staff have been notified of the issue. Try again later.'; break;
1717
default: $message = $error;
1818
}
19-
require('./header.inc.phtml'); ?>
19+
require('./Includes/header.inc.phtml'); ?>
2020
<div class="container">
2121
<? if (is_null($this->getContext()->error)) { ?>
2222
<h1 class="text-danger">Delete News Post</h1>
@@ -42,4 +42,4 @@ require('./header.inc.phtml'); ?>
4242
</div>
4343
<? } ?>
4444
</div>
45-
<? require('./footer.inc.phtml'); ?>
45+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/News/Edit.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $form_title = filter_var($this->getContext()->title, FILTER_SANITIZE_FULL_SPECIA
2626
$news_categories = $this->getContext()->news_categories;
2727
$news_post = $this->getContext()->news_post;
2828
$news_post_id = filter_var($this->getContext()->news_post_id, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
29-
require('./header.inc.phtml'); ?>
29+
require('./Includes/header.inc.phtml'); ?>
3030
<div class="container">
3131
<? if ($this->getContext()->acl_allowed) { ?>
3232
<h1><?=$title?></h1>
@@ -44,6 +44,6 @@ require('./header.inc.phtml'); ?>
4444
<p class="mb-0">Your news post has been edited successfully!</p>
4545
</div>
4646
<? }
47-
} else { require('./LoginRequired.inc.phtml'); } ?>
47+
} else { require('./Includes/LoginRequired.inc.phtml'); } ?>
4848
</div>
49-
<? require('./footer.inc.phtml'); ?>
49+
<? require('./Includes/footer.inc.phtml'); ?>

src/Templates/News/Index.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use \CarlBennett\MVC\Libraries\Pair;
66
$title = 'News';
77
$description = 'BNETDocs News';
88
$this->opengraph->attach(new Pair('url', '/news'));
9-
require('./header.inc.phtml');
9+
require('./Includes/header.inc.phtml');
1010

1111
$news_posts = $this->getContext()->news_posts;
1212
$pagination = $this->getContext()->pagination;
@@ -118,4 +118,4 @@ else
118118
}
119119
}
120120

121-
require('./footer.inc.phtml');
121+
require('./Includes/footer.inc.phtml');

0 commit comments

Comments
 (0)