예제 #1
0
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
예제 #2
0
 private function __construct()
 {
     $this->photoDao = PHOTO_BOL_PhotoDao::getInstance();
     $this->photoCacheDao = PHOTO_BOL_PhotoCacheDao::getInstance();
     $this->dataDao = PHOTO_BOL_SearchDataDao::getInstance();
     $this->indexDao = PHOTO_BOL_SearchIndexDao::getInstance();
     $this->entityTypeDao = PHOTO_BOL_SearchEntityTypeDao::getInstance();
     $this->reloadEntityTypes();
 }
예제 #3
0
파일: update.php 프로젝트: tammyrocks/photo
          FULLTEXT KEY `content` (`content`)
        ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
    ');
} catch (Exception $e) {
    Updater::getLogger()->addEntry(json_encode($e));
}
try {
    UPDATE_Autoload::getInstance()->addPackagePointer('PHOTO_BOL', $plugin->getBolDir());
    PHOTO_BOL_SearchService::getInstance()->addEntityType(PHOTO_BOL_SearchService::ENTITY_TYPE_ALBUM);
    PHOTO_BOL_SearchService::getInstance()->addEntityType(PHOTO_BOL_SearchService::ENTITY_TYPE_PHOTO);
} catch (Exception $e) {
    Updater::getLogger()->addEntry(json_encode($e));
}
try {
    $entityTypeId = PHOTO_BOL_SearchService::getInstance()->getEntityTypeId(PHOTO_BOL_SearchService::ENTITY_TYPE_PHOTO);
    Updater::getDbo()->query('INSERT INTO `' . PHOTO_BOL_SearchDataDao::getInstance()->getTableName() . '` (`entityTypeId`, `entityId`, `content`)
        SELECT ' . $entityTypeId . ', `id`, `description`
        FROM `' . PHOTO_BOL_PhotoDao::getInstance()->getTableName() . '`');
} catch (Exception $e) {
    Updater::getLogger()->addEntry(json_encode($e));
}
$config = Updater::getConfigService();
if (!$config->configExists('photo', 'photo_list_view_classic')) {
    $config->addConfig('photo', 'photo_list_view_classic', FALSE);
}
if (!$config->configExists('photo', 'album_list_view_classic')) {
    $config->addConfig('photo', 'album_list_view_classic', FALSE);
}
if (!$config->configExists('photo', 'photo_view_classic')) {
    $config->addConfig('photo', 'photo_view_classic', FALSE);
}