Changeset 3872:39861f53bcc0
- Timestamp:
- 09/12/18 14:45:17 (7 years ago)
- Branch:
- default
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/help.php
r3731 r3872 12 12 dcPage::check('usage,contentadmin'); 13 13 14 $helpPage = function ( ) {14 $helpPage = function (...$args) { 15 15 $ret = array('content' => '', 'title' => ''); 16 16 17 $args = func_get_args();18 17 if (empty($args)) { 19 18 return $ret; -
inc/admin/lib.dc.page.php
r3861 r3872 619 619 } 620 620 621 public static function helpBlock( )621 public static function helpBlock(...$params) 622 622 { 623 623 global $core; … … 627 627 } 628 628 629 $args = func_get_args(); 630 $args = new ArrayObject($args); 629 $args = new ArrayObject($params); 631 630 632 631 # --BEHAVIOR-- adminPageHelpBlock … … 914 913 } 915 914 916 public static function jsConfirmClose() 917 { 918 $args = func_get_args(); 915 public static function jsConfirmClose(...$args) 916 { 919 917 if (count($args) > 0) { 920 918 foreach ($args as $k => $v) { 921 919 $args[$k] = "'" . html::escapeJS($v) . "'"; 922 920 } 923 $ args = implode(',', $args);921 $params = implode(',', $args); 924 922 } else { 925 $ args = '';923 $params = ''; 926 924 } 927 925 … … 929 927 self::jsLoad('js/confirm-close.js') . 930 928 '<script type="text/javascript">' . "\n" . 931 "confirmClosePage = new confirmClose(" . $ args . "); " .929 "confirmClosePage = new confirmClose(" . $params . "); " . 932 930 "confirmClose.prototype.prompt = '" . html::escapeJS(__('You have unsaved changes.')) . "'; " . 933 931 "</script>\n"; -
inc/core/class.dc.auth.php
r3731 r3872 375 375 * @return mixed 376 376 */ 377 public function sudo($f )377 public function sudo($f, ...$args) 378 378 { 379 379 if (!is_callable($f)) { 380 380 throw new Exception($f . ' function doest not exist'); 381 381 } 382 383 $args = func_get_args();384 array_shift($args);385 382 386 383 if ($this->user_admin) { -
inc/core/class.dc.core.php
r3866 r3872 376 376 @return <b>string</b> Behavior concatened result 377 377 */ 378 public function callBehavior($behavior )378 public function callBehavior($behavior, ...$args) 379 379 { 380 380 if (isset($this->behaviors[$behavior])) { 381 $args = func_get_args();382 array_shift($args);383 384 381 $res = ''; 385 382 -
inc/core/class.dc.media.php
r3731 r3872 158 158 } 159 159 160 protected function callFileHandler($type, $event )160 protected function callFileHandler($type, $event, ...$args) 161 161 { 162 162 if (!empty($this->file_handler[$type][$event])) { 163 $args = func_get_args();164 array_shift($args);165 array_shift($args);166 167 163 foreach ($this->file_handler[$type][$event] as $f) { 168 164 call_user_func_array($f, $args); -
inc/core/class.dc.update.php
r3795 r3872 172 172 } 173 173 174 public function setForcedFiles( )175 { 176 $this->forced_files = func_get_args();174 public function setForcedFiles(...$args) 175 { 176 $this->forced_files = $args; 177 177 } 178 178 -
plugins/importExport/inc/flat/class.flat.backup.php
r3731 r3872 124 124 } 125 125 126 public function drop( )126 public function drop(...$args) 127 127 { 128 foreach ( func_get_args()as $n) {128 foreach ($args as $n) { 129 129 if (isset($this->__data[$n])) { 130 130 unset($this->__data[$n]);
Note: See TracChangeset
for help on using the changeset viewer.