Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-224

[ONGOING] Code Cleanup in 5.2.x branch

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.2-B1
    • Component/s: Optimization
    • Labels:
    • Additional information:
      Hide

      [B]Users:[/B]

      #1031: User management internals refactoring
      #964: Improvements to user Login field
      #778: Improvements to Create User & Admin form in Admin
      #948: Change in "Forgot Password" logic

      [B]Data Validation:[/B]

      #270: "Form Configuration" for Add/Edit in Admin Console
      #271: Redesign "Data Validation" Engine
      https://groups.google.com/forum/#!topic/in-portal-dev/cfhRH6VUxaE/discussion

      Show
      [B] Users: [/B] #1031: User management internals refactoring #964: Improvements to user Login field #778: Improvements to Create User & Admin form in Admin #948: Change in "Forgot Password" logic [B] Data Validation: [/B] #270: "Form Configuration" for Add/Edit in Admin Console #271: Redesign "Data Validation" Engine https://groups.google.com/forum/#!topic/in-portal-dev/cfhRH6VUxaE/discussion
    • Change Log Group:
      Changed
    • Change Log Message:
      Massive code cleanup.
    • Story Points:
      3
    • External issue ID:
      268
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

    • BC Break Details:
      Hide

      Reborn classes:

      • "kModRewriteHelper" as "kRewriteUrlProcessor"

      Reborn methods:

      • "kCSVHelper::ValidateFileName" as "FileHelper::FileHelper"
      • "AdminTagProcessor::chopchop" as "BackupHelper::getBackupFiles" (new class)
      • "AdminTagProcessor::getDirList" as "BackupHelper::getBackupFiles"
      • "AdminEventsHandler::GetTableCreate" as "BackupHelper::_getCreateTableSql"
      • "AdminEventsHandler::get_backup_file" as "BackupHelper::getBackupFile"
      • "AdminEventsHandler::insert_data" as "BackupHelper::_getInsertIntoSql"
      • "AdminEventsHandler::performBackup" as "BackupHelper::performBackup"
      • "AdminEventsHandler::performRestore" as "BackupHelper::performRestore"
      • "AdminEventsHandler::replaceRestoredFiles" as "BackupHelper::replaceRestoredFiles"
      • "AdminEventsHandler::runSQLText" as "BackupHelper::runSQLText"
      • "AdminEventsHandler::runSchemaText" as "BackupHelper::runSchemaText"
      • "LanguagesItem::isEmptyUrl" as "kHTTPQuery::isEmptyUrl"

      Renamed methods:

      • "fckFCKHelper::GetXmlString" into "fckFCKHelper::_buildFileXml"
      • "CustomFieldsEventHandler::_getHiddenFiels" into "CustomFieldsEventHandler::_getHiddenFields" (fixed typo in name)

      Deleted methods:

      • "kCurlHelper::SetHeader"
      • "fckFCKHelper::getBaseFolder"
      • "kMultiLanguageHelper::getLanguageCount" (use "kMultiLanguageHelper::getLanguages" instead)
      • "AdminTagProcessor::SetConst" ("adm:SetConst" tag)
      • "AdminEventsHandler::getMoment"
      Show
      Reborn classes: "kModRewriteHelper" as "kRewriteUrlProcessor" Reborn methods: "kCSVHelper::ValidateFileName" as "FileHelper::FileHelper" "AdminTagProcessor::chopchop" as "BackupHelper::getBackupFiles" (new class) "AdminTagProcessor::getDirList" as "BackupHelper::getBackupFiles" "AdminEventsHandler::GetTableCreate" as "BackupHelper::_getCreateTableSql" "AdminEventsHandler::get_backup_file" as "BackupHelper::getBackupFile" "AdminEventsHandler::insert_data" as "BackupHelper::_getInsertIntoSql" "AdminEventsHandler::performBackup" as "BackupHelper::performBackup" "AdminEventsHandler::performRestore" as "BackupHelper::performRestore" "AdminEventsHandler::replaceRestoredFiles" as "BackupHelper::replaceRestoredFiles" "AdminEventsHandler::runSQLText" as "BackupHelper::runSQLText" "AdminEventsHandler::runSchemaText" as "BackupHelper::runSchemaText" "LanguagesItem::isEmptyUrl" as "kHTTPQuery::isEmptyUrl" Renamed methods: "fckFCKHelper::GetXmlString" into "fckFCKHelper::_buildFileXml" "CustomFieldsEventHandler::_getHiddenFiels" into "CustomFieldsEventHandler::_getHiddenFields" (fixed typo in name) Deleted methods: "kCurlHelper::SetHeader" "fckFCKHelper::getBaseFolder" "kMultiLanguageHelper::getLanguageCount" (use "kMultiLanguageHelper::getLanguages" instead) "AdminTagProcessor::SetConst" ("adm:SetConst" tag) "AdminEventsHandler::getMoment"

      Description

      This an ongoing task for Code cleanup in the whole system in 5.2.x branch.

      ---------------
      1. kModRewriteHelper and kUrlManager both works with urls and get some data from kApplication class too. Need to unify url build/parse process (maybe by creating kiUrlProcessor interface, that will be implemented in PlainUrlProcessor and RewriteUrlProcessor classes).

      2. Temp Handler class optimization:

      • implement class using Collection pattern (like tests are collected in phpUnit) and create Clone, Delete, etc. methods for the class.
      • this way operations will be single-item based, not table-based as right now.
      • This of course will result separate sqls for subitem quering based on individual parent, but that's small price to pay to have correctly organized class hierarchy

      3. INP-999 - Email event usage refactoring (part 1)

      • create kEmail class with following public methods:
        • findEvent($name, $type)
        • setParams($params)
        • send()
      • make $this->sender refer to kEmailSendingHelper class instance for easy access across all methods
      • move existing code from EmailEventsEventHandler into new kEmail class
      • replace OnEmailEvent event sending with new kEmail class usage

      4. Email event refactoring (part 2)

      • replace tons of "switch by RecipientType (to, cc, bcc) field" into polymorphism

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                dmitry Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: