Issue 2310: Make getAllSites query accesible to all modules

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11108 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-08-28 08:54:47 +00:00
parent e53766e265
commit 5142ab64f8

View file

@ -462,7 +462,21 @@
*/ */
function getSiteAllList() function getSiteAllList()
{ {
if(Context::get('domain')) $args->domain = Context::get('domain'); if(Context::get('domain')) $domain = Context::get('domain');
$siteList = $this->getAllSitesThatHaveModules($domain);
$this->add('site_list', $siteList);
}
/**
* Returns a list of all sites that contain modules
* For each site domain and site_srl are retrieved
*
* @return array
*/
function getAllSitesThatHaveModules($domain = null)
{
$args = new stdClass();
if($domain) $args->domain = $domain;
$columnList = array('domain', 'site_srl'); $columnList = array('domain', 'site_srl');
$siteList = array(); $siteList = array();
@ -493,8 +507,7 @@
unset($siteList[$key]); unset($siteList[$key]);
} }
} }
return $siteList;
$this->add('site_list', $siteList);
} }
/** /**