Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13574

Remove legacy class eZXMLInputType

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.1.0alpha1
    • 4.0.1
    • Documentation, Misc
    • None

    Description

      eZXMLInputType contains some weird legacy code, which should be partially removed:

              if ( $inputHandler == "standard" )
              {
                  if ( file_exists( "kernel/classes/datatypes/ezxmltext/ezxmlinputhandler.php" ) )
                  {
                      //include_once( "kernel/classes/datatypes/ezxmltext/ezxmlinputhandler.php" );
                      $impl = new eZXMLInputHandler();
                  }
              }
              elseif ( $inputHandler == "dhtml" )
              {
                  if ( $isMSIE
                       and ( file_exists( "extension/xmleditor/" . $inputHandler . "/ezdhtmlinputhandler.php" ) )
                       and ( $disableExtension == false ) )
                  {
                      include_once( "extension/xmleditor/" . $inputHandler . "/ezdhtmlinputhandler.php" );
                      $impl = new eZDHTMLInputHandler();
                  }
                  else
                  {
                      if ( file_exists( "kernel/classes/datatypes/ezxmltext/ezxmlinputhandler.php" ) )
                      {
                          //include_once( "kernel/classes/datatypes/ezxmltext/ezxmlinputhandler.php" );
                          $impl = new eZXMLInputHandler();
                      }
                  }
              }
              else
              {
                  eZDebug::writeError( "No XML editor available." );
              }
              return $impl;
      

      Hardcoded identifiers like "dhtml" and paths like extension/xmleditor/ in code like this is evil

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: