Esempio n. 1
0
 public static function update()
 {
     ServerFilesGenerator::deleteWebConfigFiles();
     ServerFilesGenerator::createWebConfigFiles();
     ServerFilesGenerator::deleteHtAccessFiles();
     ServerFilesGenerator::createHtAccessFiles();
 }
Esempio n. 2
0
 public function doUpdate(Updater $updater)
 {
     ServerFilesGenerator::deleteWebConfigFiles();
     ServerFilesGenerator::createWebConfigFiles();
     ServerFilesGenerator::deleteHtAccessFiles();
     ServerFilesGenerator::createHtAccessFiles();
 }
Esempio n. 3
0
 protected static function initServerFilesForSecurity()
 {
     if (SettingsServer::isIIS()) {
         ServerFilesGenerator::createWebConfigFiles();
     } else {
         ServerFilesGenerator::createHtAccessFiles();
     }
     ServerFilesGenerator::createWebRootFiles();
 }
Esempio n. 4
0
 public function doUpdate(Updater $updater)
 {
     $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
     $this->migratePluginEmailUpdateSetting();
     // added .woff and woff2 whitelisted file for apache webserver
     ServerFilesGenerator::deleteHtAccessFiles();
     ServerFilesGenerator::createHtAccessFiles();
     // Renamed plugin ExampleRssWidget -> RssWidget
     \Piwik\Plugin\Manager::getInstance()->activatePlugin('RssWidget');
     \Piwik\Plugin\Manager::getInstance()->deactivatePlugin('ExampleRssWidget');
 }
Esempio n. 5
0
 public function doUpdate(Updater $updater)
 {
     $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
     $updater->executeMigrations(__FILE__, $this->getUserPasswordMigrations([]));
     ServerFilesGenerator::createFilesForSecurity();
 }
Esempio n. 6
0
 protected static function initServerFilesForSecurity()
 {
     ServerFilesGenerator::createWebConfigFiles();
     ServerFilesGenerator::createHtAccessFiles();
     ServerFilesGenerator::createWebRootFiles();
 }
Esempio n. 7
0
 /**
  * Installation Step 6: Configure first web-site
  */
 public function firstWebsiteSetup()
 {
     $this->checkPiwikIsNotInstalled();
     ServerFilesGenerator::createFilesForSecurity();
     $siteIdsCount = Access::doAsSuperUser(function () {
         return count(APISitesManager::getInstance()->getAllSitesId());
     });
     if ($siteIdsCount > 0) {
         // if there is a already a website, skip this step and trackingCode step
         $this->redirectToNextStep('trackingCode');
     }
     $view = new View('@Installation/firstWebsiteSetup', $this->getInstallationSteps(), __FUNCTION__);
     $form = new FormFirstWebsiteSetup();
     if ($form->validate()) {
         $name = Common::sanitizeInputValue($form->getSubmitValue('siteName'));
         $url = Common::unsanitizeInputValue($form->getSubmitValue('url'));
         $ecommerce = (int) $form->getSubmitValue('ecommerce');
         try {
             $result = Access::doAsSuperUser(function () use($name, $url, $ecommerce) {
                 return APISitesManager::getInstance()->addSite($name, $url, $ecommerce);
             });
             $params = array('site_idSite' => $result, 'site_name' => urlencode($name));
             $this->addTrustedHosts($url);
             $this->redirectToNextStep(__FUNCTION__, $params);
         } catch (Exception $e) {
             $view->errorMessage = $e->getMessage();
         }
     }
     // Display previous step success message, when current step form was not submitted yet
     if (count($form->getErrorMessages()) == 0) {
         $view->displayGeneralSetupSuccess = true;
     }
     $view->addForm($form);
     return $view->render();
 }
Esempio n. 8
0
 public function doUpdate(Updater $updater)
 {
     // added .eot whitelisted file for apache webserver
     ServerFilesGenerator::deleteHtAccessFiles();
     ServerFilesGenerator::createHtAccessFiles();
 }
Esempio n. 9
0
 public function doUpdate(Updater $updater)
 {
     ServerFilesGenerator::createFilesForSecurity();
 }