box templates should always run in sandbox mode
authorMarcel Werk <burntime@woltlab.com>
Mon, 31 Oct 2016 10:23:55 +0000 (11:23 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 31 Oct 2016 10:24:04 +0000 (11:24 +0100)
16 files changed:
wcfsetup/install/files/lib/system/box/AbstractCommentListBoxController.class.php
wcfsetup/install/files/lib/system/box/ArticleCategoriesBoxController.class.php
wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php
wcfsetup/install/files/lib/system/box/FollowingsOnlineBoxController.class.php
wcfsetup/install/files/lib/system/box/PageCommentListBoxController.class.php
wcfsetup/install/files/lib/system/box/PaidSubscriptionsBoxController.class.php
wcfsetup/install/files/lib/system/box/RecentActivityListBoxController.class.php
wcfsetup/install/files/lib/system/box/RegisterButtonBoxController.class.php
wcfsetup/install/files/lib/system/box/SignedInAsBoxController.class.php
wcfsetup/install/files/lib/system/box/StaffOnlineListBoxController.class.php
wcfsetup/install/files/lib/system/box/StatisticsBoxController.class.php
wcfsetup/install/files/lib/system/box/TagCloudBoxController.class.php
wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php
wcfsetup/install/files/lib/system/box/UserListBoxController.class.php
wcfsetup/install/files/lib/system/box/UserOnlineListBoxController.class.php
wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php

index 676a99c9083efcf1b60b305320d1b7ac7c67023d..665edfb2583f6f67ad361c95939daf3495eeffe5 100644 (file)
@@ -93,6 +93,6 @@ abstract class AbstractCommentListBoxController extends AbstractDatabaseObjectLi
                return WCF::getTPL()->fetch('boxSidebarCommentList', 'wcf', [
                        'boxCommentList' => $this->objectList,
                        'boxSortField' => $this->sortField
-               ]);
+               ], true);
        }
 }
index 0ad64d53db33fffdac1dfcfbc2c20331cfedebe1..41c9b3fc50356e5ebe78ae20b523c196f2e0435f 100644 (file)
@@ -41,7 +41,7 @@ class ArticleCategoriesBoxController extends AbstractBoxController {
                                }
                        }
                        
-                       $this->content = WCF::getTPL()->fetch('boxArticleCategories', 'wcf', ['categoryList' => $categoryList, 'activeCategory' => $activeCategory]);
+                       $this->content = WCF::getTPL()->fetch('boxArticleCategories', 'wcf', ['categoryList' => $categoryList, 'activeCategory' => $activeCategory], true);
                }
        }
 }
index e4e73362cb3cdd0246b9a8868be3805028958a4c..b85c3cb57253ed767cfaa19a1bab2d756055b9a5 100644 (file)
@@ -79,6 +79,6 @@ class ArticleListBoxController extends AbstractDatabaseObjectListBoxController {
                        'boxArticleList' => $this->objectList,
                        'boxSortField' => $this->sortField,
                        'boxPosition' => $this->box->position
-               ]);
+               ], true);
        }
 }
index 7b3e77a284337b5000da88f62eb8108283e8d7cd..44cf164d9ce92c317c3b330e457e9e32b7eba9bd 100644 (file)
@@ -38,7 +38,7 @@ class FollowingsOnlineBoxController extends AbstractDatabaseObjectListBoxControl
         * @inheritDoc
         */
        protected function getTemplate() {
-               return WCF::getTPL()->fetch('boxFollowingsOnline', 'wcf', ['usersOnlineList' => $this->objectList]);
+               return WCF::getTPL()->fetch('boxFollowingsOnline', 'wcf', ['usersOnlineList' => $this->objectList], true);
        }
        
        /**
index 25dc055faa7f9633e02e7b9e83f83de5500d4a92..5060045104557d8f064b120c781feabb794fb460 100644 (file)
@@ -40,7 +40,7 @@ class PageCommentListBoxController extends AbstractDatabaseObjectListBoxControll
                        'lastCommentTime' => $this->objectList->getMinCommentTime(),
                        'pageID' => RequestHandler::getInstance()->getActiveRequest()->getPageID(),
                        'likeData' => (MODULE_LIKE && $this->objectList) ? $this->objectList->getLikeData() : []
-               ]);
+               ], true);
        }
        
        /**
index 7f41eddd60a2abc17bb3057537c8953089e9e3d7..99172b5a27dee015434159ea3bf46aad7bd1b3d0 100644 (file)
@@ -72,11 +72,7 @@ class PaidSubscriptionsBoxController extends AbstractBoxController {
                                        $templateName = 'boxPaidSubscriptionsSidebar';
                                }
                                
-                               WCF::getTPL()->assign([
-                                       'subscriptions' => $subscriptions
-                               ]);
-                               
-                               $this->content = WCF::getTPL()->fetch($templateName);
+                               $this->content = WCF::getTPL()->fetch($templateName, 'wcf', ['subscriptions' => $subscriptions], true);
                        }
                }
        }
index 81103332069472e86648d31a7dfb945210c66626..c0708a77ccfba425a3e64d4f13f533d9c60cec9a 100644 (file)
@@ -97,12 +97,12 @@ class RecentActivityListBoxController extends AbstractDatabaseObjectListBoxContr
                                'eventList' => $this->objectList,
                                'lastEventTime' => $this->objectList->getLastEventTime(),
                                'filteredByFollowedUsers' => $this->filteredByFollowedUsers
-                       ]);
+                       ], true);
                }
                else {
                        return WCF::getTPL()->fetch('boxRecentActivitySidebar', 'wcf', [
                                'eventList' => $this->objectList
-                       ]);
+                       ], true);
                }
        }
        
index 140dadf146a60d7ee7bffe8c56451545fafbc4b0..2517fffaac24328aaf77ecb43a488c8e99751e4a 100644 (file)
@@ -22,7 +22,7 @@ class RegisterButtonBoxController extends AbstractBoxController {
         */
        protected function loadContent() {
                if (!WCF::getUser()->userID && !REGISTER_DISABLED) {
-                       $this->content = WCF::getTPL()->fetch('boxRegisterButton');
+                       $this->content = WCF::getTPL()->fetch('boxRegisterButton', 'wcf', [], true);
                }
        }
 }
index 8c58868372f463e69bef2b3e0950ba6545862ca4..8d5ede5efb19a31ad9a31bd214194f563a1a2b1d 100644 (file)
@@ -22,7 +22,7 @@ class SignedInAsBoxController extends AbstractBoxController {
         */
        protected function loadContent() {
                if (WCF::getUser()->userID) {
-                       $this->content = WCF::getTPL()->fetch('boxSignedInAs');
+                       $this->content = WCF::getTPL()->fetch('boxSignedInAs', 'wcf', [], true);
                }
        }
 }
index 023bcc94af494094f3bdccacf81a80688a4ed8d1..c0c22edeb713fdabd796f6e587a86a07bb404e54 100644 (file)
@@ -32,7 +32,7 @@ class StaffOnlineListBoxController extends AbstractDatabaseObjectListBoxControll
         * @inheritDoc
         */
        protected function getTemplate() {
-               return WCF::getTPL()->fetch('boxStaffOnline', 'wcf', ['usersOnlineList' => $this->objectList]);
+               return WCF::getTPL()->fetch('boxStaffOnline', 'wcf', ['usersOnlineList' => $this->objectList], true);
        }
        
        /**
index 0ef13cb6cf2d6ce3329c363f70c64144b7ff55ec..b8857a3d126d3397711707ebb0f0b0b11d23af52 100644 (file)
@@ -22,10 +22,6 @@ class StatisticsBoxController extends AbstractBoxController {
         * @inheritDoc
         */
        protected function loadContent() {
-               WCF::getTPL()->assign([
-                       'statistics' => UserStatsCacheBuilder::getInstance()->getData()
-               ]);
-               
-               $this->content = WCF::getTPL()->fetch('boxStatistics');
+               $this->content = WCF::getTPL()->fetch('boxStatistics', 'wcf', ['statistics' => UserStatsCacheBuilder::getInstance()->getData()], true);
        }
 }
index 7f4f207889ec77446b63009e2097564a04919bd5..23a43308eefaf37ed3e9d6dd9b83f3c3a6bcdeb8 100644 (file)
@@ -50,12 +50,10 @@ class TagCloudBoxController extends AbstractBoxController {
                        $tags = $tagCloud->getTags();
                        
                        if (!empty($tags)) {
-                               WCF::getTPL()->assign([
+                               $this->content = WCF::getTPL()->fetch('tagCloudBox', 'wcf', [
                                        'tags' => $tags,
                                        'taggableObjectType' => $this->objectType
-                               ]);
-                               
-                               $this->content = WCF::getTPL()->fetch('tagCloudBox');
+                               ], true);
                        }
                }
        }
index f053286fa90c1a48cf3daa3695d5f1ae0ab89313..e4a2652a3e4d61d408335bbf08333db04fc1f1a4 100644 (file)
@@ -62,10 +62,9 @@ class TodaysBirthdaysBoxController extends AbstractBoxController {
                                }
                                
                                if (!empty($visibleUserProfiles)) {
-                                       WCF::getTPL()->assign([
+                                       $this->content = WCF::getTPL()->fetch($this->templateName, 'wcf', [
                                                'birthdayUserProfiles' => $visibleUserProfiles
-                                       ]);
-                                       $this->content = WCF::getTPL()->fetch($this->templateName);
+                                       ], true);
                                }
                        }
                }
index fb653206cbc177b3bd2b767dcc6c881f3f89aaab..293be03ca28965b83d514f47d2deb4373a905d6d 100644 (file)
@@ -115,7 +115,7 @@ class UserListBoxController extends AbstractDatabaseObjectListBoxController {
                return WCF::getTPL()->fetch('boxUserList', 'wcf', [
                        'boxUsers' => $this->userIDs !== null ? $userProfiles : $this->objectList->getObjects(),
                        'boxSortField' => $this->box->sortField
-               ]);
+               ], true);
        }
        
        /**
index c183a5e86e3db1d291531c639e1854de6513166c..c0752571b6dd8f5dfd78677bbcc44c04b35111fc 100644 (file)
@@ -64,7 +64,7 @@ class UserOnlineListBoxController extends AbstractDatabaseObjectListBoxControlle
                        $templateName = 'boxUsersOnline';
                }
                
-               return WCF::getTPL()->fetch($templateName, 'wcf', ['usersOnlineList' => $this->objectList, '__showRecord' => $this->showRecord]);
+               return WCF::getTPL()->fetch($templateName, 'wcf', ['usersOnlineList' => $this->objectList, '__showRecord' => $this->showRecord], true);
        }
        
        /**
index e6b7502388a7cad080ca9cad20d864619c2b5046..d1b57b04763acab5e713cec0bedf18c1fde9d43d 100644 (file)
@@ -58,7 +58,7 @@ class WhoWasOnlineBoxController extends AbstractDatabaseObjectListBoxController
                        'whoWasOnlineList' => $this->users,
                        'boxPosition' => $this->box->position,
                        'whoWasOnlineTimeFormat' => DateUtil::TIME_FORMAT
-               ]);
+               ], true);
        }
        
        /**