diff --git a/docs/Documentation/support/Hilfe-und-Support.html b/docs/Documentation/support/Hilfe-und-Support.html
index da5a5fa..496bbec 100644
--- a/docs/Documentation/support/Hilfe-und-Support.html
+++ b/docs/Documentation/support/Hilfe-und-Support.html
@@ -75,7 +75,7 @@
diff --git a/docs/Documentation/themes/d3/css/d3.css b/docs/Documentation/themes/d3/css/d3.css
index 3e9deb4..4df6d3d 100644
--- a/docs/Documentation/themes/d3/css/d3.css
+++ b/docs/Documentation/themes/d3/css/d3.css
@@ -3,7 +3,6 @@
}
.Brand{
- /*color: #336ed6;*/
color: #fff;
}
@@ -28,8 +27,9 @@ body,
color : #fff;
}
+.SearchResults .SearchResults__url a,
a{
- color: #407DC0;
+ color: #028fe8;
}
.s-content pre {
@@ -40,6 +40,11 @@ a{
color: #028fe8;
}
+.Navbar .svg-inline--fa.d3fa-color-blue, .Navbar .fa.fa-d3color-blue,
+.Brand .svg-inline--fa.d3fa-color-blue, .Brand .fa.fa-d3color-blue{
+ color: white;
+}
+
.HomepageFooter__links li{
float: left;
min-width: 70px;
@@ -55,9 +60,9 @@ blockquote.alert a {
}
blockquote.alert.alert-danger {
- color: #A94442;
+ color: #ce2c2c;
background-color: #f2dede;
- border-color: #ebccd1;
+ border-color: #ce2c2c;
}
@@ -66,9 +71,9 @@ blockquote.alert.alert-danger a {
}
blockquote.alert.alert-warning {
- color: #8a6d3b;
+ color: #e39c37;
background-color: #fcf8e3;
- border-color: #faebcc;
+ border-color: #e39c37;
}
blockquote.alert.alert-warning a {
@@ -78,7 +83,7 @@ blockquote.alert.alert-warning a {
blockquote.alert.alert-info {
color: #31708f;
background-color: #d9edf7;
- border-color: #bce8f1;
+ border-color: #31708f;
}
blockquote.alert.alert-info a {
@@ -131,8 +136,10 @@ aside .Links a {
}
.Navbar,
-.Brand {
- background-color: #4b4d54;
+.Brand,
+.Links,
+.Columns__left.Collapsible {
+ background-color: #028fe8;
}
.Navbar {
@@ -148,4 +155,41 @@ span.navi_element {
border-radius: 5px 5px 0 0;
padding: 0 5px;
background-color: #f7f7f7;
+}
+
+.Nav {
+ background-color: #f7f7f7;
+}
+
+.Links a{
+ color: #f7f7f7;
+}
+
+.Links a:hover {
+ text-decoration: underline;
+}
+
+.Links hr {
+ border-color: #028fe8;
+}
+
+.HomepageFooter,
+.Search {
+ background-color: #028fe8;
+}
+
+.Search {
+ margin: 10px;
+}
+
+li {
+ margin-bottom: 7px;
+}
+
+.Search__field {
+ border-radius: 4px;
+}
+
+.HomepageButtons{
+ padding-right: 267px;
}
\ No newline at end of file
diff --git a/docs/Precheck/d3precheck.php b/docs/Precheck/d3precheck.php
index 4286bd0..b8a77e2 100644
--- a/docs/Precheck/d3precheck.php
+++ b/docs/Precheck/d3precheck.php
@@ -39,137 +39,143 @@
class requConfig
{
- public $sModName = 'D³ Geburtstagsgutscheine';
+ public $sModName = 'D³ Geburtstagsgutscheine';
public $sModId = 'd3birthdayvoucher';
- public $sModVersion = '3.1.0.4';
+ public $sModVersion = '4.0.0.1';
/********************** check configuration section ************************/
public $aCheck = array(
// kleinste erlaubte PHP-Version
'hasMinPhpVersion' => array(
- 'blExec' => 0,
- 'aParams' => array(
- 'version' => '5.2.0'
- )
- ),
+ 'blExec' => 0,
+ 'aParams' => array(
+ 'version' => '5.6.0'
+ )
+ ),
// größte erlaubte PHP-Version
'hasMaxPhpVersion' => array(
- 'blExec' => 0,
- 'aParams' => array(
- 'version' => '5.4.200'
- )
- ),
+ 'blExec' => 0,
+ 'aParams' => array(
+ 'version' => '5.6.200'
+ )
+ ),
// PHP-Version zwischen 'from' und 'to'
'hasFromToPhpVersion' => array(
- 'blExec' => 1,
- 'aParams' => array(
- 'from' => '5.2.0',
- 'to' => '5.4.200',
- )
- ),
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'from' => '5.6.0',
+ 'to' => '7.0.900',
+ )
+ ),
// benötigt Zend Optimizer (PHP 5.2) bzw. Zend Guard Loader (> PHP 5.2)
'hasZendLoaderOptimizer' => array(
- 'blExec' => 1,
+ 'blExec' => 0,
),
// benötigt IonCubeLoader
'hasIonCubeLoader' => array(
- 'blExec' => 0,
+ 'blExec' => 1,
),
// benötigt PHP-Extension (kaskadierbar (siehe "Desc1"))
'hasExtension' => array(
array(
- 'blExec' => 1,
- 'aParams' => array(
- 'type' => 'curl',
- ),
- ),
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'type' => 'curl',
+ ),
+ ),
array(
- 'blExec' => 1,
- 'aParams' => array(
- 'type' => 'soap'
- ),
- ),
+ 'blExec' => 0,
+ 'aParams' => array(
+ 'type' => 'soap'
+ ),
+ ),
),
// minimal benötigte Shopversion (editionsgetrennt), wird (sofern möglich) Remote aktualisiert
'hasMinShopVersion' => array(
- 'blExec' => 1,
- 'aParams' => array(
- 'PE' => '4.7.0',
- 'CE' => '4.7.0',
- 'EE' => '5.0.0'
- ),
- ),
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'PE' => '6.0.0',
+ 'CE' => '6.0.0',
+ 'EE' => '6.0.0'
+ ),
+ ),
// maximal verwendbare Shopversion (editionsgetrennt), wird (sofern möglich) Remote aktualisiert
'hasMaxShopVersion' => array(
- 'blExec' => 1,
- 'aParams' => array(
- 'PE' => '4.8.4',
- 'CE' => '4.8.4',
- 'EE' => '5.1.4'
- ),
- ),
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'PE' => '6.0.0',
+ 'CE' => '6.0.0',
+ 'EE' => '6.0.0'
+ ),
+ ),
// verfügbar für diese Shopeditionen, wird (sofern möglich) Remote aktualisiert
'isShopEdition' => array(
- 'blExec' => 1,
- 'aParams' => array(
- array(
- 'PE',
- 'EE',
- 'CE',
- ),
- ),
- ),
+ 'blExec' => 1,
+ 'aParams' => array(
+ array(
+ 'PE',
+ 'EE',
+ 'CE',
+ ),
+ ),
+ ),
// benötigt Modul-Connector
- 'hasModCfg' => array('blExec' => 1),
+ 'hasModCfg' => array(
+ 'blExec' => 1
+ ),
// benötigt mindestens diese Erweiterungen / Version lt. d3_cfg_mod (kaskadierbar (siehe "Desc1"))
'hasMinModCfgVersion' => array(
- array(
- 'blExec' => 1,
- 'aParams' => array(
- 'id' => 'd3modcfg_lib',
- 'name' => 'Modul-Connector',
- 'version' => '3.10.0.0',
- ),
- ),
- array(
- 'blExec' => 1,
- 'aParams' => array(
- 'id' => 'd3install_lib',
- 'name' => 'Installationsautomatik',
- 'version' => '2.6.0.0',
- ),
- ),
+ array(
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'id' => 'd3modcfg_lib',
+ 'name' => 'Modul-Connector',
+ 'version' => '5.1.0.0',
+ ),
+ ),
),
// verwendbar bis zu diesen Erweiterungen / Version lt. d3_cfg_mod (kaskadierbar (siehe "Desc1"))
'hasMaxModCfgVersion' => array(
- array(
- 'blExec' => 0,
- 'aParams' => array(
- 'id' => 'd3modcfg_lib',
- 'name' => 'Modul-Connector',
- 'version' => '3.10.0.0',
- ),
+ array(
+ 'blExec' => 0,
+ 'aParams' => array(
+ 'id' => 'd3modcfg_lib',
+ 'name' => 'Modul-Connector',
+ 'version' => '5.1.0.0',
+ ),
+ ),
),
+
+ // benötigt neuen Lizenzschlüssel
+ 'requireNewLicence' => array(
+ array(
+ 'blExec' => 1,
+ 'aParams' => array(
+ 'checkVersion' => true, // soll Versionsnummer des installierten Moduls gegengeprüft werden?
+ 'remainingDigits' => 2, // zu prüfende Stellen für neue Lizenz
+ ),
+ ),
),
);
}
/********* don't change content from here **********************/
+
date_default_timezone_set('Europe/Berlin');
/**
@@ -177,7 +183,7 @@ date_default_timezone_set('Europe/Berlin');
*/
class requCheck
{
- public $sVersion = '4.1';
+ public $sVersion = '4.10.2';
protected $_db = false;
@@ -197,6 +203,8 @@ class requCheck
protected $_sInFolderFileName = 'd3precheckinfolder.php';
+ public $sVersionTag = '@@version@@';
+
/********************** functional section ************************/
public $blGlobalResult = true;
@@ -280,20 +288,42 @@ class requCheck
$aIgnoreDirItems = array('.', '..');
$aCheckScripts = array();
- /** @var SplFileInfo $oFileInfo */
- foreach (new RecursiveDirectoryIterator($sFolder) AS $oFileInfo) {
- if (!in_array($oFileInfo->getFileName(), $aIgnoreDirItems) && $oFileInfo->isDir()) {
- $aCheckScripts = array_merge($aCheckScripts, $this->_walkThroughDirs($oFileInfo->getRealPath()));
- } elseif ($oFileInfo->isFile()) {
- if (strtolower($oFileInfo->getFilename()) == $this->_sInFolderFileName) {
- $aCheckScripts[] = str_replace('\\', '/', $oFileInfo->getRealPath());
+ try {
+ /** @var SplFileInfo $oFileInfo */
+ $oIterator = new RecursiveDirectoryIterator($sFolder);
+
+ foreach ($oIterator as $oFileInfo) {
+ if (in_array($oFileInfo->getFileName(), $aIgnoreDirItems)) {
+ continue;
+ }
+ if ($oFileInfo->isDir()) {
+ $aCheckScripts = array_merge($aCheckScripts, $this->_walkThroughDirs($oFileInfo->getRealPath()));
+ } elseif ($oFileInfo->isFile()) {
+ if (strtolower($oFileInfo->getFilename()) == $this->_sInFolderFileName) {
+ $aCheckScripts[] = str_replace('\\', '/', $oFileInfo->getRealPath());
+ }
}
}
+ } catch (UnexpectedValueException $oEx) {
+ sprintf($this->oLayout->translate('unableExecuteDirectoryIterator'), $oEx->getMessage());
+ $this->addMessage(
+ sprintf($this->oLayout->translate('unableExecuteDirectoryIterator'), $oEx->getMessage())
+ );
}
return $aCheckScripts;
}
+ public function addMessage($sMessage)
+ {
+ $this->aMessages[md5($sMessage)] = $sMessage;
+ }
+
+ public function getMessages()
+ {
+ return $this->aMessages;
+ }
+
/**
* @param $aScriptList
* @param $sMethodName
@@ -312,12 +342,87 @@ class requCheck
$aArguments
);
- $aReturn[$this->getBasePath($sScriptPath)] = unserialize(file_get_contents($sUrl));
+ $sVersionUrl = $this->_getFolderCheckUrl(
+ $sScriptPath,
+ 'getVersion',
+ array()
+ );
+
+ $sContent = serialize(null);
+ $sVersion = serialize(null);
+
+ if ($this->_hasCurl()) {
+ $sContent = $this->_getContentByCurl($sUrl);
+ $sVersion = $this->_getContentByCurl($sVersionUrl);
+ } elseif ($this->_hasAllowUrlFopen()) {
+ $sContent = file_get_contents($sUrl);
+ $sVersion = file_get_contents($sVersionUrl);
+ }
+
+ $sBasePath = $this->getBasePath($sScriptPath);
+ $aReturn[$sBasePath] = unserialize($sContent);
+ $aReturn[$this->sVersionTag][$sBasePath] = unserialize($sVersion);
}
return $aReturn;
}
+ /**
+ * @return bool
+ */
+ protected function _hasCurl()
+ {
+ if (extension_loaded('curl') && function_exists('curl_init')) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return bool
+ */
+ protected function _hasAllowUrlFopen()
+ {
+ if (ini_get('allow_url_fopen')) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param $sUrl
+ *
+ * @return bool|mixed
+ */
+ protected function _getContentByCurl($sUrl)
+ {
+ $iTimeOut = 5;
+ $ch = curl_init();
+ $sCurl_URL = preg_replace('@^((http|https)://)@', '', $sUrl);
+
+ curl_setopt($ch, CURLOPT_URL, $sCurl_URL);
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $iTimeOut);
+ curl_setopt($ch, CURLOPT_TIMEOUT, $iTimeOut);
+ curl_setopt($ch, CURLOPT_POST, 0);
+ $sContent = curl_exec($ch);
+ curl_close($ch);
+
+ if (false == $sContent ||
+ strstr(strtolower($sContent), strtolower('Request Entity Too Large')) ||
+ strstr(strtolower($sContent), strtolower('not allow request data with POST requests'))
+ ) {
+ return false;
+ }
+
+ return $sContent;
+ }
+
/**
* @param $sScriptPath
* @param $sMethodName
@@ -364,15 +469,23 @@ class requCheck
}
/**
- * @param $aResult
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->sVersion;
+ }
+
+ /**
+ * @param $mResult
*
* @return bool
*/
- protected function _hasFalseInResult($aResult)
+ protected function _hasFalseInResult($mResult)
{
- if (is_array($aResult)) {
- foreach ($aResult as $blResult) {
- if (!$blResult) {
+ if (is_array($mResult)) {
+ foreach ($mResult as $blResult) {
+ if (false === $blResult) {
$this->blGlobalResult = false;
return true;
@@ -380,13 +493,66 @@ class requCheck
}
return false;
- } else {
- if (!$aResult) {
- $this->blGlobalResult = false;
+ }
+
+ if (false === $mResult) {
+ $this->blGlobalResult = false;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param $mResult
+ *
+ * @return bool
+ */
+ protected function _hasNullInResult($mResult)
+ {
+ if (is_array($mResult)) {
+ foreach ($mResult as $blResult) {
+ if ($blResult === null) {
+ $this->blGlobalResult = false;
+
+ return true;
+ }
}
- return !$aResult;
+ return false;
}
+
+ if ($mResult === null) {
+ $this->blGlobalResult = false;
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param $mResult
+ *
+ * @return bool
+ */
+ protected function _hasNoticeInResult($mResult)
+ {
+ if (is_array($mResult)) {
+ foreach ($mResult as $blResult) {
+ if ($blResult === 'notice') {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ if ($mResult === 'notice') {
+ return true;
+ }
+
+ return false;
}
/********************** conversion function section ************************/
@@ -421,8 +587,8 @@ class requCheck
if (!$this->_db) {
if (file_exists('config.inc.php')) {
require_once('config.inc.php');
- $this->_db = mysql_connect($this->dbHost, $this->dbUser, $this->dbPwd);
- mysql_select_db($this->dbName, $this->_db);
+ ini_set('error_reporting', E_ALL^E_NOTICE);
+ $this->_db = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPwd, $this->dbName);
}
}
@@ -441,17 +607,24 @@ class requCheck
return sprintf(
'%d%03d%03d%03d',
- intval($match[0] !== null ? $match[0] : $iUnsetPart),
- intval(
- $match[1] !== null ? $match[1] : $iUnsetPart
- ),
- intval($match[2] !== null ? $match[2] : $iUnsetPart),
- intval(
- $match[3] !== null ? $match[3] : $iUnsetPart
- )
+ $this->_getVersionDigit($match[0], $iUnsetPart),
+ $this->_getVersionDigit($match[1], $iUnsetPart),
+ $this->_getVersionDigit($match[2], $iUnsetPart),
+ $this->_getVersionDigit($match[3], $iUnsetPart)
);
}
+ /**
+ * @param $sMatch
+ * @param $iUnsetPart
+ *
+ * @return int
+ */
+ protected function _getVersionDigit($sMatch, $iUnsetPart)
+ {
+ return intval($sMatch !== null ? $sMatch : $iUnsetPart);
+ }
+
/********************** layout function section ************************/
public function deleteme()
@@ -503,22 +676,36 @@ class requCheck
{
$sGenCheckType = preg_replace("@(\_[0-9]$)@", "", $sCheckType);
$oTests = new requTests($this, $this->oConfig, $this->getDb(), $this->oRemote);
-
if (method_exists($oTests, $sGenCheckType)) {
- $aResult = $oTests->{$sGenCheckType}($aConfiguration);
- $sElementId = (md5($sGenCheckType . serialize($aConfiguration)));
-
- if ($this->_hasFalseInResult($aResult)) {
- $this->oLayout->getNoSuccessItem($aResult, $sElementId, $sCheckType, $aConfiguration);
- } else {
- $this->oLayout->getSuccessItem($aResult, $sElementId, $sCheckType, $aConfiguration);
- }
+ $this->_checkResult($oTests, $sGenCheckType, $sCheckType, $aConfiguration);
} else {
$this->oLayout->getUncheckableItem($sCheckType, $aConfiguration);
$this->blGlobalResult = false;
}
}
+ /**
+ * @param $oTests
+ * @param $sGenCheckType
+ * @param $sCheckType
+ * @param $aConfiguration
+ */
+ protected function _checkResult($oTests, $sGenCheckType, $sCheckType, $aConfiguration)
+ {
+ $mResult = $oTests->{$sGenCheckType}($aConfiguration);
+ $sElementId = (md5($sGenCheckType . serialize($aConfiguration)));
+
+ if ($this->_hasNoticeInResult($mResult)) {
+ $this->oLayout->getUnknownItem($mResult, $sElementId, $sCheckType, $aConfiguration);
+ } elseif ($this->_hasNullInResult($mResult)) {
+ $this->oLayout->getUnknownItem($mResult, $sElementId, $sCheckType, $aConfiguration);
+ } elseif ($this->_hasFalseInResult($mResult)) {
+ $this->oLayout->getNoSuccessItem($mResult, $sElementId, $sCheckType, $aConfiguration);
+ } else {
+ $this->oLayout->getSuccessItem($mResult, $sElementId, $sCheckType, $aConfiguration);
+ }
+ }
+
public function showinfo()
{
phpinfo();
@@ -557,23 +744,153 @@ class requLayout
$sTranslRequCheck "$sModName" $sModVersion
+
-
-
+
+
+
+
EOT;
echo "
" . $this->translate('RequCheck') . ' "' . $this->oConfig->sModName . ' ' . $sModVersion . '"
';
echo '
' . $this->translate('ExecNotice') . '
' . PHP_EOL;
@@ -587,6 +904,14 @@ EOT;
$sTranslShopPhpInfo = $this->translate('showPhpInfo');
$sTranslDependent = $this->translate('dependentoffurther');
+ if (count($this->oBase->getMessages())) {
+ echo '
';
+ foreach ($this->oBase->getMessages() as $sMessage) {
+ echo '- '.$sMessage.'
';
+ }
+ echo '
';
+ }
+
if ($this->oBase->blGlobalResult) {
echo '
' . $this->translate('globalSuccess') . '' .
$this->translate('deleteFile1') . $sScriptName . $this->translate('deleteFile2') . '
';
@@ -599,10 +924,15 @@ EOT;
$sTranslDependent
- $sTranslShopPhpInfo
+
+ $sTranslShopPhpInfo
+
-
+