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

content.ini - allow class_identifier to set VersionHistoryClass

    XMLWordPrintable

Details

    Description

      If you want to set a special versionHistoryLimit for a class you have to know its contentclass_id.
      It would be much easear if you can use the content_class_identifier.
      So it works on all systems development and live systems e.g. after you create lokal a new class and import in on live ( same class_identifier but different class_ids )

      I think it is easy to implement and would be a nice enhancement.

      current ini style:

      # content.ini
      [VersionManagement]
      DefaultVersionHistoryLimit=10
      VersionHistoryClass[1]=5
      DeleteDrafts=disabled
      

      enhanced ini style:

      # content.ini
      [VersionManagement]
      VersionHistoryClass[my_class]=100
      

      ezcontentobject.php function createNewVersion()

      function createNewVersion( $copyFromVersion = false, $versionCheck = true, $languageCode = false, $copyFromLanguageCode = false, $status = eZContentObjectVersion::STATUS_DRAFT )
          {
            ...
                  $contentINI = eZINI::instance( 'content.ini' );
                  $versionlimit = $contentINI->variable( 'VersionManagement', 'DefaultVersionHistoryLimit' );
                  $limitList = $contentINI->variable( 'VersionManagement', 'VersionHistoryClass' );
                  $classID = $this->attribute( 'contentclass_id' );
                  foreach ( array_keys ( $limitList ) as $key )
                  {
                      if ( $classID == $key )
                      {
                          $versionlimit = $limitList[$key];
                      }
                  }
      ...
      

      Attachments

        Activity

          People

            andre1 andre1
            4d91e976-d41f-487b-ae85-f7216bd06dac@accounts.ibexa.co Felix Woldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: