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


PHP Piwik_Updater::recordComponentSuccessfullyUpdated方法代码示例

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


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

示例1: test_updaterChecksCoreAndPlugin_checkThatCoreIsRanFirst

 public function test_updaterChecksCoreAndPlugin_checkThatCoreIsRanFirst()
 {
     $updater = new Piwik_Updater();
     $updater->pathUpdateFilePlugins = PIWIK_INCLUDE_PATH . '/tests/resources/Updater/%s/';
     $updater->pathUpdateFileCore = PIWIK_INCLUDE_PATH . '/tests/resources/Updater/core/';
     $updater->recordComponentSuccessfullyUpdated('testpluginUpdates', '0.1beta');
     $updater->addComponentToCheck('testpluginUpdates', '0.1');
     $updater->recordComponentSuccessfullyUpdated('core', '0.1');
     $updater->addComponentToCheck('core', '0.3');
     $componentsWithUpdateFile = $updater->getComponentsWithUpdateFile();
     $this->assertTrue(count($componentsWithUpdateFile) == 2);
     reset($componentsWithUpdateFile);
     $this->assertTrue(key($componentsWithUpdateFile) == 'core');
 }
开发者ID:nnnnathann,项目名称:piwik,代码行数:14,代码来源:Updater.test.php

示例2: tablesCreation

	/**
	 * Installation Step 5: Table Creation
	 */
	function tablesCreation()
	{
		$this->checkPreviousStepIsValid( __FUNCTION__ );

		$view = new Piwik_Installation_View(
						$this->pathView . 'tablesCreation.tpl',
						$this->getInstallationSteps(),
						__FUNCTION__
					);
		$this->skipThisStep( __FUNCTION__ );
		$this->createDbFromSessionInformation();

		if(Piwik_Common::getRequestVar('deleteTables', 0, 'int') == 1)
		{
			Piwik::dropTables();
			$view->existingTablesDeleted = true;

			// when the user decides to drop the tables then we dont skip the next steps anymore
			// workaround ZF-1743
			$tmp = $this->session->skipThisStep;
			$tmp['firstWebsiteSetup'] = false;
			$tmp['displayJavascriptCode'] = false;
			$this->session->skipThisStep = $tmp;
		}

		$tablesInstalled = Piwik::getTablesInstalled();
		$tablesToInstall = Piwik::getTablesNames();
		$view->tablesInstalled = '';
		if(count($tablesInstalled) > 0)
		{
			// we have existing tables
			$view->tablesInstalled = implode(', ', $tablesInstalled);
			$view->someTablesInstalled = true;

			$minimumCountPiwikTables = 18;
			$baseTablesInstalled = preg_grep('/archive_numeric|archive_blob/', $tablesInstalled, PREG_GREP_INVERT);

			Piwik::createAccessObject();
			Piwik::setUserIsSuperUser();

			if(count($baseTablesInstalled) >= $minimumCountPiwikTables &&
				count(Piwik_SitesManager_API::getInstance()->getAllSitesId()) > 0 &&
				count(Piwik_UsersManager_API::getInstance()->getUsers()) > 0)
			{
				$view->showReuseExistingTables = true;
				// when the user reuses the same tables we skip the website creation step
				// workaround ZF-1743
				$tmp = $this->session->skipThisStep;
				$tmp['firstWebsiteSetup'] = true;
				$tmp['displayJavascriptCode'] = true;
				$this->session->skipThisStep = $tmp;
			}
		}
		else
		{
			Piwik::createTables();
			Piwik::createAnonymousUser();

			$updater = new Piwik_Updater();
			$updater->recordComponentSuccessfullyUpdated('core', Piwik_Version::VERSION);
			$view->tablesCreated = true;
			$view->showNextStep = true;
		}

		$this->session->currentStepDone = __FUNCTION__;
		echo $view->render();
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:70,代码来源:Controller.php

示例3: tablesCreation

 function tablesCreation()
 {
     $this->checkPreviousStepIsValid(__FUNCTION__);
     $view = new Piwik_Installation_View($this->pathView . 'tablesCreation.tpl', $this->getInstallationSteps(), __FUNCTION__);
     $session = new Zend_Session_Namespace("Installation");
     $this->skipThisStep(__FUNCTION__);
     $this->createDbFromSessionInformation();
     if (Piwik_Common::getRequestVar('deleteTables', 0, 'int') == 1) {
         Piwik::dropTables();
         $view->existingTablesDeleted = true;
         // when the user decides to drop the tables then we dont skip the next steps anymore
         $session->skipThisStep['firstWebsiteSetup'] = false;
         $session->skipThisStep['displayJavascriptCode'] = false;
     }
     $tablesInstalled = Piwik::getTablesInstalled();
     $tablesToInstall = Piwik::getTablesNames();
     $view->tablesInstalled = '';
     if (count($tablesInstalled) > 0) {
         $view->tablesInstalled = implode(", ", $tablesInstalled);
         $view->someTablesInstalled = true;
         $minimumCountPiwikTables = 14;
         if (count($tablesInstalled) >= $minimumCountPiwikTables) {
             $view->showReuseExistingTables = true;
             // when the user reuses the same tables we skip the website creation step
             $session->skipThisStep['firstWebsiteSetup'] = true;
             $session->skipThisStep['displayJavascriptCode'] = true;
         }
     } else {
         Piwik::createTables();
         Piwik::createAnonymousUser();
         require_once "Updater.php";
         $updater = new Piwik_Updater();
         $updater->recordComponentSuccessfullyUpdated('core', Piwik_Version::VERSION);
         $view->tablesCreated = true;
         $view->showNextStep = true;
     }
     if (isset($session->databaseCreated) && $session->databaseCreated === true) {
         $view->databaseName = $session->db_infos['dbname'];
         $view->databaseCreated = true;
         unset($session->databaseCreated);
     }
     $session->currentStepDone = __FUNCTION__;
     echo $view->render();
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:44,代码来源:Controller.php


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