CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12536] Module CMSContentManager 1.1.9 corrections files

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Mon Apr 18 22:11:28 -0400 2022

Assigned To:
Version: None
CMSMS Version: 2.2.16
Severity: Minor
Resolution: None
State: Open
Summary:
Module CMSContentManager 1.1.9 corrections files
Detailed Description:
modules/CMSContentManager/lib/class.ContentListBuilder.php

------------------------------------------------------------------
L 108 wrong reference $limit NOT $offset in function set_limit()

public function set_limit(int $limit)
{
   $this->_limit = max(1,$offset);
}

#---correction

public function set_limit(int $limit)
{
   $this->_limit = max(1,$limit)
}

---------------



---

L649 : getParent() deprecated name function : since cmsms 2.0 get_parent()

$node = $node->getParent();

/* --- replace by (minuscules)---- */
$node = $node->get_parent();

############################################################################
modules/CMSContentManager/action.admin_editcontent.php

L240 wrong syntax CmsContentException NOT ContentException

... but if corrected : L240 to 247 is same code as L232 to 239 ! 

#---correction: remove lines 240-247

note : L218 to 231 is quite identical (maybe L232 to 239 could be removed
too...)

############################################################################
modules/CMSContentManager/action.admin_ordercontent.php

L 58 wrong "array" syntax in function ordercontent_get_node_rec

 if( $content ) {
                $rec = aray();
                $rec['id'] = (int)$str;
            }

#-- correction

 if( $content ) {
                $rec = array();
                $rec['id'] = (int)$str;
            }


History

Comments
avatar
Date: 2022-04-20 18:46
Posted By: Philippe Thomas (filto)

  for php 7.1.0 compatibility
in my post :  replace is_countable by is_array 

as  Fernando Morgado said in [#12523] :

 "is_countable"e is not a solution as CMSMS TEAM aim to keep the PHP
compatible range as wide as possible.
      
avatar
Date: 2022-04-20 21:50
Posted By: Philippe Thomas (filto)

remove corrections  with is_countable
      
Updates

Updated: 2022-04-20 21:50
description: modules/CMSContentManager/lib/class.ContentListBuilder.php ------------------------------------------------------------------ L 108 wrong reference $limit NOT $offset in function set_limit() public function set_limit(int $limit) { $this->_limi => modules/CMSContentManager/lib/class.ContentListBuilder.php ------------------------------------------------------------------ L 108 wrong reference $limit NOT $offset in function set_limit() public function set_limit(int $limit) { $this->_limi

Updated: 2022-04-20 18:46
description: modules/CMSContentManager/lib/class.ContentListBuilder.php ------------------------------------------------------------------ L 108 wrong reference $limit NOT $offset in function set_limit() public function set_limit(int $limit) { $this->_limi => modules/CMSContentManager/lib/class.ContentListBuilder.php ------------------------------------------------------------------ L 108 wrong reference $limit NOT $offset in function set_limit() public function set_limit(int $limit) { $this->_limi
resolution_id: => 5