@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace leading double underscore in function names by single underscore

Summary:
> PHP reserves all symbols starting with __ as magical. http://php.net/userlandnaming.rules

I didn't touch third-party S3 library.

Test Plan: /

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2077

vrana a309d5ba 7dfdf639

+15 -15
+2 -2
src/__phutil_library_map__.php
··· 929 929 ), 930 930 'function' => 931 931 array( 932 - '__phabricator_date_format' => 'view/utils', 933 - '__phabricator_format_local_time' => 'view/utils', 932 + '_phabricator_date_format' => 'view/utils', 934 933 '_qsprintf_check_scalar_type' => 'storage/qsprintf', 935 934 '_qsprintf_check_type' => 'storage/qsprintf', 936 935 'celerity_generate_unique_node_id' => 'infrastructure/celerity/api', ··· 938 937 'javelin_render_tag' => 'infrastructure/javelin/markup', 939 938 'phabricator_date' => 'view/utils', 940 939 'phabricator_datetime' => 'view/utils', 940 + 'phabricator_format_local_time' => 'view/utils', 941 941 'phabricator_format_relative_time' => 'view/utils', 942 942 'phabricator_format_units_generic' => 'view/utils', 943 943 'phabricator_on_relative_date' => 'view/utils',
+4 -4
src/applications/maniphest/controller/report/ManiphestReportController.php
··· 145 145 continue; 146 146 } 147 147 148 - $day_bucket = __phabricator_format_local_time( 148 + $day_bucket = phabricator_format_local_time( 149 149 $row['dateCreated'], 150 150 $user, 151 151 'z'); ··· 179 179 foreach ($stats as $bucket => $info) { 180 180 $epoch = $day_buckets[$bucket]; 181 181 182 - $week_bucket = __phabricator_format_local_time( 182 + $week_bucket = phabricator_format_local_time( 183 183 $epoch, 184 184 $user, 185 185 'W'); ··· 195 195 $last_week_epoch = $epoch; 196 196 } 197 197 198 - $month_bucket = __phabricator_format_local_time( 198 + $month_bucket = phabricator_format_local_time( 199 199 $epoch, 200 200 $user, 201 201 'm'); 202 202 if ($month_bucket != $last_month) { 203 203 if ($month) { 204 204 $rows[] = $this->formatBurnRow( 205 - __phabricator_format_local_time($last_month_epoch, $user, 'F, Y'), 205 + phabricator_format_local_time($last_month_epoch, $user, 'F, Y'), 206 206 $month); 207 207 $rowc[] = 'month'; 208 208 }
+1 -1
src/infrastructure/daemon/irc/bot/PhabricatorIRCBot.php
··· 240 240 } 241 241 } 242 242 243 - public function __destroy() { 243 + public function __destruct() { 244 244 $this->write("QUIT Goodbye.\r\n"); 245 245 fclose($this->socket); 246 246 }
+8 -8
src/view/utils/viewutils.php
··· 17 17 */ 18 18 19 19 function phabricator_date($epoch, $user) { 20 - return __phabricator_format_local_time( 20 + return phabricator_format_local_time( 21 21 $epoch, 22 22 $user, 23 - __phabricator_date_format($epoch)); 23 + _phabricator_date_format($epoch)); 24 24 } 25 25 26 26 function phabricator_on_relative_date($epoch, $user) { ··· 51 51 } 52 52 53 53 function phabricator_time($epoch, $user) { 54 - return __phabricator_format_local_time( 54 + return phabricator_format_local_time( 55 55 $epoch, 56 56 $user, 57 57 'g:i A'); 58 58 } 59 59 60 60 function phabricator_datetime($epoch, $user) { 61 - return __phabricator_format_local_time( 61 + return phabricator_format_local_time( 62 62 $epoch, 63 63 $user, 64 - __phabricator_date_format($epoch).', g:i A'); 64 + _phabricator_date_format($epoch).', g:i A'); 65 65 } 66 66 67 - function __phabricator_date_format($epoch) { 67 + function _phabricator_date_format($epoch) { 68 68 $format = 'M j Y'; 69 69 $now = time(); 70 70 if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) { ··· 74 74 } 75 75 76 76 /** 77 - * Internal date rendering method. Do not call this directly; instead, call 77 + * This function does not usually need to be called directly. Instead, call 78 78 * @{function:phabricator_date}, @{function:phabricator_time}, or 79 79 * @{function:phabricator_datetime}. 80 80 * ··· 83 83 * @param string Date format, as per DateTime class. 84 84 * @return string Formatted, local date/time. 85 85 */ 86 - function __phabricator_format_local_time($epoch, $user, $format) { 86 + function phabricator_format_local_time($epoch, $user, $format) { 87 87 if (!$epoch) { 88 88 // If we're missing date information for something, the DateTime class will 89 89 // throw an exception when we try to construct an object. Since this is a