Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_plugin_api.php @ 19:b6a96bdd6b29
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 08 Oct 2025 08:50:44 -0400 |
| parents | dd5ed6ef69c9 |
| children | 73124dd49283 |
comparison
equal
deleted
inserted
replaced
| 18:b631c1c7a3ce | 19:b6a96bdd6b29 |
|---|---|
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 if ($plugin = $this->plugins[$plugin_name]) { | 213 if ($plugin = $this->plugins[$plugin_name]) { |
| 214 // init a plugin only if $force is set or if we're called after initialization | 214 // init a plugin only if $force is set or if we're called after initialization |
| 215 if (($force || $this->initialized) && !$this->plugins_initialized[$plugin_name] && ($force || !$this->filter($plugin))) { | 215 if (($force || $this->initialized) && empty($this->plugins_initialized[$plugin_name]) && ($force || empty($this->filter($plugin)))) { |
| 216 $plugin->init(); | 216 $plugin->init(); |
| 217 $this->plugins_initialized[$plugin_name] = $plugin; | 217 $this->plugins_initialized[$plugin_name] = $plugin; |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 569 * | 569 * |
| 570 * @return boolean True if registered, otherwise false | 570 * @return boolean True if registered, otherwise false |
| 571 */ | 571 */ |
| 572 public function is_plugin_task($task) | 572 public function is_plugin_task($task) |
| 573 { | 573 { |
| 574 return $this->tasks[$task] ? true : false; | 574 return ($this->tasks[$task]??null) ? true : false; |
| 575 } | 575 } |
| 576 | 576 |
| 577 /** | 577 /** |
| 578 * Check if a plugin hook is currently processing. | 578 * Check if a plugin hook is currently processing. |
| 579 * Mainly used to prevent loops and recursion. | 579 * Mainly used to prevent loops and recursion. |
| 652 * @return array | 652 * @return array |
| 653 */ | 653 */ |
| 654 protected function template_container_hook($attrib) | 654 protected function template_container_hook($attrib) |
| 655 { | 655 { |
| 656 $container = $attrib['name']; | 656 $container = $attrib['name']; |
| 657 return array('content' => $attrib['content'] . $this->template_contents[$container]); | 657 return array('content' => ($attrib['content']??'') . $this->template_contents[$container]); |
| 658 } | 658 } |
| 659 | 659 |
| 660 /** | 660 /** |
| 661 * Make the given file name link into the plugins directory | 661 * Make the given file name link into the plugins directory |
| 662 * | 662 * |
