当前位置: 首页>>代码示例>>PHP>>正文


PHP vBulletinHook::build_datastore方法代码示例

本文整理汇总了PHP中vBulletinHook::build_datastore方法的典型用法代码示例。如果您正苦于以下问题:PHP vBulletinHook::build_datastore方法的具体用法?PHP vBulletinHook::build_datastore怎么用?PHP vBulletinHook::build_datastore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vBulletinHook的用法示例。


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

示例1: step_1

 /**
  * Step #1 - Import Settings XML
  *
  */
 function step_1()
 {
     build_forum_permissions();
     vBulletinHook::build_datastore($this->db);
     build_product_datastore();
     build_activitystream_datastore();
     if (VB_AREA == 'Upgrade') {
         $this->show_message($this->phrase['final']['import_latest_options']);
         require_once DIR . '/includes/adminfunctions_options.php';
         if (!($xml = file_read(DIR . '/install/vbulletin-settings.xml'))) {
             $this->add_error(sprintf($this->phrase['vbphrase']['file_not_found'], 'vbulletin-settings.xml'), self::PHP_TRIGGER_ERROR, true);
             return;
         }
         $this->show_message(sprintf($this->phrase['vbphrase']['importing_file'], 'vbulletin-settings.xml'));
         xml_import_settings($xml);
         $this->show_message($this->phrase['core']['import_done']);
     } else {
         $this->skip_message();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:24,代码来源:class_upgrade_final.php

示例2: disable

 /**
  * Disable a product, not delete
  *
  */
 public function disable($productid = null)
 {
     $productid = $productid ? $productid : $this->productinfo['productid'];
     $this->db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "product\n\t\t\tSET active = 0\n\t\t\tWHERE productid = '" . $this->db->escape_string($productid) . "'\n\t\t");
     vBulletinHook::build_datastore($this->db);
     build_product_datastore();
     // build bitfields to remove/add this products bitfields
     require_once DIR . '/includes/class_bitfield_builder.php';
     vB_Bitfield_Builder::save($this->db);
     // Products can enable a cron entries, so we need to rebuild that as well
     require_once DIR . '/includes/functions_cron.php';
     build_cron_next_run();
     // Purge cache -- doesn't apply to pre-vB4 versions
     if (class_exists('vB_Cache')) {
         vB_Cache::instance()->purge('vb_types.types');
     }
     // Reload blocks and block types -- doesn't apply to pre-vB4 versions
     if (class_exists('vB_BlockManager')) {
         $blockmanager = vB_BlockManager::create($this->registry);
         $blockmanager->reloadBlockTypes();
         $blockmanager->getBlocks(true, true);
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:class_upgrade_product.php

示例3: build_datastore

 // Clear routes from datastore
 build_datastore('routes', serialize(array()), 1);
 //clear the type cache.
 vB_Cache::instance()->purge('vb_types.types');
 // need to remove the language columns for this product as well
 require_once DIR . '/includes/class_dbalter.php';
 $db_alter = new vB_Database_Alter_MySQL($db);
 if ($db_alter->fetch_table_info('language')) {
     $phrasetypes = $db->query_read("\r\n\t\t\tSELECT fieldname\r\n\t\t\tFROM " . TABLE_PREFIX . "phrasetype\r\n\t\t\tWHERE product = '" . $db->escape_string($vbulletin->GPC['productid']) . "'\r\n\t\t");
     while ($phrasetype = $db->fetch_array($phrasetypes)) {
         $db_alter->drop_field("phrasegroup_{$phrasetype['fieldname']}");
     }
 }
 delete_product($vbulletin->GPC['productid']);
 build_all_styles();
 vBulletinHook::build_datastore($db);
 require_once DIR . '/includes/adminfunctions_language.php';
 build_language();
 build_options();
 require_once DIR . '/includes/functions_cron.php';
 build_cron_next_run();
 build_product_datastore();
 // build bitfields to remove/add this products bitfields
 require_once DIR . '/includes/class_bitfield_builder.php';
 vB_Bitfield_Builder::save($db);
 // reload block types
 $blockmanager = vB_BlockManager::create($vbulletin);
 $blockmanager->reloadBlockTypes(true);
 if (!defined('DISABLE_PRODUCT_REDIRECT')) {
     define('CP_REDIRECT', 'index.php?loc=' . urlencode('plugin.php?do=product'));
 }
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:plugin.php

示例4: step_149

 /**
  * Step #149
  *
  */
 function step_149()
 {
     $this->show_message($this->phrase['core']['cache_update']);
     // Update hidden profile cache to handle hidden AND required fields
     require_once DIR . '/includes/adminfunctions_profilefield.php';
     build_profilefield_cache();
     $this->db->query_write("DELETE FROM " . TABLE_PREFIX . "datastore WHERE title = 'hidprofilecache'");
     //require_once(DIR . '/includes/adminfunctions_attachment.php');
     //build_attachment_permissions();
     vBulletinHook::build_datastore($this->db);
     build_product_datastore();
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:16,代码来源:class_upgrade_360b1.php

示例5: install_product


//.........这里部分代码省略.........
		$rebuild = array(
			'templates' => false,
			'plugins'   => false,
			'phrases'   => false,
			'options'   => false,
			'cron'      => false
		);

		$installed_version = null;
	}

	// ############## import install/uninstall code
	if (is_array($arr['codes']['code']))
	{
		$codes =& $arr['codes']['code'];
		if (!isset($codes[0]))
		{
			$codes = array($codes);
		}

		// run each of the codes
		foreach ($codes AS $code)
		{
			// Run if: code version is * (meaning always run), no version
			//		previously installed, or if the code is for a newer version
			//		than is currently installed
			if ($code['version'] == '*' OR $installed_version === null OR is_newer_version($code['version'], $installed_version))
			{
				eval($code['installcode']);
			}
		}

		// Clear routes from datastore
		build_datastore('routes', serialize(array()), 1);

		//assume that the product may have installed content types and purge the content type cache
		vB_Cache::instance()->purge('vb_types.types');
	}

	// dependencies checked, install code run. Now clear out the old product info;
	// settings should be retained in memory already
	delete_product($info['productid'], false, true);

	if (is_array($codes))
	{
		// we've now run all the codes, if execution is still going
		// then it's going to complete fully, so insert the codes
		foreach ($codes AS $code)
		{
			/* insert query */
			$db->query_write("
				INSERT INTO " . TABLE_PREFIX . "productcode
					(productid, version, installcode, uninstallcode)
				VALUES
					('" . $db->escape_string($info['productid']) . "',
					'" . $db->escape_string($code['version']) . "',
					'" . $db->escape_string($code['installcode']) . "',
					'" . $db->escape_string($code['uninstallcode']) . "')
			");
		}
	}

	if (is_array($dependencies))
	{
		// dependencies met, codes run -- now we can insert the dependencies into the DB
		foreach ($dependencies AS $dependency)
开发者ID:hungnv0789,项目名称:vhtm,代码行数:67,代码来源:adminfunctions_plugin.php


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