aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_module.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r--phpBB/includes/functions_module.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index e2b2d80b3e..ce49c3a798 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -884,7 +884,14 @@ class p_master
}
}
- function get_short_name($basename)
+ /**
+ * Retrieve shortened module basename for legacy basenames (with xcp_ prefix)
+ *
+ * @param string $basename A module basename
+ * @return string The basename if it starts with phpbb_ or the basename with
+ * the current p_class (e.g. acp_) stripped.
+ */
+ protected function get_short_name($basename)
{
if (substr($basename, 0, 6) === 'phpbb_')
{
@@ -895,7 +902,13 @@ class p_master
return substr($basename, strlen($this->p_class) + 1);
}
- function is_full_class($basename)
+ /**
+ * Checks whether the given module basename is a correct class name
+ *
+ * @param string $basename A module basename
+ * @return bool True if the basename starts with phpbb_ or (x)cp_, false otherwise
+ */
+ protected function is_full_class($basename)
{
return (substr($basename, 0, 6) === 'phpbb_' || substr($basename, 0, strlen($this->p_class) + 1) === $this->p_class . '_');
}