Exemple #1
0
 /**
  * says if the ini content has been modified.
  *
  * @return bool
  *
  * @since 1.2
  */
 public function isModified()
 {
     return $this->master->isModified() || $this->overrider->isModified();
 }
Exemple #2
0
 /**
  * initialize the installation
  *
  * it reads configurations files of all entry points, and prepare object for
  * each module, needed to install/upgrade modules.
  * @param ReporterInterface $reporter  object which is responsible to process messages (display, storage or other..)
  * @param string $lang  the language code for messages
  */
 function __construct(ReporterInterface $reporter, $lang = '')
 {
     $this->reporter = $reporter;
     $this->messages = new Checker\Messages($lang);
     $this->mainConfig = new \Jelix\IniFile\IniModifier(App::mainConfigFile());
     $localConfig = App::configPath('localconfig.ini.php');
     if (!file_exists($localConfig)) {
         $localConfigDist = App::configPath('localconfig.ini.php.dist');
         if (file_exists($localConfigDist)) {
             copy($localConfigDist, $localConfig);
         } else {
             file_put_contents($localConfig, ';<' . '?php die(\'\');?' . '>');
         }
     }
     $this->localConfig = new \Jelix\IniFile\MultiIniModifier($this->mainConfig, $localConfig);
     $this->installerIni = $this->getInstallerIni();
     $appInfos = new \Jelix\Core\Infos\AppInfos();
     $this->readEntryPointsData($appInfos);
     $this->installerIni->save();
     // be sure temp path is ready
     \jFile::createDir(App::tempPath(), intval($this->mainConfig->getValue('chmodDirValue'), 8));
 }