• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_enabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP is_enabled函数的具体用法?PHP is_enabled怎么用?PHP is_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_enabled函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _init

 public static function _init()
 {
     static::$_properties['name']['label'] = term('member.name');
     static::$_properties['name']['validation']['min_length'][] = conf('member.name.validation.length.min');
     static::$_properties['name']['validation']['max_length'][] = conf('member.name.validation.length.max');
     if (is_enabled('notice') && conf('mention.isEnabled', 'notice')) {
         static::$_properties['name']['validation']['match_pattern'][] = sprintf('/^(%s)$/u', conf('member.name.validation.match_patterns.register'));
         $method = conf('member.name.validation.blacklist.method');
         if (is_callable($method)) {
             static::$_properties['name']['validation']['not_in_array'][] = call_user_func($method);
         }
     }
     static::$_properties['register_type']['validation']['in_array'][] = Site_Member::get_accept_member_register_types();
     $sex_options = Site_Form::get_form_options4config('term.member.sex.options');
     static::$_properties['sex']['label'] = term('member.sex.label');
     static::$_properties['sex']['form']['options'] = $sex_options;
     static::$_properties['sex']['validation']['in_array'][] = array_keys($sex_options);
     $options_public_flag = Site_Util::get_public_flags();
     static::$_properties['sex_public_flag']['label'] = sprintf('%sの%s', term('member.sex.label'), term('public_flag.label'));
     static::$_properties['sex_public_flag']['form'] = Site_Form::get_public_flag_configs();
     static::$_properties['sex_public_flag']['validation']['in_array'][] = $options_public_flag;
     static::$_properties['birthyear']['label'] = term('member.birthyear');
     $options = Form_Util::get_year_options(conf('member.profile.birthday.year_from'), conf('member.profile.birthday.year_to'));
     static::$_properties['birthyear']['form']['options'] = $options;
     static::$_properties['birthyear']['validation']['in_array'][] = array_keys($options);
     static::$_properties['birthyear_public_flag']['label'] = sprintf('%sの%s', term('member.birthyear'), term('public_flag.label'));
     static::$_properties['birthyear_public_flag']['form'] = Site_Form::get_public_flag_configs();
     static::$_properties['birthyear_public_flag']['validation']['in_array'][] = $options_public_flag;
     static::$_properties['birthday']['label'] = term('member.birthday');
     static::$_properties['birthday_public_flag']['label'] = sprintf('%sの%s', term('member.birthday'), term('public_flag.label'));
     static::$_properties['birthday_public_flag']['form'] = Site_Form::get_public_flag_configs();
     static::$_properties['birthday_public_flag']['validation']['in_array'][] = $options_public_flag;
     static::$_properties['invite_member_id'] = Util_Orm::get_relational_numeric_key_prop(false);
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:34,代码来源:member.php


示例2: save_with_relations

 public function save_with_relations($member_id, $values)
 {
     if (!empty($this->member_id) && $this->member_id != $member_id) {
         throw new \InvalidArgumentException('Parameter member_id is invalid.');
     }
     $is_new = $this->_is_new;
     $this->member_id = $member_id;
     if (isset($values['title'])) {
         $this->title = $values['title'];
     }
     if (isset($values['body'])) {
         $this->body = $values['body'];
     }
     if (isset($values['public_flag'])) {
         $this->public_flag = $values['public_flag'];
     }
     $is_changed_public_flag = $this->is_changed('public_flag');
     $is_changed = $this->is_changed();
     if ($is_changed) {
         $this->save();
     }
     if (is_enabled('timeline')) {
         if (!$is_new && $is_changed_public_flag) {
             // timeline の public_flag の更新
             \Timeline\Model_Timeline::update_public_flag4foreign_table_and_foreign_id($this->public_flag, 'thread', $this->id, \Config::get('timeline.types.thread'));
         } else {
             // timeline 投稿
             \Timeline\Site_Model::save_timeline($member_id, $this->public_flag, 'thread', $this->id, $this->updated_at);
         }
     }
     return $is_changed;
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:32,代码来源:thread.php


示例3: delete_timeline4id

 public static function delete_timeline4id($timeline_id)
 {
     $delete_target_notice_cache_member_ids = array();
     $writable_connection = \MyOrm\Model::connection(true);
     \DBUtil::set_connection($writable_connection);
     \DB::start_transaction();
     if (is_enabled('notice')) {
         \Notice\Site_NoOrmModel::delete_member_watch_content_multiple4foreign_data('timeline', $timeline_id);
         $notice_ids = \Notice\Site_NoOrmModel::get_notice_ids4foreign_data('timeline', $timeline_id);
         $delete_target_notice_cache_member_ids = \Notice\Site_NoOrmModel::get_notice_status_member_ids4notice_ids($notice_ids);
         \Notice\Site_NoOrmModel::delete_notice_multiple4ids($notice_ids);
     }
     if (!\DB::delete('timeline')->where('id', $timeline_id)->execute()) {
         throw new \FuelException('Failed to delete timeline. id:' . $timeline_id);
     }
     \DB::commit_transaction();
     \DBUtil::set_connection(null);
     // delete caches
     if ($delete_target_notice_cache_member_ids) {
         foreach ($delete_target_notice_cache_member_ids as $member_id) {
             \Notice\Site_Util::delete_unread_count_cache($member_id);
         }
     }
     Site_Util::delete_cache($timeline_id);
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:25,代码来源:noormmodel.php


示例4: before_delete

 public function before_delete(\Orm\Model $obj)
 {
     // カバー写真の確認 & 削除
     if (!($album = \Album\Model_Album::find($obj->album_id))) {
         throw new \FuelException('Invalid album id.');
     }
     if ($album->cover_album_image_id == $obj->id) {
         $album->cover_album_image_id = null;
         $album->save();
     }
     // プロフィール写真の確認 & 削除
     if ($album->foreign_table == 'member') {
         if ($album->member->file_name == $obj->file_name) {
             $album->member->file_name = null;
             $album->member->save();
         }
         // timeline 投稿の削除
         if (is_enabled('timeline')) {
             \Timeline\Model_Timeline::delete4foreign_table_and_foreign_ids('album_image', $obj->id);
         }
     }
     if (is_enabled('timeline')) {
         // timeline_child_data の削除
         \Timeline\Model_TimelineChildData::delete4foreign_table_and_foreign_ids('album_image', $obj->id);
         // timeline view cache の削除
         if (is_enabled('note') && \Config::get('timeline.articles.cache.is_use') && $obj->album->foreign_table == 'note') {
             \Timeline\Site_Model::delete_note_view_cache4album_image_id($obj->id);
         }
     }
     // file 削除
     if ($file = \Model_File::get4name($obj->file_name)) {
         $file->delete();
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:34,代码来源:deletealbumimage.php


示例5: action_index

 /**
  * Site index
  * 
  * @access  public
  * @return  Response
  */
 public function action_index()
 {
     $data = array();
     if (Config::get('page.site.index.timeline.isEnabled') && is_enabled('timeline')) {
         $data['timelines'] = \Timeline\Site_Util::get_list4view(\Auth::check() ? $this->u->id : 0, 0, false, null, $this->common_get_list_params(array('desc' => 1, 'latest' => 1, 'limit' => Config::get('page.site.index.timeline.list.limit')), Config::get('page.site.index.timeline.list.limit_max'), true));
         $data['timelines']['see_more_link'] = array('uri' => 'timeline');
         //$this->template->post_footer = \View::forge('timeline::_parts/load_timelines');
     }
     if (Config::get('page.site.index.news.isEnabled') && is_enabled('news')) {
         list($limit, $page) = $this->common_get_pager_list_params(\Config::get('page.site.index.news.list.limit'), \Config::get('page.site.index.news.list.limit_max'));
         $data['news_list'] = \News\Site_Model::get_list($limit, $page, \Auth::check());
         $data['news_list']['see_more_link'] = array('uri' => 'news');
     }
     if (Config::get('page.site.index.albumImage.isEnabled') && is_enabled('album')) {
         list($limit, $page) = $this->common_get_pager_list_params(\Config::get('page.site.index.albumImage.list.limit'), \Config::get('page.site.index.albumImage.list.limit_max'));
         $data['album_images'] = \Album\Model_AlbumImage::get_pager_list(array('related' => array('album'), 'where' => \Site_Model::get_where_params4list(0, \Auth::check() ? $this->u->id : 0), 'order_by' => array('id' => 'desc'), 'limit' => $limit), $page);
         $data['album_images']['liked_album_image_ids'] = conf('like.isEnabled') && \Auth::check() ? \Site_Model::get_liked_ids('album_image', $this->u->id, $data['album_images']['list']) : array();
         $data['album_images']['column_count'] = \Config::get('page.site.index.albumImage.list.column_count');
         //$this->template->post_footer = \View::forge('image/_parts/list_footer');
     }
     $this->template->post_footer = \View::forge('site/_parts/index_footer');
     if (conf('site.index.slide.isEnabled', 'page')) {
         if (conf('site.index.slide.recentAlbumImage.isEnabled', 'page')) {
             $images = \Album\Site_Util::get_top_slide_image_uris();
         } else {
             $images = Config::get('page.site.index.slide.images');
         }
         $this->template->post_header_content = View::forge('site/_parts/slide', array('image_uris' => $images));
     }
     $this->set_title_and_breadcrumbs('', null, null, null, null, true, true);
     $this->template->content = View::forge('site/index', $data);
     if (!empty($data['news_list']['list'])) {
         $this->template->content->set_safe('html_bodys', \News\Site_Model::convert_raw_bodys($data['news_list']['list']));
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:41,代码来源:site.php


示例6: _init

 public static function _init()
 {
     if (is_enabled('notice')) {
         static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('thread_comment' => 'value'), 'foreign_id' => array('thread_comment_id' => 'property'), 'type_key' => array('like' => 'value'), 'member_id_from' => array('member_id' => 'property'), 'member_id_to' => array('related' => array('thread_comment' => 'member_id'))));
         $type = \Notice\Site_Util::get_notice_type('like');
         static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('thread_comment' => 'value'), 'foreign_id' => array('thread_comment_id' => 'property'), 'type' => array($type => 'value')));
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:8,代码来源:threadcommentlike.php


示例7: test_like_notice

 /**
  * @dataProvider like_notice_provider
  */
 public function test_like_notice($member_id_to, $mc_notice_like, $member_id_from, $is_test_after_read, $is_cahce_deleted_exp, $countup_num, $countup_num_all)
 {
     if (!is_enabled('notice')) {
         \Util_Develop::output_test_info(__FILE__, __LINE__);
         $this->markTestSkipped('notice module is disabled.');
     }
     // 事前準備
     \Model_MemberConfig::set_value($member_id_to, \Notice\Form_MemberConfig::get_name('like'), $mc_notice_like);
     $is_new = false;
     if (!self::$commented_member_id_before || $member_id_to != self::$commented_member_id_before) {
         self::$timeline = Site_Test::setup_timeline(self::$member_id);
         self::$timeline_comment = \Site_Test::save_comment('timeline', self::$timeline->id, $member_id_to);
         $is_new = true;
     }
     self::$commented_member_id_before = $member_id_to;
     if ($is_test_after_read) {
         $read_count = \Notice\Site_Util::change_status2read($member_id_to, self::$foreign_table, self::$timeline_comment->id, self::$type_key);
     }
     $notice_count_all_before = \Notice\Model_Notice::get_count();
     // set cache
     $notice_count_before = \Notice\Site_Util::get_unread_count($member_id_to);
     if (self::$is_check_notice_cache) {
         $this->assertFalse(\Notice\Site_Test::check_no_cache4notice_unread($member_id_to));
     }
     // cache が生成されていることを確認
     // like save
     $is_liked = (bool) Model_TimelineCommentLike::change_registered_status4unique_key(array('timeline_comment_id' => self::$timeline_comment->id, 'member_id' => $member_id_from));
     if (self::$is_check_notice_cache) {
         if ($is_cahce_deleted_exp) {
             $this->assertTrue(\Notice\Site_Test::check_no_cache4notice_unread($member_id_to));
         } else {
             $this->assertFalse(\Notice\Site_Test::check_no_cache4notice_unread($member_id_to));
         }
     }
     // notice count 取得
     $notice_count = \Notice\Site_Util::get_unread_count($member_id_to);
     if (self::$is_check_notice_cache) {
         $this->assertFalse(\Notice\Site_Test::check_no_cache4notice_unread($member_id_to));
     }
     // cache が生成されていることを確認
     // execute test
     $this->assertEquals($notice_count_before + $countup_num, $notice_count);
     // count up を確認
     // Model_Notice
     // 件数
     $notice_count_all = \Notice\Model_Notice::get_count();
     $this->assertEquals($notice_count_all_before + $countup_num_all, $notice_count_all);
     // record
     if ($notice = \Notice\Model_Notice::get_last4foreign_data(self::$foreign_table, self::$timeline_comment->id, \Notice\Site_Util::get_notice_type(self::$type_key))) {
         $notice_status = \Notice\Model_NoticeStatus::get4member_id_and_notice_id($member_id_to, $notice->id);
         $notice_member_from = \Notice\Model_NoticeMemberFrom::get_last();
         if ($mc_notice_like !== 0 && $member_id_to != $member_id_from) {
             $this->assertEquals($member_id_from, $notice_member_from->member_id);
         }
         $this->assertEquals($notice_member_from->created_at, $notice_status->sort_datetime);
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:60,代码来源:timelinecommentlike.php


示例8: _init

 public static function _init()
 {
     if (\Module::loaded('timeline')) {
         static::$_observers['MyOrm\\Observer_InsertMemberFollowTimeline'] = array('events' => array('after_insert'), 'timeline_relations' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('album_image_id' => 'property')), 'property_from_member_id' => 'member_id');
     }
     if (is_enabled('notice')) {
         static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('album_image_id' => 'property'), 'type_key' => array('like' => 'value'), 'member_id_from' => array('member_id' => 'property'), 'member_id_to' => array('related' => array('album_image' => array('album' => 'member_id')))));
         $type = \Notice\Site_Util::get_notice_type('like');
         static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('album_image_id' => 'property'), 'type' => array($type => 'value')));
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:11,代码来源:albumimagelike.php


示例9: after_insert

 public function after_insert(\Notice\Model_MemberWatchContent $obj)
 {
     if (is_enabled('timeline')) {
         if (!($timelines = \Notice\Site_Model::get_timelines4foreign_table_and_id($obj->foreign_table, $obj->foreign_id))) {
             return false;
         }
         foreach ($timelines as $timeline) {
             $member_follow_timeline = \Timeline\Model_MemberFollowTimeline::check_and_create($timeline->id, $obj->member_id);
         }
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:11,代码来源:memberwatchcontentinserted.php


示例10: before_delete

 public function before_delete(\Orm\Model $obj)
 {
     // Delete album_image file.
     $album_images = \Album\Model_AlbumImage::get4album_id($obj->id);
     foreach ($album_images as $album_image) {
         $album_image->delete();
     }
     // delete timeline
     if (is_enabled('timeline')) {
         \Timeline\Model_Timeline::delete4foreign_table_and_foreign_ids('album', $obj->id);
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:12,代码来源:deletealbum.php


示例11: get_enabled_modules_str

function get_enabled_modules_str($target_modules, $delimitter = '|')
{
    foreach ($target_modules as $key => $module) {
        if (!is_enabled($module)) {
            unset($target_modules[$key]);
        }
    }
    if (!$target_modules) {
        return '';
    }
    return implode($delimitter, $target_modules);
}
开发者ID:uzura8,项目名称:flockbird,代码行数:12,代码来源:conf.php


示例12: delete_with_timeline

 public static function delete_with_timeline($name)
 {
     if (!($obj = self::get4name($name))) {
         return false;
     }
     if (is_enabled('timeline')) {
         \Timeline\Model_Timeline::delete4foreign_table_and_foreign_ids('file', $obj->id);
     }
     $deleted_filesize = $obj->filesize;
     $obj->delete();
     return $deleted_filesize;
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:12,代码来源:file.php


示例13: before_delete

 public function before_delete(\Notice\Model_MemberWatchContent $obj)
 {
     if (is_enabled('timeline')) {
         if (!($timelines = \Notice\Site_Model::get_timelines4foreign_table_and_id($obj->foreign_table, $obj->foreign_id))) {
             return false;
         }
         foreach ($timelines as $timeline) {
             $member_follow_timeline = \Timeline\Model_MemberFollowTimeline::get4timeline_id_and_member_id($timeline->id, $obj->member_id);
             $member_follow_timeline->delete();
         }
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:12,代码来源:memberwatchcontentdeleted.php


示例14: action_index

 /**
  * Mmeber_Profile_Image index
  * 
  * @access  public
  * @return  Response
  */
 public function action_index($member_id = null)
 {
     list($is_mypage, $member, $access_from) = $this->check_auth_and_is_mypage($member_id);
     $member_profiles = Model_MemberProfile::get4member_id($member->id, true);
     $title = term('profile', 'site.picture', $is_mypage ? 'site.setting' : '');
     $this->set_title_and_breadcrumbs($title, array('/member/' . $member_id => sprintf('%sさんの%s', $member->name, term('site.page.kana'))), $member);
     $images = array();
     if (is_enabled('album') && conf('upload.types.img.types.m.save_as_album_image')) {
         $album_id = \Album\Model_Album::get_id_for_foreign_table($member->id, 'member');
         $images = \Album\Model_AlbumImage::query()->related('album')->where('album_id', $album_id)->order_by('id', 'desc')->get();
         $this->template->post_footer = \View::forge('_parts/load_masonry');
     }
     $this->template->content = View::forge('member/profile/image/index', array('is_mypage' => $is_mypage, 'member' => $member, 'access_from' => $access_from, 'images' => $images, 'member_profiles' => $member_profiles));
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:20,代码来源:image.php


示例15: action_home

 /**
  * Mmeber home
  * 
  * @access  public
  * @return  Response
  */
 public function action_home($id = null)
 {
     $id = (int) $id;
     list($is_mypage, $member, $access_from) = $this->check_auth_and_is_mypage($id);
     $member_profiles = Model_MemberProfile::get4member_id($member->id, true);
     $data = array('member' => $member, 'member_profiles' => $member_profiles, 'is_mypage' => $is_mypage, 'access_from' => $access_from, 'display_type' => 'summary');
     if (is_enabled('timeline')) {
         $data['timeline'] = \Timeline\Site_Util::get_list4view(\Auth::check() ? $this->u->id : 0, $member->id, false, null, $this->common_get_list_params(array('desc' => 1, 'latest' => 1, 'limit' => conf('articles.limit', 'timeline')), conf('articles.limit_max', 'timeline'), true));
         $data['timeline']['member'] = $member;
         $this->template->post_footer = \View::forge('timeline::_parts/load_timelines');
     }
     $this->set_title_and_breadcrumbs($member->name . ' さんのページ', array('member/list' => term('member.view', 'site.list')), null, null, array(), false, false, array('title' => $member->name . ' さんのページ', 'image' => Site_Util::get_image_uri4file_name($member->get_image(), 'P_L', 'profile')));
     $this->template->content = \View::forge('member/home', $data);
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:20,代码来源:member.php


示例16: _init

 public static function _init()
 {
     static::$_properties['name']['label'] = term('album') . '名';
     static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs();
     static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags();
     static::$_properties['foreign_table']['validation']['in_array'][] = Site_Util::get_album_foreign_tables();
     if (is_enabled('notice')) {
         static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property')));
     }
     if (\Module::loaded('timeline')) {
         // 更新時に timeline の sort_datetime を更新
         $observer_key = \Config::get('timeline.types.album');
         static::$_observers['MyOrm\\Observer_UpdateRelationalTables'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property'), 'type' => array($observer_key => 'value')), 'check_changed' => array('check_properties' => array('name', 'body', 'public_flag')), 'update_properties' => array('sort_datetime' => array('updated_at' => 'property'))));
         if (\Config::get('timeline.articles.cache.is_use')) {
             static::$_observers['MyOrm\\Observer_ExecuteToRelations'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'execute_func' => array('method' => '\\Timeline\\Site_Util::delete_cache', 'params' => array('id' => 'property')), 'conditions' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('id' => 'property'))));
         }
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:18,代码来源:album.php


示例17: delete_album_image_multiple4ids

 public static function delete_album_image_multiple4ids($album_image_ids = array(), $with_delete_timeline = false)
 {
     if (!is_array($album_image_ids)) {
         $album_image_ids = (array) $album_image_ids;
     }
     $delete_target_notice_cache_member_ids = array();
     $delete_target_timeline_ids = array();
     $writable_connection = \MyOrm\Model::connection(true);
     \DBUtil::set_connection($writable_connection);
     \DB::start_transaction();
     foreach ($album_image_ids as $album_image_id) {
         if (is_enabled('notice')) {
             \Notice\Site_NoOrmModel::delete_member_watch_content_multiple4foreign_data('album_image', $album_image_id);
             $notice_ids = \Notice\Site_NoOrmModel::get_notice_ids4foreign_data('album_image', $album_image_id);
             $delete_target_notice_cache_member_ids += \Notice\Site_NoOrmModel::get_notice_status_member_ids4notice_ids($notice_ids);
             \Notice\Site_NoOrmModel::delete_notice_multiple4ids($notice_ids);
         }
         if (is_enabled('timeline') && $with_delete_timeline) {
             $delete_target_timeline_ids += \timeline\site_noormmodel::delete_timeline_multiple4foreign_data('album_image', $album_image_id);
         }
     }
     $file_names = \Util_Orm::conv_col2array(Model_AlbumImage::get4ids($album_image_ids), 'file_name');
     \DB::delete('album_image')->where('id', 'in', $album_image_ids)->execute();
     \DB::commit_transaction();
     \DBUtil::set_connection(null);
     \DB::start_transaction();
     if ($files = \Model_File::get4names($file_names)) {
         foreach ($files as $file) {
             $file->delete();
         }
     }
     \DB::commit_transaction();
     // delete caches
     if ($delete_target_notice_cache_member_ids) {
         foreach ($delete_target_notice_cache_member_ids as $member_id) {
             \Notice\Site_Util::delete_unread_count_cache($member_id);
         }
     }
     if ($delete_target_timeline_ids) {
         foreach ($delete_target_timeline_ids as $timeline_id) {
             \Timeline\Site_Util::delete_cache($timeline_id);
         }
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:44,代码来源:noormmodel.php


示例18: _init

 public static function _init()
 {
     static::$_properties['type']['validation']['in_array'][] = \Config::get('timeline.types');
     static::$_properties['foreign_table']['validation']['in_array'][] = Site_Util::get_accept_timeline_foreign_tables();
     static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs();
     static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags();
     if (is_enabled('notice')) {
         static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('timeline' => 'value'), 'foreign_id' => array('id' => 'property'), 'type_key' => array('create' => 'value'), 'member_id_from' => array('member_id' => 'property')));
         static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('timeline' => 'value'), 'foreign_id' => array('id' => 'property')));
     }
     if (\Config::get('timeline.articles.cache.is_use')) {
         // 更新・削除時に timeline の cache を削除
         static::$_observers['MyOrm\\Observer_UpdateTimeline'] = array('events' => array('after_update'), 'check_changed' => array('check_properties' => array('body', 'source', 'source_uri', 'public_flag', 'sort_datetime' => array('ignore_property' => 'comment_count'))));
         static::$_observers['MyOrm\\Observer_DeleteTimeline'] = array('events' => array('before_delete'));
     }
     if (\Config::get('timeline.importanceLevel.isEnabled')) {
         // 更新時に timeline の importance_level を更新
         static::$_observers['MyOrm\\Observer_UpdateTimelineImportanceLevel'] = array('events' => array('before_update'));
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:20,代码来源:timeline.php


示例19: run_preflight

/**
 * Perform preflight checks for Mercator
 *
 * Checks that we can actually run SSO, then attaches the relevant actions
 * and filters to make it useful.
 */
function run_preflight()
{
    if (!is_enabled()) {
        return;
    }
    // Check for COOKIE_DOMAIN definition
    //
    // Note that this can't be an admin notice, as you'd never be able to log in
    // to see it.
    if (defined('COOKIE_DOMAIN')) {
        status_header(500);
        header('X-Mercator: COOKIE_DOMAIN');
        wp_die('The constant <code>COOKIE_DOMAIN</code> is defined (probably in <code>wp-config.php</code>). Please remove or comment out that <code>define()</code> line.');
    }
    // E: There's no reason to become alarmed, and we hope you'll enjoy the
    //    rest of your flight.
    //
    // E: By the way, is there anyone on board who knows how to fly a plane?
    bootstrap();
}
开发者ID:fansided,项目名称:Mercator,代码行数:26,代码来源:sso.php


示例20: _init

 public static function _init()
 {
     static::$_properties['name']['label'] = term('site.picture', 'site.title');
     static::$_properties['public_flag']['form'] = \Site_Form::get_public_flag_configs();
     static::$_properties['public_flag']['validation']['in_array'][] = \Site_Util::get_public_flags();
     if (conf('albumImageLoction.saveFromExif', 'album')) {
         static::$_observers['MyOrm\\Observer_SaveAlbumImageLocation'] = array('events' => array('after_insert'));
     }
     if (is_enabled('notice')) {
         static::$_observers['MyOrm\\Observer_InsertNotice'] = array('events' => array('after_insert'), 'update_properties' => array('foreign_table' => array('album' => 'value'), 'foreign_id' => array('album_id' => 'property'), 'type_key' => array('child_data' => 'value'), 'member_id_from' => array('related' => array('album' => 'member_id'))));
         static::$_observers['MyOrm\\Observer_DeleteNotice'] = array('events' => array('before_delete'), 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property')));
     }
     if (\Module::loaded('timeline')) {
         $type_album_image_profile = \Config::get('timeline.types.album_image_profile');
         // 更新時に timeline の sort_datetime, comment_count を更新
         static::$_observers['MyOrm\\Observer_UpdateRelationalTables'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_Timeline', 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property'), 'type' => array($type_album_image_profile => 'value')), 'check_changed' => array('check_properties' => array('public_flag', 'sort_datetime', 'comment_count', 'like_count')), 'update_properties' => array('public_flag', 'sort_datetime', 'updated_at', 'comment_count', 'like_count')));
         if (\Config::get('timeline.articles.cache.is_use')) {
             static::$_observers['MyOrm\\Observer_ExecuteToRelations'] = array('events' => array('after_update'), 'relations' => array('model_to' => '\\Timeline\\Model_TimelineChildData', 'conditions' => array('foreign_table' => array('album_image' => 'value'), 'foreign_id' => array('id' => 'property')), 'check_changed' => array('check_properties' => array('name', 'public_flag')), 'execute_func' => array('method' => '\\Timeline\\Site_Util::delete_cache', 'params' => array('timeline_id' => 'property'))));
         }
     }
 }
开发者ID:uzura8,项目名称:flockbird,代码行数:21,代码来源:albumimage.php



注:本文中的is_enabled函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_enabled_auth函数代码示例发布时间:2022-05-15
下一篇:
PHP is_empty_html函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap