82 $this->_sShopDir = $this->
getConfig()->getConfigParam(
'sShopDir' );
83 $this->_oOutput =
oxNew (
"oxDiagnosticsOutput" );
84 $this->_oRenderer =
oxNew (
"oxSmartyRenderer" );
100 return "diagnostics_form.tpl";
110 $oDiagnostics =
oxNew(
'oxDiagnostics' );
111 $aFilePathList = $oDiagnostics->getFileCheckerPathList();
112 $aFileExtensionList = $oDiagnostics->getFileCheckerExtensionList();
114 $oFileCollector =
oxNew (
"oxFileCollector" );
115 $oFileCollector->setBaseDirectory( $this->_sShopDir );
117 foreach ( $aFilePathList as $sPath ) {
118 if ( is_file( $this->_sShopDir . $sPath ) ) {
119 $oFileCollector->addFile( $sPath );
121 elseif ( is_dir( $this->_sShopDir . $sPath ) ) {
122 $oFileCollector->addDirectoryFiles( $sPath, $aFileExtensionList,
true );
126 return $oFileCollector->getFiles();
137 $oFileChecker =
oxNew (
"oxFileChecker" );
138 $oFileChecker->setBaseDirectory( $this->_sShopDir );
139 $oFileChecker->setVersion( $this->
getConfig()->getVersion() );
140 $oFileChecker->setEdition( $this->
getConfig()->getEdition() );
143 if ( !$oFileChecker->init() ) {
144 $this->_blError =
true;
145 $this->_sErrorMessage = $oFileChecker->getErrorMessage();
149 $oFileCheckerResult =
oxNew(
"oxFileCheckerResult" );
151 $blListAllFiles = ( $this->
getParam(
'listAllFiles' ) ==
'listAllFiles' );
152 $oFileCheckerResult->setListAllFiles( $blListAllFiles );
154 foreach ( $aFileList as $sFile ) {
155 $aCheckResult = $oFileChecker->checkFile( $sFile );
156 $oFileCheckerResult->addResult( $aCheckResult );
159 return $oFileCheckerResult;
171 "sVersion" => $this->
getConfig()->getVersion(),
172 "sEdition" => $this->
getConfig()->getEdition(),
174 "aResultSummary" => $oFileCheckerResult->getResultSummary(),
175 "aResultOutput" => $oFileCheckerResult->getResult(),
178 return $this->_oRenderer->renderTemplate(
"version_checker_result.tpl", $aViewData );
191 $sReport .= $this->_oRenderer->renderTemplate(
"diagnostics_main.tpl", $aDiagnosticsResult );
193 if ( $this->
getParam(
'oxdiag_frm_chkvers' ) )
205 $this->_oOutput->storeResult( $sReport );
207 $sResult = $this->_oOutput->readResultFile();
208 $this->_aViewData[
'sResult'] = $sResult;
214 $aViewData = array();
215 $oDiagnostics =
oxNew(
'oxDiagnostics' );
225 if ( $this->
getParam(
'runAnalysis' ) ) {
226 $aViewData[
'runAnalysis'] =
true;
227 $aViewData[
'aShopDetails'] = $oDiagnostics->getShopDetails();
233 if ( $this->
getParam(
'oxdiag_frm_modules' ) ) {
235 $sModulesDir = $this->
getConfig()->getModulesDir();
236 $oModuleList =
oxNew(
'oxModuleList');
237 $aModules = $oModuleList->getModulesFromDir( $sModulesDir);
239 $aViewData[
'oxdiag_frm_modules'] =
true;
240 $aViewData[
'mylist'] = $aModules;
246 if ( $this->
getParam(
'oxdiag_frm_health' ) ) {
249 $aViewData[
'oxdiag_frm_health'] =
true;
250 $aViewData[
'aInfo'] = $oSysReq->getSystemInfo();
251 $aViewData[
'aCollations'] = $oSysReq->checkCollation();
258 if ( $this->
getParam(
'oxdiag_frm_php' ) ) {
259 $aViewData[
'oxdiag_frm_php'] =
true;
260 $aViewData[
'aPhpConfigparams'] = $oDiagnostics->getPhpSelection();
261 $aViewData[
'sPhpDecoder'] = $oDiagnostics->getPhpDecoder();
267 if ( $this->
getParam(
'oxdiag_frm_server' ) ) {
268 $aViewData[
'isExecAllowed'] = $oDiagnostics->isExecAllowed();
269 $aViewData[
'oxdiag_frm_server'] =
true;
270 $aViewData[
'aServerInfo'] = $oDiagnostics->getServerInfo();
273 if ( $this->
getParam(
'oxdiag_frm_chkvers' ) ) {
274 $aViewData[
'oxdiag_frm_chkvers'] =
true;
287 $this->_oOutput->downloadResultFile();
299 "de" =>
"http://www.oxid-esales.com/de/support-services/supportanfrage.html",
300 "en" =>
"http://www.oxid-esales.com/en/support-services/support-request.html"
305 $iLangId = $oLang->getTplLanguage();
308 if (!array_key_exists( $sLangCode, $aLinks))
311 return $aLinks[$sLangCode];
322 return $this->
getConfig()->getRequestParameter( $sParam );