Changeset 3874:ab8368569446 for inc/public
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- Location:
- inc/public
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/class.dc.template.php
r3731 r3874 29 29 30 30 # Transitional tags 31 $this->addValue('EntryTrackbackCount', array($this, 'EntryPingCount'));32 $this->addValue('EntryTrackbackData', array($this, 'EntryPingData'));33 $this->addValue('EntryTrackbackLink', array($this, 'EntryPingLink'));31 $this->addValue('EntryTrackbackCount', [$this, 'EntryPingCount']); 32 $this->addValue('EntryTrackbackData', [$this, 'EntryPingData']); 33 $this->addValue('EntryTrackbackLink', [$this, 'EntryPingLink']); 34 34 35 35 # l10n 36 $this->addValue('lang', array($this, 'l10n'));36 $this->addValue('lang', [$this, 'l10n']); 37 37 38 38 # Loops test tags 39 $this->addBlock('LoopPosition', array($this, 'LoopPosition'));40 $this->addValue('LoopIndex', array($this, 'LoopIndex'));39 $this->addBlock('LoopPosition', [$this, 'LoopPosition']); 40 $this->addValue('LoopIndex', [$this, 'LoopIndex']); 41 41 42 42 # Archives 43 $this->addBlock('Archives', array($this, 'Archives'));44 $this->addBlock('ArchivesHeader', array($this, 'ArchivesHeader'));45 $this->addBlock('ArchivesFooter', array($this, 'ArchivesFooter'));46 $this->addBlock('ArchivesYearHeader', array($this, 'ArchivesYearHeader'));47 $this->addBlock('ArchivesYearFooter', array($this, 'ArchivesYearFooter'));48 $this->addValue('ArchiveDate', array($this, 'ArchiveDate'));49 $this->addBlock('ArchiveNext', array($this, 'ArchiveNext'));50 $this->addBlock('ArchivePrevious', array($this, 'ArchivePrevious'));51 $this->addValue('ArchiveEntriesCount', array($this, 'ArchiveEntriesCount'));52 $this->addValue('ArchiveURL', array($this, 'ArchiveURL'));43 $this->addBlock('Archives', [$this, 'Archives']); 44 $this->addBlock('ArchivesHeader', [$this, 'ArchivesHeader']); 45 $this->addBlock('ArchivesFooter', [$this, 'ArchivesFooter']); 46 $this->addBlock('ArchivesYearHeader', [$this, 'ArchivesYearHeader']); 47 $this->addBlock('ArchivesYearFooter', [$this, 'ArchivesYearFooter']); 48 $this->addValue('ArchiveDate', [$this, 'ArchiveDate']); 49 $this->addBlock('ArchiveNext', [$this, 'ArchiveNext']); 50 $this->addBlock('ArchivePrevious', [$this, 'ArchivePrevious']); 51 $this->addValue('ArchiveEntriesCount', [$this, 'ArchiveEntriesCount']); 52 $this->addValue('ArchiveURL', [$this, 'ArchiveURL']); 53 53 54 54 # Blog 55 $this->addValue('BlogArchiveURL', array($this, 'BlogArchiveURL'));56 $this->addValue('BlogCopyrightNotice', array($this, 'BlogCopyrightNotice'));57 $this->addValue('BlogDescription', array($this, 'BlogDescription'));58 $this->addValue('BlogEditor', array($this, 'BlogEditor'));59 $this->addValue('BlogFeedID', array($this, 'BlogFeedID'));60 $this->addValue('BlogFeedURL', array($this, 'BlogFeedURL'));61 $this->addValue('BlogRSDURL', array($this, 'BlogRSDURL'));62 $this->addValue('BlogName', array($this, 'BlogName'));63 $this->addValue('BlogLanguage', array($this, 'BlogLanguage'));64 $this->addValue('BlogThemeURL', array($this, 'BlogThemeURL'));65 $this->addValue('BlogParentThemeURL', array($this, 'BlogParentThemeURL'));66 $this->addValue('BlogUpdateDate', array($this, 'BlogUpdateDate'));67 $this->addValue('BlogID', array($this, 'BlogID'));68 $this->addValue('BlogURL', array($this, 'BlogURL'));69 $this->addValue('BlogXMLRPCURL', array($this, 'BlogXMLRPCURL'));70 $this->addValue('BlogPublicURL', array($this, 'BlogPublicURL'));71 $this->addValue('BlogQmarkURL', array($this, 'BlogQmarkURL'));72 $this->addValue('BlogMetaRobots', array($this, 'BlogMetaRobots'));73 $this->addValue('BlogJsJQuery', array($this, 'BlogJsJQuery'));55 $this->addValue('BlogArchiveURL', [$this, 'BlogArchiveURL']); 56 $this->addValue('BlogCopyrightNotice', [$this, 'BlogCopyrightNotice']); 57 $this->addValue('BlogDescription', [$this, 'BlogDescription']); 58 $this->addValue('BlogEditor', [$this, 'BlogEditor']); 59 $this->addValue('BlogFeedID', [$this, 'BlogFeedID']); 60 $this->addValue('BlogFeedURL', [$this, 'BlogFeedURL']); 61 $this->addValue('BlogRSDURL', [$this, 'BlogRSDURL']); 62 $this->addValue('BlogName', [$this, 'BlogName']); 63 $this->addValue('BlogLanguage', [$this, 'BlogLanguage']); 64 $this->addValue('BlogThemeURL', [$this, 'BlogThemeURL']); 65 $this->addValue('BlogParentThemeURL', [$this, 'BlogParentThemeURL']); 66 $this->addValue('BlogUpdateDate', [$this, 'BlogUpdateDate']); 67 $this->addValue('BlogID', [$this, 'BlogID']); 68 $this->addValue('BlogURL', [$this, 'BlogURL']); 69 $this->addValue('BlogXMLRPCURL', [$this, 'BlogXMLRPCURL']); 70 $this->addValue('BlogPublicURL', [$this, 'BlogPublicURL']); 71 $this->addValue('BlogQmarkURL', [$this, 'BlogQmarkURL']); 72 $this->addValue('BlogMetaRobots', [$this, 'BlogMetaRobots']); 73 $this->addValue('BlogJsJQuery', [$this, 'BlogJsJQuery']); 74 74 75 75 # Categories 76 $this->addBlock('Categories', array($this, 'Categories'));77 $this->addBlock('CategoriesHeader', array($this, 'CategoriesHeader'));78 $this->addBlock('CategoriesFooter', array($this, 'CategoriesFooter'));79 $this->addBlock('CategoryIf', array($this, 'CategoryIf'));80 $this->addBlock('CategoryFirstChildren', array($this, 'CategoryFirstChildren'));81 $this->addBlock('CategoryParents', array($this, 'CategoryParents'));82 $this->addValue('CategoryFeedURL', array($this, 'CategoryFeedURL'));83 $this->addValue('CategoryURL', array($this, 'CategoryURL'));84 $this->addValue('CategoryShortURL', array($this, 'CategoryShortURL'));85 $this->addValue('CategoryDescription', array($this, 'CategoryDescription'));86 $this->addValue('CategoryTitle', array($this, 'CategoryTitle'));87 $this->addValue('CategoryEntriesCount', array($this, 'CategoryEntriesCount'));76 $this->addBlock('Categories', [$this, 'Categories']); 77 $this->addBlock('CategoriesHeader', [$this, 'CategoriesHeader']); 78 $this->addBlock('CategoriesFooter', [$this, 'CategoriesFooter']); 79 $this->addBlock('CategoryIf', [$this, 'CategoryIf']); 80 $this->addBlock('CategoryFirstChildren', [$this, 'CategoryFirstChildren']); 81 $this->addBlock('CategoryParents', [$this, 'CategoryParents']); 82 $this->addValue('CategoryFeedURL', [$this, 'CategoryFeedURL']); 83 $this->addValue('CategoryURL', [$this, 'CategoryURL']); 84 $this->addValue('CategoryShortURL', [$this, 'CategoryShortURL']); 85 $this->addValue('CategoryDescription', [$this, 'CategoryDescription']); 86 $this->addValue('CategoryTitle', [$this, 'CategoryTitle']); 87 $this->addValue('CategoryEntriesCount', [$this, 'CategoryEntriesCount']); 88 88 89 89 # Comments 90 $this->addBlock('Comments', array($this, 'Comments'));91 $this->addValue('CommentAuthor', array($this, 'CommentAuthor'));92 $this->addValue('CommentAuthorDomain', array($this, 'CommentAuthorDomain'));93 $this->addValue('CommentAuthorLink', array($this, 'CommentAuthorLink'));94 $this->addValue('CommentAuthorMailMD5', array($this, 'CommentAuthorMailMD5'));95 $this->addValue('CommentAuthorURL', array($this, 'CommentAuthorURL'));96 $this->addValue('CommentContent', array($this, 'CommentContent'));97 $this->addValue('CommentDate', array($this, 'CommentDate'));98 $this->addValue('CommentTime', array($this, 'CommentTime'));99 $this->addValue('CommentEmail', array($this, 'CommentEmail'));100 $this->addValue('CommentEntryTitle', array($this, 'CommentEntryTitle'));101 $this->addValue('CommentFeedID', array($this, 'CommentFeedID'));102 $this->addValue('CommentID', array($this, 'CommentID'));103 $this->addBlock('CommentIf', array($this, 'CommentIf'));104 $this->addValue('CommentIfFirst', array($this, 'CommentIfFirst'));105 $this->addValue('CommentIfMe', array($this, 'CommentIfMe'));106 $this->addValue('CommentIfOdd', array($this, 'CommentIfOdd'));107 $this->addValue('CommentIP', array($this, 'CommentIP'));108 $this->addValue('CommentOrderNumber', array($this, 'CommentOrderNumber'));109 $this->addBlock('CommentsFooter', array($this, 'CommentsFooter'));110 $this->addBlock('CommentsHeader', array($this, 'CommentsHeader'));111 $this->addValue('CommentPostURL', array($this, 'CommentPostURL'));112 $this->addBlock('IfCommentAuthorEmail', array($this, 'IfCommentAuthorEmail'));113 $this->addValue('CommentHelp', array($this, 'CommentHelp'));90 $this->addBlock('Comments', [$this, 'Comments']); 91 $this->addValue('CommentAuthor', [$this, 'CommentAuthor']); 92 $this->addValue('CommentAuthorDomain', [$this, 'CommentAuthorDomain']); 93 $this->addValue('CommentAuthorLink', [$this, 'CommentAuthorLink']); 94 $this->addValue('CommentAuthorMailMD5', [$this, 'CommentAuthorMailMD5']); 95 $this->addValue('CommentAuthorURL', [$this, 'CommentAuthorURL']); 96 $this->addValue('CommentContent', [$this, 'CommentContent']); 97 $this->addValue('CommentDate', [$this, 'CommentDate']); 98 $this->addValue('CommentTime', [$this, 'CommentTime']); 99 $this->addValue('CommentEmail', [$this, 'CommentEmail']); 100 $this->addValue('CommentEntryTitle', [$this, 'CommentEntryTitle']); 101 $this->addValue('CommentFeedID', [$this, 'CommentFeedID']); 102 $this->addValue('CommentID', [$this, 'CommentID']); 103 $this->addBlock('CommentIf', [$this, 'CommentIf']); 104 $this->addValue('CommentIfFirst', [$this, 'CommentIfFirst']); 105 $this->addValue('CommentIfMe', [$this, 'CommentIfMe']); 106 $this->addValue('CommentIfOdd', [$this, 'CommentIfOdd']); 107 $this->addValue('CommentIP', [$this, 'CommentIP']); 108 $this->addValue('CommentOrderNumber', [$this, 'CommentOrderNumber']); 109 $this->addBlock('CommentsFooter', [$this, 'CommentsFooter']); 110 $this->addBlock('CommentsHeader', [$this, 'CommentsHeader']); 111 $this->addValue('CommentPostURL', [$this, 'CommentPostURL']); 112 $this->addBlock('IfCommentAuthorEmail', [$this, 'IfCommentAuthorEmail']); 113 $this->addValue('CommentHelp', [$this, 'CommentHelp']); 114 114 115 115 # Comment preview 116 $this->addBlock('IfCommentPreview', array($this, 'IfCommentPreview'));117 $this->addBlock('IfCommentPreviewOptional', array($this, 'IfCommentPreviewOptional'));118 $this->addValue('CommentPreviewName', array($this, 'CommentPreviewName'));119 $this->addValue('CommentPreviewEmail', array($this, 'CommentPreviewEmail'));120 $this->addValue('CommentPreviewSite', array($this, 'CommentPreviewSite'));121 $this->addValue('CommentPreviewContent', array($this, 'CommentPreviewContent'));122 $this->addValue('CommentPreviewCheckRemember', array($this, 'CommentPreviewCheckRemember'));116 $this->addBlock('IfCommentPreview', [$this, 'IfCommentPreview']); 117 $this->addBlock('IfCommentPreviewOptional', [$this, 'IfCommentPreviewOptional']); 118 $this->addValue('CommentPreviewName', [$this, 'CommentPreviewName']); 119 $this->addValue('CommentPreviewEmail', [$this, 'CommentPreviewEmail']); 120 $this->addValue('CommentPreviewSite', [$this, 'CommentPreviewSite']); 121 $this->addValue('CommentPreviewContent', [$this, 'CommentPreviewContent']); 122 $this->addValue('CommentPreviewCheckRemember', [$this, 'CommentPreviewCheckRemember']); 123 123 124 124 # Entries 125 $this->addBlock('DateFooter', array($this, 'DateFooter'));126 $this->addBlock('DateHeader', array($this, 'DateHeader'));127 $this->addBlock('Entries', array($this, 'Entries'));128 $this->addBlock('EntriesFooter', array($this, 'EntriesFooter'));129 $this->addBlock('EntriesHeader', array($this, 'EntriesHeader'));130 $this->addValue('EntryAuthorCommonName', array($this, 'EntryAuthorCommonName'));131 $this->addValue('EntryAuthorDisplayName', array($this, 'EntryAuthorDisplayName'));132 $this->addValue('EntryAuthorEmail', array($this, 'EntryAuthorEmail'));133 $this->addValue('EntryAuthorEmailMD5', array($this, 'EntryAuthorEmailMD5'));134 $this->addValue('EntryAuthorID', array($this, 'EntryAuthorID'));135 $this->addValue('EntryAuthorLink', array($this, 'EntryAuthorLink'));136 $this->addValue('EntryAuthorURL', array($this, 'EntryAuthorURL'));137 $this->addValue('EntryBasename', array($this, 'EntryBasename'));138 $this->addValue('EntryCategory', array($this, 'EntryCategory'));139 $this->addValue('EntryCategoryDescription', array($this, 'EntryCategoryDescription'));140 $this->addBlock('EntryCategoriesBreadcrumb', array($this, 'EntryCategoriesBreadcrumb'));141 $this->addValue('EntryCategoryID', array($this, 'EntryCategoryID'));142 $this->addValue('EntryCategoryURL', array($this, 'EntryCategoryURL'));143 $this->addValue('EntryCategoryShortURL', array($this, 'EntryCategoryShortURL'));144 $this->addValue('EntryCommentCount', array($this, 'EntryCommentCount'));145 $this->addValue('EntryContent', array($this, 'EntryContent'));146 $this->addValue('EntryDate', array($this, 'EntryDate'));147 $this->addValue('EntryExcerpt', array($this, 'EntryExcerpt'));148 $this->addValue('EntryFeedID', array($this, 'EntryFeedID'));149 $this->addValue('EntryFirstImage', array($this, 'EntryFirstImage'));150 $this->addValue('EntryID', array($this, 'EntryID'));151 $this->addBlock('EntryIf', array($this, 'EntryIf'));152 $this->addBlock('EntryIfContentCut', array($this, 'EntryIfContentCut'));153 $this->addValue('EntryIfFirst', array($this, 'EntryIfFirst'));154 $this->addValue('EntryIfOdd', array($this, 'EntryIfOdd'));155 $this->addValue('EntryIfSelected', array($this, 'EntryIfSelected'));156 $this->addValue('EntryLang', array($this, 'EntryLang'));157 $this->addBlock('EntryNext', array($this, 'EntryNext'));158 $this->addValue('EntryPingCount', array($this, 'EntryPingCount'));159 $this->addValue('EntryPingData', array($this, 'EntryPingData'));160 $this->addValue('EntryPingLink', array($this, 'EntryPingLink'));161 $this->addBlock('EntryPrevious', array($this, 'EntryPrevious'));162 $this->addValue('EntryTitle', array($this, 'EntryTitle'));163 $this->addValue('EntryTime', array($this, 'EntryTime'));164 $this->addValue('EntryURL', array($this, 'EntryURL'));125 $this->addBlock('DateFooter', [$this, 'DateFooter']); 126 $this->addBlock('DateHeader', [$this, 'DateHeader']); 127 $this->addBlock('Entries', [$this, 'Entries']); 128 $this->addBlock('EntriesFooter', [$this, 'EntriesFooter']); 129 $this->addBlock('EntriesHeader', [$this, 'EntriesHeader']); 130 $this->addValue('EntryAuthorCommonName', [$this, 'EntryAuthorCommonName']); 131 $this->addValue('EntryAuthorDisplayName', [$this, 'EntryAuthorDisplayName']); 132 $this->addValue('EntryAuthorEmail', [$this, 'EntryAuthorEmail']); 133 $this->addValue('EntryAuthorEmailMD5', [$this, 'EntryAuthorEmailMD5']); 134 $this->addValue('EntryAuthorID', [$this, 'EntryAuthorID']); 135 $this->addValue('EntryAuthorLink', [$this, 'EntryAuthorLink']); 136 $this->addValue('EntryAuthorURL', [$this, 'EntryAuthorURL']); 137 $this->addValue('EntryBasename', [$this, 'EntryBasename']); 138 $this->addValue('EntryCategory', [$this, 'EntryCategory']); 139 $this->addValue('EntryCategoryDescription', [$this, 'EntryCategoryDescription']); 140 $this->addBlock('EntryCategoriesBreadcrumb', [$this, 'EntryCategoriesBreadcrumb']); 141 $this->addValue('EntryCategoryID', [$this, 'EntryCategoryID']); 142 $this->addValue('EntryCategoryURL', [$this, 'EntryCategoryURL']); 143 $this->addValue('EntryCategoryShortURL', [$this, 'EntryCategoryShortURL']); 144 $this->addValue('EntryCommentCount', [$this, 'EntryCommentCount']); 145 $this->addValue('EntryContent', [$this, 'EntryContent']); 146 $this->addValue('EntryDate', [$this, 'EntryDate']); 147 $this->addValue('EntryExcerpt', [$this, 'EntryExcerpt']); 148 $this->addValue('EntryFeedID', [$this, 'EntryFeedID']); 149 $this->addValue('EntryFirstImage', [$this, 'EntryFirstImage']); 150 $this->addValue('EntryID', [$this, 'EntryID']); 151 $this->addBlock('EntryIf', [$this, 'EntryIf']); 152 $this->addBlock('EntryIfContentCut', [$this, 'EntryIfContentCut']); 153 $this->addValue('EntryIfFirst', [$this, 'EntryIfFirst']); 154 $this->addValue('EntryIfOdd', [$this, 'EntryIfOdd']); 155 $this->addValue('EntryIfSelected', [$this, 'EntryIfSelected']); 156 $this->addValue('EntryLang', [$this, 'EntryLang']); 157 $this->addBlock('EntryNext', [$this, 'EntryNext']); 158 $this->addValue('EntryPingCount', [$this, 'EntryPingCount']); 159 $this->addValue('EntryPingData', [$this, 'EntryPingData']); 160 $this->addValue('EntryPingLink', [$this, 'EntryPingLink']); 161 $this->addBlock('EntryPrevious', [$this, 'EntryPrevious']); 162 $this->addValue('EntryTitle', [$this, 'EntryTitle']); 163 $this->addValue('EntryTime', [$this, 'EntryTime']); 164 $this->addValue('EntryURL', [$this, 'EntryURL']); 165 165 166 166 # Languages 167 $this->addBlock('Languages', array($this, 'Languages'));168 $this->addBlock('LanguagesHeader', array($this, 'LanguagesHeader'));169 $this->addBlock('LanguagesFooter', array($this, 'LanguagesFooter'));170 $this->addValue('LanguageCode', array($this, 'LanguageCode'));171 $this->addBlock('LanguageIfCurrent', array($this, 'LanguageIfCurrent'));172 $this->addValue('LanguageURL', array($this, 'LanguageURL'));167 $this->addBlock('Languages', [$this, 'Languages']); 168 $this->addBlock('LanguagesHeader', [$this, 'LanguagesHeader']); 169 $this->addBlock('LanguagesFooter', [$this, 'LanguagesFooter']); 170 $this->addValue('LanguageCode', [$this, 'LanguageCode']); 171 $this->addBlock('LanguageIfCurrent', [$this, 'LanguageIfCurrent']); 172 $this->addValue('LanguageURL', [$this, 'LanguageURL']); 173 173 174 174 # Pagination 175 $this->addBlock('Pagination', array($this, 'Pagination'));176 $this->addValue('PaginationCounter', array($this, 'PaginationCounter'));177 $this->addValue('PaginationCurrent', array($this, 'PaginationCurrent'));178 $this->addBlock('PaginationIf', array($this, 'PaginationIf'));179 $this->addValue('PaginationURL', array($this, 'PaginationURL'));175 $this->addBlock('Pagination', [$this, 'Pagination']); 176 $this->addValue('PaginationCounter', [$this, 'PaginationCounter']); 177 $this->addValue('PaginationCurrent', [$this, 'PaginationCurrent']); 178 $this->addBlock('PaginationIf', [$this, 'PaginationIf']); 179 $this->addValue('PaginationURL', [$this, 'PaginationURL']); 180 180 181 181 # Trackbacks 182 $this->addValue('PingBlogName', array($this, 'PingBlogName'));183 $this->addValue('PingContent', array($this, 'PingContent'));184 $this->addValue('PingDate', array($this, 'PingDate'));185 $this->addValue('PingEntryTitle', array($this, 'PingEntryTitle'));186 $this->addValue('PingFeedID', array($this, 'PingFeedID'));187 $this->addValue('PingID', array($this, 'PingID'));188 $this->addValue('PingIfFirst', array($this, 'PingIfFirst'));189 $this->addValue('PingIfOdd', array($this, 'PingIfOdd'));190 $this->addValue('PingIP', array($this, 'PingIP'));191 $this->addValue('PingNoFollow', array($this, 'PingNoFollow'));192 $this->addValue('PingOrderNumber', array($this, 'PingOrderNumber'));193 $this->addValue('PingPostURL', array($this, 'PingPostURL'));194 $this->addBlock('Pings', array($this, 'Pings'));195 $this->addBlock('PingsFooter', array($this, 'PingsFooter'));196 $this->addBlock('PingsHeader', array($this, 'PingsHeader'));197 $this->addValue('PingTime', array($this, 'PingTime'));198 $this->addValue('PingTitle', array($this, 'PingTitle'));199 $this->addValue('PingAuthorURL', array($this, 'PingAuthorURL'));182 $this->addValue('PingBlogName', [$this, 'PingBlogName']); 183 $this->addValue('PingContent', [$this, 'PingContent']); 184 $this->addValue('PingDate', [$this, 'PingDate']); 185 $this->addValue('PingEntryTitle', [$this, 'PingEntryTitle']); 186 $this->addValue('PingFeedID', [$this, 'PingFeedID']); 187 $this->addValue('PingID', [$this, 'PingID']); 188 $this->addValue('PingIfFirst', [$this, 'PingIfFirst']); 189 $this->addValue('PingIfOdd', [$this, 'PingIfOdd']); 190 $this->addValue('PingIP', [$this, 'PingIP']); 191 $this->addValue('PingNoFollow', [$this, 'PingNoFollow']); 192 $this->addValue('PingOrderNumber', [$this, 'PingOrderNumber']); 193 $this->addValue('PingPostURL', [$this, 'PingPostURL']); 194 $this->addBlock('Pings', [$this, 'Pings']); 195 $this->addBlock('PingsFooter', [$this, 'PingsFooter']); 196 $this->addBlock('PingsHeader', [$this, 'PingsHeader']); 197 $this->addValue('PingTime', [$this, 'PingTime']); 198 $this->addValue('PingTitle', [$this, 'PingTitle']); 199 $this->addValue('PingAuthorURL', [$this, 'PingAuthorURL']); 200 200 201 201 # System 202 $this->addValue('SysBehavior', array($this, 'SysBehavior'));203 $this->addBlock('SysIf', array($this, 'SysIf'));204 $this->addBlock('SysIfCommentPublished', array($this, 'SysIfCommentPublished'));205 $this->addBlock('SysIfCommentPending', array($this, 'SysIfCommentPending'));206 $this->addBlock('SysIfFormError', array($this, 'SysIfFormError'));207 $this->addValue('SysFeedSubtitle', array($this, 'SysFeedSubtitle'));208 $this->addValue('SysFormError', array($this, 'SysFormError'));209 $this->addValue('SysPoweredBy', array($this, 'SysPoweredBy'));210 $this->addValue('SysSearchString', array($this, 'SysSearchString'));211 $this->addValue('SysSelfURI', array($this, 'SysSelfURI'));202 $this->addValue('SysBehavior', [$this, 'SysBehavior']); 203 $this->addBlock('SysIf', [$this, 'SysIf']); 204 $this->addBlock('SysIfCommentPublished', [$this, 'SysIfCommentPublished']); 205 $this->addBlock('SysIfCommentPending', [$this, 'SysIfCommentPending']); 206 $this->addBlock('SysIfFormError', [$this, 'SysIfFormError']); 207 $this->addValue('SysFeedSubtitle', [$this, 'SysFeedSubtitle']); 208 $this->addValue('SysFormError', [$this, 'SysFormError']); 209 $this->addValue('SysPoweredBy', [$this, 'SysPoweredBy']); 210 $this->addValue('SysSearchString', [$this, 'SysSearchString']); 211 $this->addValue('SysSelfURI', [$this, 'SysSelfURI']); 212 212 213 213 # Generic 214 $this->addValue('else', array($this, 'GenericElse'));214 $this->addValue('else', [$this, 'GenericElse']); 215 215 } 216 216 … … 243 243 244 244 # --BEHAVIOR-- templateInsideBlock 245 $this->core->callBehavior('templateInsideBlock', $this->core, $this->current_tag, $attr, array(&$content));245 $this->core->callBehavior('templateInsideBlock', $this->core, $this->current_tag, $attr, [&$content]); 246 246 247 247 $res .= parent::compileBlockNode($this->current_tag, $attr, $content); … … 269 269 } 270 270 271 public function getFilters($attr, $default = array())271 public function getFilters($attr, $default = []) 272 272 { 273 273 if (!is_array($attr) && !($attr instanceof arrayObject)) { 274 $attr = array();274 $attr = []; 275 275 } 276 276 277 277 $p = array_merge( 278 array(278 [ 279 279 0 => null, 280 280 'encode_xml' => 0, … … 287 287 'capitalize' => 0, 288 288 'strip_tags' => 0 289 ),289 ], 290 290 $default 291 291 ); … … 318 318 public function getSortByStr($attr, $table = null) 319 319 { 320 $res = array();320 $res = []; 321 321 322 322 $default_order = 'desc'; 323 323 324 $default_alias = array(325 'post' => array(324 $default_alias = [ 325 'post' => [ 326 326 'title' => 'post_title', 327 327 'selected' => 'post_selected', … … 331 331 'comment' => 'nb_comment', 332 332 'trackback' => 'nb_trackback' 333 ),334 'comment' => array(333 ], 334 'comment' => [ 335 335 'author' => 'comment_author', 336 336 'date' => 'comment_dt', 337 337 'id' => 'comment_id' 338 )339 );338 ] 339 ]; 340 340 341 341 $alias = new ArrayObject(); … … 349 349 foreach ($alias as $k => $v) { 350 350 if (!is_array($v)) { 351 $alias[$k] = array();351 $alias[$k] = []; 352 352 } 353 353 if (!isset($default_alias[$k]) || !is_array($default_alias[$k])) { 354 $default_alias[$k] = array();354 $default_alias[$k] = []; 355 355 } 356 356 $default_alias[$k] = array_merge($default_alias[$k], $alias[$k]); … … 474 474 public function Archives($attr, $content) 475 475 { 476 $p = "if (!isset(\$params)) \$params = array();\n";476 $p = "if (!isset(\$params)) \$params = [];\n"; 477 477 $p .= "\$params['type'] = 'month';\n"; 478 478 if (isset($attr['type'])) { … … 507 507 $res .= $p; 508 508 $res .= $this->core->callBehavior("templatePrepareParams", 509 array("tag" => "Archives", "method" => "blog::getDates"),509 ["tag" => "Archives", "method" => "blog::getDates"], 510 510 $attr, $content); 511 511 $res .= '$_ctx->archives = $core->blog->getDates($params); unset($params);' . "\n"; … … 587 587 return $this->displayCounter( 588 588 sprintf($f, '$_ctx->archives->nb_post'), 589 array(589 [ 590 590 'none' => 'no archive', 591 591 'one' => 'one archive', 592 592 'more' => '%d archives' 593 ),593 ], 594 594 $attr, 595 595 true … … 607 607 public function ArchiveNext($attr, $content) 608 608 { 609 $p = "if (!isset(\$params)) \$params = array();\n";609 $p = "if (!isset(\$params)) \$params = [];\n"; 610 610 $p .= "\$params['type'] = 'month';\n"; 611 611 if (isset($attr['type'])) { … … 626 626 $res .= $p; 627 627 $res .= $this->core->callBehavior("templatePrepareParams", 628 array("tag" => "ArchiveNext", "method" => "blog::getDates"),628 ["tag" => "ArchiveNext", "method" => "blog::getDates"], 629 629 $attr, $content); 630 630 $res .= '$_ctx->archives = $core->blog->getDates($params); unset($params);' . "\n"; … … 647 647 public function ArchivePrevious($attr, $content) 648 648 { 649 $p = 'if (!isset($params)) $params = array();';649 $p = 'if (!isset($params)) $params = [];'; 650 650 $p .= "\$params['type'] = 'month';\n"; 651 651 if (isset($attr['type'])) { … … 665 665 $res = "<?php\n"; 666 666 $res .= $this->core->callBehavior("templatePrepareParams", 667 array("tag" => "ArchivePrevious", "method" => "blog::getDates"),667 ["tag" => "ArchivePrevious", "method" => "blog::getDates"], 668 668 $attr, $content); 669 669 $res .= $p; … … 900 900 public function Categories($attr, $content) 901 901 { 902 $p = "if (!isset(\$params)) \$params = array();\n";902 $p = "if (!isset(\$params)) \$params = [];\n"; 903 903 904 904 if (isset($attr['url'])) { … … 921 921 $res .= $p; 922 922 $res .= $this->core->callBehavior("templatePrepareParams", 923 array("tag" => "Categories", "method" => "blog::getCategories"),923 ["tag" => "Categories", "method" => "blog::getCategories"], 924 924 $attr, $content); 925 925 $res .= '$_ctx->categories = $core->blog->getCategories($params);' . "\n"; … … 1095 1095 return $this->displayCounter( 1096 1096 sprintf($f, '$_ctx->categories->nb_post'), 1097 array(1097 [ 1098 1098 'none' => 'No post', 1099 1099 'one' => 'One post', 1100 1100 'more' => '%d posts' 1101 ),1101 ], 1102 1102 $attr, 1103 1103 true … … 1153 1153 // standard pagination, set offset 1154 1154 $p .= "if ((\$core->url->type == 'default') || (\$core->url->type == 'default-page')) {\n"; 1155 $p .= " \$params['limit'] = array((\$_page_number == 1 ? 0 : (\$_page_number - 2) * \$nb_entry_per_page + \$nb_entry_first_page),\$params['limit']);\n";1155 $p .= " \$params['limit'] = [(\$_page_number == 1 ? 0 : (\$_page_number - 2) * \$nb_entry_per_page + \$nb_entry_first_page),\$params['limit']];\n"; 1156 1156 $p .= "} else {\n"; 1157 $p .= " \$params['limit'] = array((\$_page_number - 1) * \$nb_entry_per_page,\$params['limit']);\n";1157 $p .= " \$params['limit'] = [(\$_page_number - 1) * \$nb_entry_per_page,\$params['limit']];\n"; 1158 1158 $p .= "}\n"; 1159 1159 } else { 1160 1160 // no pagination, get all posts from 0 to limit 1161 $p .= "\$params['limit'] = array(0, \$params['limit']);\n";1161 $p .= "\$params['limit'] = [0, \$params['limit']];\n"; 1162 1162 } 1163 1163 } … … 1243 1243 $res .= $p; 1244 1244 $res .= $this->core->callBehavior("templatePrepareParams", 1245 array("tag" => "Entries", "method" => "blog::getPosts"),1245 ["tag" => "Entries", "method" => "blog::getPosts"], 1246 1246 $attr, $content); 1247 1247 $res .= '$_ctx->post_params = $params;' . "\n"; … … 1894 1894 return $this->displayCounter( 1895 1895 $operation, 1896 array(1896 [ 1897 1897 'none' => 'no comments', 1898 1898 'one' => 'one comment', 1899 1899 'more' => '%d comments' 1900 ),1900 ], 1901 1901 $attr, 1902 1902 false … … 1916 1916 return $this->displayCounter( 1917 1917 '$_ctx->posts->nb_trackback', 1918 array(1918 [ 1919 1919 'none' => 'no trackbacks', 1920 1920 'one' => 'one trackback', 1921 1921 'more' => '%d trackbacks' 1922 ),1922 ], 1923 1923 $attr, 1924 1924 false … … 1953 1953 public function Languages($attr, $content) 1954 1954 { 1955 $p = "if (!isset(\$params)) \$params = array();\n";1955 $p = "if (!isset(\$params)) \$params = [];\n"; 1956 1956 1957 1957 if (isset($attr['lang'])) { … … 1967 1967 $res .= $p; 1968 1968 $res .= $this->core->callBehavior("templatePrepareParams", 1969 array("tag" => "Languages", "method" => "blog::getLangs"),1969 ["tag" => "Languages", "method" => "blog::getLangs"], 1970 1970 $attr, $content); 1971 1971 $res .= '$_ctx->langs = $core->blog->getLangs($params); unset($params);' . "\n"; … … 2044 2044 $p .= '$params = $_ctx->post_params;' . "\n"; 2045 2045 $p .= $this->core->callBehavior("templatePrepareParams", 2046 array("tag" => "Pagination", "method" => "blog::getPosts"),2046 ["tag" => "Pagination", "method" => "blog::getPosts"], 2047 2047 $attr, $content); 2048 2048 $p .= '$_ctx->pagination = $core->blog->getPosts($params,true); unset($params);' . "\n"; … … 2092 2092 public function PaginationIf($attr, $content) 2093 2093 { 2094 $if = array();2094 $if = []; 2095 2095 2096 2096 if (isset($attr['start'])) { … … 2194 2194 $res = "<?php\n"; 2195 2195 $res .= $this->core->callBehavior("templatePrepareParams", 2196 array("tag" => "Comments", "method" => "blog::getComments"),2196 ["tag" => "Comments", "method" => "blog::getComments"], 2197 2197 $attr, $content); 2198 2198 $res .= $p; … … 2373 2373 public function CommentIf($attr, $content) 2374 2374 { 2375 $if = array();2375 $if = []; 2376 2376 $is_ping = null; 2377 2377 … … 2806 2806 $res .= $p; 2807 2807 $res .= $this->core->callBehavior("templatePrepareParams", 2808 array("tag" => "Pings", "method" => "blog::getComments"),2808 ["tag" => "Pings", "method" => "blog::getComments"], 2809 2809 $attr, $content); 2810 2810 $res .= '$_ctx->pings = $core->blog->getComments($params); unset($params);' . "\n"; -
inc/public/lib.tpl.context.php
r3832 r3874 12 12 class context 13 13 { 14 public $stack = array();14 public $stack = []; 15 15 16 16 public function __set($name, $var) … … 105 105 return self::global_filters( 106 106 $str, 107 array(0 => null,107 [0 => null, 108 108 'encode_xml' => $encode_xml, 109 109 'remove_html' => $remove_html, … … 112 112 'upper_case' => ($upper_case == 1 ? 1 : 0), 113 113 'capitalize' => ($upper_case == 2 ? 1 : 0), 114 'encode_url' => $encode_url ),114 'encode_url' => $encode_url], 115 115 $tag); 116 116 } … … 149 149 public static function global_filters($str, $args, $tag = '') 150 150 { 151 $filters = array(151 $filters = [ 152 152 'strip_tags', // Removes HTML tags (mono line) 153 153 'remove_html', // Removes HTML tags … … 156 156 'lower_case', 'capitalize', 'upper_case', // Case transformations 157 157 'encode_url' // URL encode (as for insert in query string) 158 );158 ]; 159 159 160 160 $args[0] = &$str; … … 209 209 public static function strip_tags($str) 210 210 { 211 return trim(preg_replace('/ {2,}/', ' ', str_replace( array("\r", "\n", "\t"), ' ', html::clean($str))));211 return trim(preg_replace('/ {2,}/', ' ', str_replace(["\r", "\n", "\t"], ' ', html::clean($str)))); 212 212 } 213 213 … … 336 336 public static function robotsPolicy($base, $over) 337 337 { 338 $pol = array('INDEX' => 'INDEX', 'FOLLOW' => 'FOLLOW', 'ARCHIVE' => 'ARCHIVE');338 $pol = ['INDEX' => 'INDEX', 'FOLLOW' => 'FOLLOW', 'ARCHIVE' => 'ARCHIVE']; 339 339 $base = array_flip(preg_split('/\s*,\s*/', $base)); 340 340 $over = array_flip(preg_split('/\s*,\s*/', $over)); … … 359 359 public static function getSmilies($blog) 360 360 { 361 $path = array();361 $path = []; 362 362 if (isset($GLOBALS['__theme'])) { 363 363 $path[] = $GLOBALS['__theme']; … … 370 370 $base_url = $blog->settings->system->themes_url . '/%s/smilies/'; 371 371 372 $res = array();372 $res = []; 373 373 374 374 foreach ($path as $t) { … … 385 385 $def = file($f); 386 386 387 $res = array();387 $res = []; 388 388 foreach ($def as $v) { 389 389 $v = trim($v); … … 448 448 # 449 449 $index = 0; 450 $tokens = array();450 $tokens = []; 451 451 452 452 $match = '(?s:<!(?:--.*?--\s*)+>)|' . # comment … … 459 459 foreach ($parts as $part) { 460 460 if (++$index % 2 && $part != '') { 461 $tokens[] = array('text', $part);461 $tokens[] = ['text', $part]; 462 462 } else { 463 $tokens[] = array('tag', $part);463 $tokens[] = ['tag', $part]; 464 464 } 465 465 -
inc/public/lib.urlhandlers.php
r3731 r3874 33 33 { 34 34 $core = &$GLOBALS['core']; 35 $t = new ArrayObject( array($type, $url, $representation, $handler));35 $t = new ArrayObject([$type, $url, $representation, $handler]); 36 36 $core->callBehavior("publicRegisterURL", $t); 37 37 parent::register($t[0], $t[1], $t[2], $t[3]); … … 241 241 $GLOBALS['_search'] = !empty($_GET['q']) ? rawurldecode($_GET['q']) : ''; 242 242 if ($GLOBALS['_search']) { 243 $params = new ArrayObject( array('search' => $GLOBALS['_search']));243 $params = new ArrayObject(['search' => $GLOBALS['_search']]); 244 244 $core->callBehavior('publicBeforeSearchCount', $params); 245 245 $GLOBALS['_search_count'] = $core->blog->getPosts($params, true)->f(0); … … 256 256 257 257 $n = self::getPageNumber($args); 258 $params = new ArrayObject( array(259 'lang' => $args ));258 $params = new ArrayObject([ 259 'lang' => $args]); 260 260 261 261 $core->callBehavior('publicLangBeforeGetLangs', $params, $args); … … 286 286 self::p404(); 287 287 } else { 288 $params = new ArrayObject( array(288 $params = new ArrayObject([ 289 289 'cat_url' => $args, 290 290 'post_type' => 'post', 291 'without_empty' => false ));291 'without_empty' => false]); 292 292 293 293 $core->callBehavior('publicCategoryBeforeGetCategories', $params, $args); … … 317 317 self::serveDocument('archive.html'); 318 318 } elseif (preg_match('|^/([0-9]{4})/([0-9]{2})$|', $args, $m)) { 319 $params = new ArrayObject( array(319 $params = new ArrayObject([ 320 320 'year' => $m[1], 321 321 'month' => $m[2], 322 'type' => 'month' ));322 'type' => 'month']); 323 323 324 324 $core->callBehavior('publicArchiveBeforeGetDates', $params, $args); … … 349 349 $core->blog->withoutPassword(false); 350 350 351 $params = new ArrayObject( array(352 'post_url' => $args ));351 $params = new ArrayObject([ 352 'post_url' => $args]); 353 353 354 354 $core->callBehavior('publicPostBeforeGetPosts', $params, $args); … … 380 380 $pwd_cookie = json_decode($_COOKIE['dc_passwd']); 381 381 if ($pwd_cookie === null) { 382 $pwd_cookie = array();382 $pwd_cookie = []; 383 383 } else { 384 384 $pwd_cookie = (array) $pwd_cookie; 385 385 } 386 386 } else { 387 $pwd_cookie = array();387 $pwd_cookie = []; 388 388 } 389 389 … … 542 542 543 543 if (preg_match('!^([a-z]{2}(-[a-z]{2})?)/(.*)$!', $args, $m)) { 544 $params = new ArrayObject( array('lang' => $m[1]));544 $params = new ArrayObject(['lang' => $m[1]]); 545 545 546 546 $args = $m[3]; … … 582 582 583 583 if ($cat_url) { 584 $params = new ArrayObject( array(584 $params = new ArrayObject([ 585 585 'cat_url' => $cat_url, 586 'post_type' => 'post' ));586 'post_type' => 'post']); 587 587 588 588 $core->callBehavior('publicFeedBeforeGetCategories', $params, $args); … … 598 598 $subtitle = ' - ' . $_ctx->categories->cat_title; 599 599 } elseif ($post_id) { 600 $params = new ArrayObject( array(600 $params = new ArrayObject([ 601 601 'post_id' => $post_id, 602 'post_type' => '' ));602 'post_type' => '']); 603 603 604 604 $core->callBehavior('publicFeedBeforeGetPosts', $params, $args); … … 650 650 651 651 if (!is_array($args)) { 652 $args = array();652 $args = []; 653 653 } 654 654 … … 668 668 $core = &$GLOBALS['core']; 669 669 if (!is_array($args)) { 670 $args = array();670 $args = []; 671 671 } 672 672 -
inc/public/prepend.php
r3731 r3874 130 130 # Prepare the HTTP cache thing 131 131 $mod_files = get_included_files(); 132 $mod_ts = array();132 $mod_ts = []; 133 133 $mod_ts[] = $core->blog->upddt; 134 134 135 $__theme_tpl_path = array(135 $__theme_tpl_path = [ 136 136 $core->blog->themes_path . '/' . $__theme . '/tpl' 137 );137 ]; 138 138 if ($__parent_theme) { 139 139 $__theme_tpl_path[] = $core->blog->themes_path . '/' . $__parent_theme . '/tpl'; -
inc/public/rs.extension.php
r3731 r3874 10 10 if (!defined('DC_RC_PATH')) {return;} 11 11 12 $core->addBehavior('coreBlogGetPosts', array('rsExtendPublic', 'coreBlogGetPosts'));13 $core->addBehavior('coreBlogGetComments', array('rsExtendPublic', 'coreBlogGetComments'));12 $core->addBehavior('coreBlogGetPosts', ['rsExtendPublic', 'coreBlogGetPosts']); 13 $core->addBehavior('coreBlogGetComments', ['rsExtendPublic', 'coreBlogGetComments']); 14 14 15 15 class rsExtendPublic
Note: See TracChangeset
for help on using the changeset viewer.