1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

Merge pull request #546 from p/ticket/10614

[ticket/10614] Add a script to enable, disable and view status of extens...
This commit is contained in:
Igor Wiedler
2012-02-11 14:54:22 -08:00
2 changed files with 151 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ class phpbb_extension_manager
*
* @return null
*/
protected function load_extensions()
public function load_extensions()
{
$sql = 'SELECT *
FROM ' . $this->extension_table;
@@ -167,6 +167,11 @@ class phpbb_extension_manager
$this->db->sql_query($sql);
}
if ($this->cache)
{
$this->cache->destroy($this->cache_name);
}
return !$active;
}
@@ -219,6 +224,11 @@ class phpbb_extension_manager
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
$this->db->sql_query($sql);
if ($this->cache)
{
$this->cache->destroy($this->cache_name);
}
return true;
}
@@ -234,6 +244,11 @@ class phpbb_extension_manager
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
$this->db->sql_query($sql);
if ($this->cache)
{
$this->cache->destroy($this->cache_name);
}
return false;
}
@@ -292,6 +307,11 @@ class phpbb_extension_manager
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
$this->db->sql_query($sql);
if ($this->cache)
{
$this->cache->destroy($this->cache_name);
}
return true;
}
@@ -301,6 +321,11 @@ class phpbb_extension_manager
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
$this->db->sql_query($sql);
if ($this->cache)
{
$this->cache->destroy($this->cache_name);
}
return false;
}
@@ -329,7 +354,8 @@ class phpbb_extension_manager
$available = array();
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'));
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $file_info)
{
if ($file_info->isFile() && $file_info->getFilename() == 'ext' . $this->phpEx)