Ejemplo n.º 1
0
 private function loadAppData($appId)
 {
     if (count(self::$_apps) == 0) {
         // lets load all apps.
         // $model		= FD::model( 'Apps' );
         // $options	= array( 'type' => SOCIAL_APPS_TYPE_FIELDS );
         // $apps		= $model->setLimit(0)->getApps( $options );
         // if( $apps )
         // {
         // 	foreach( $apps as $app )
         // 	{
         // 		self::$_apps[ $app->id ] = $app;
         // 	}
         // }
         $dbcache = FD::dbcache('app');
         // TODO: Change this to where case.
         $result = $dbcache->loadObjectList(array('type' => SOCIAL_APPS_TYPE_FIELDS));
         self::$_apps = $dbcache->bindTable($result);
     }
     return self::$_apps[$appId];
 }