Permalink
Browse files

[xoopslists] add `public static` keyword to all methods

  • Loading branch information...
nao-pon committed Apr 21, 2015
1 parent 33b5af4 commit 1e8b5bca4a9625f0f411226643b917780c0db098
Showing with 18 additions and 16 deletions.
  1. +18 −16 html/class/xoopslists.php
View
@@ -34,10 +34,12 @@
define("XOOPS_LISTS_INCLUDED",1);
class XoopsLists
{
function &getTimeZoneList()
public static function getTimeZoneList()
{
$root =& XCube_Root::getSingleton();
$root->mLanguageManager->loadPageTypeMessageCatalog('timezone');
$root =& XCube_Root::getSingleton();
if ($root->mLanguageManager !== null && !defined(_TZ_GMT0)) {
$root->mLanguageManager->loadPageTypeMessageCatalog('timezone');
}
$time_zone_list = array (
"-12" => _TZ_GMTM12,
"-11" => _TZ_GMTM11,
@@ -79,7 +81,7 @@ function &getTimeZoneList()
/*
* gets list of themes folder from themes directory
*/
function &getThemesList()
public static function &getThemesList()
{
$ret =& XoopsLists::getDirListAsArray(XOOPS_THEME_PATH.'/');
return $ret;
@@ -88,7 +90,7 @@ function &getThemesList()
/*
* gets a list of module folders from the modules directory
*/
function &getModulesList()
public static function &getModulesList()
{
$ret =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/modules/");
return $ret;
@@ -97,7 +99,7 @@ function &getModulesList()
/*
* gets list of name of directories inside a directory
*/
function &getDirListAsArray($dirname)
public static function &getDirListAsArray($dirname)
{
$dirlist = array();
if (is_dir($dirname) && $handle = opendir($dirname)) {
@@ -118,7 +120,7 @@ function &getDirListAsArray($dirname)
/*
* gets list of all files in a directory
*/
function &getFileListAsArray($dirname, $prefix="")
public static function &getFileListAsArray($dirname, $prefix="")
{
$filelist = array();
if (substr($dirname, -1) == '/') {
@@ -141,7 +143,7 @@ function &getFileListAsArray($dirname, $prefix="")
/*
* gets list of image file names in a directory
*/
function &getImgListAsArray($dirname, $prefix="")
public static function &getImgListAsArray($dirname, $prefix="")
{
$filelist = array();
if ($handle = opendir($dirname)) {
@@ -161,7 +163,7 @@ function &getImgListAsArray($dirname, $prefix="")
/*
* gets list of html file names in a certain directory
*/
function &getHtmlListAsArray($dirname, $prefix="")
public static function &getHtmlListAsArray($dirname, $prefix="")
{
$filelist = array();
if ($handle = opendir($dirname)) {
@@ -186,7 +188,7 @@ function &getHtmlListAsArray($dirname, $prefix="")
* gets list of avatar file names in a certain directory
* if directory is not specified, default directory will be searched
*/
function &getAvatarsList($avatar_dir="")
public static function &getAvatarsList($avatar_dir="")
{
$avatars = array();
if ( $avatar_dir != "" ) {
@@ -200,7 +202,7 @@ function &getAvatarsList($avatar_dir="")
/*
* gets list of all avatar image files inside default avatars directory
*/
function &getAllAvatarsList()
public static function &getAllAvatarsList()
{
$avatars = array();
$dirlist = array();
@@ -219,7 +221,7 @@ function &getAllAvatarsList()
* gets list of subject icon image file names in a certain directory
* if directory is not specified, default directory will be searched
*/
function &getSubjectsList($sub_dir="")
public static function &getSubjectsList($sub_dir="")
{
$subjects = array();
if($sub_dir != ""){
@@ -233,14 +235,14 @@ function &getSubjectsList($sub_dir="")
/*
* gets list of language folders inside default language directory
*/
function &getLangList()
public static function &getLangList()
{
$lang_list = array();
$lang_list =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/language/");
return $lang_list;
}
function &getCountryList()
public static function &getCountryList()
{
$country_list = array (
"" => "-",
@@ -493,7 +495,7 @@ function &getCountryList()
return $country_list;
}
function &getHtmlList()
public static function &getHtmlList()
{
$html_list = array (
"a" => "<a>",
@@ -553,7 +555,7 @@ function &getHtmlList()
return $html_list;
}
function &getUserRankList()
public static function &getUserRankList()
{
$db =& Database::getInstance();
$myts =& MyTextSanitizer::sGetInstance();

0 comments on commit 1e8b5bc

Please sign in to comment.