mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 06:25:04 +02:00
Merge remote-tracking branch 'dhruvgoel92/ticket/10703' into develop
* dhruvgoel92/ticket/10703: [ticket/10703] Added a condition to check if ext directory exists
This commit is contained in:
commit
0257cd1653
phpBB
@ -37,6 +37,13 @@ function list_extensions()
|
|||||||
global $phpbb_extension_manager;
|
global $phpbb_extension_manager;
|
||||||
|
|
||||||
$phpbb_extension_manager->load_extensions();
|
$phpbb_extension_manager->load_extensions();
|
||||||
|
$all = array_keys($phpbb_extension_manager->all_available());
|
||||||
|
|
||||||
|
if (empty($all))
|
||||||
|
{
|
||||||
|
echo "There were no extensions found.\n";
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
|
||||||
echo "Enabled:\n";
|
echo "Enabled:\n";
|
||||||
$enabled = array_keys($phpbb_extension_manager->all_enabled());
|
$enabled = array_keys($phpbb_extension_manager->all_enabled());
|
||||||
@ -49,7 +56,6 @@ function list_extensions()
|
|||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "Available:\n";
|
echo "Available:\n";
|
||||||
$all = array_keys($phpbb_extension_manager->all_available());
|
|
||||||
$purged = array_diff($all, $enabled, $disabled);
|
$purged = array_diff($all, $enabled, $disabled);
|
||||||
print_extensions($purged);
|
print_extensions($purged);
|
||||||
}
|
}
|
||||||
|
@ -352,6 +352,10 @@ class phpbb_extension_manager
|
|||||||
public function all_available()
|
public function all_available()
|
||||||
{
|
{
|
||||||
$available = array();
|
$available = array();
|
||||||
|
if (!is_dir($this->phpbb_root_path . 'ext/'))
|
||||||
|
{
|
||||||
|
return $available;
|
||||||
|
}
|
||||||
|
|
||||||
$iterator = new RecursiveIteratorIterator(
|
$iterator = new RecursiveIteratorIterator(
|
||||||
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
|
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user