Page MenuHomeIn-Portal Phabricator

INP-1932 - Unify code for converting absolute into relative paths
Needs ReviewPublic

Authored by alex on Wed, Dec 17, 3:01 AM.

Details

Reviewers
erik
Test Plan

Method list

  1. \MinifyHelper::CompressScriptTag - login to admin console
  2. \NParserCompiler::FindTemplateFiles - recompile all templates from the System Tools section
  3. \kUnitConfigReader::findConfigFiles - disable a module from Admin Console
  4. \AdminTagProcessor::PrintCompileErrors - recompile all templates from the System Tools section, when In-Link module is disabled, but In-Commerce module is enabled
  5. \SystemLogTagProcessor::Filename - the System Log grid in Admin Console with at least 1 record shown
  6. \NParser::RunMainPage - with "SystemTagCache" system setting enabled + "Enable Caching for this Section" enabled on section/category leevl + visit Front-End page
  7. \TemplateHelper::_getTemplateFile - in Design Mode in the Admin Console click on the orange "Edit Block" button
  8. \kUploadHelper::handle - try uploading a file on the poll editing page in the Admin Console
  9. \ImageHelper::ResizeImage - change "thumb_format" of poll's "Image" field to "resize:200x200;default:core/admin_templates/img/ajax_iframe_progress.gif" and try uploading a large (>200 by width/height) file on the poll editing page in the Admin Console
  10. \kLogger::toString, \kLogger::printBacktrace - trigger a fatal error in "run_event.php" after the ...->HandleEvent line -> call the "run_event.php" from CLI
  11. \kTagProcessor::FormCacheKey - with "SystemTagCache" system setting enabled + add cache_timeout="3600" to a "st_ContentBlock" tag call on a Front-End template and visit it

Test Plan

  1. run the unit tests to test kUtil::convertPathToRelative and FileHelper::makeRelative methods
  2. place breakpoints on the line, where \kUtil::convertPathToRelative metho is called in each of the above-listed methods
  3. enable xDebug in the Web Browser
  4. follow instructions for invoking each of the methods
  5. confirm, that each method is executed and kUtil::convertPathToRelative method really converts given abolute path into relative one

Diff Detail

Repository
rINP In-Portal
Branch
branches/5.2.x
Lint
Lint ErrorsExcuse: Unrelaed.
SeverityLocationCodeMessage
Errorcore/units/helpers/template_helper.php:439PHPCS.E.CodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBraceCodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBrace
Unit
Unit Tests OK
Build Status
Buildable 11172
Build 3872: arc lint + arc unit

Event Timeline

alex created this revision.Wed, Dec 17, 3:01 AM
alex requested review of this revision.Wed, Dec 17, 3:01 AM
alex updated this revision to Diff 1422.Wed, Dec 17, 4:37 AM

Reverted change from array_merge into += during template parser mass-compilation error displaying.