Edit File: DAttr.php
<?php class DAttr extends DAttrBase { // 0: no restriction; 1: LSWS ENTERPRISE; 2: LSWS 2CPU +; // 3: LSLB 2CPU +; 4: X-CPU public $_version = 0; public $_feature = 0; // feature bit public function blockedVersion() { if ($this->_feature == 0 && $this->_version == 0) { return false; // no restriction } // feature either cache or litemage if ($this->_feature != 0) { $features = $_SERVER['LS_FEATURES']; if ( ($this->_feature & $features) != 0) { return false; // feature enabled } elseif ($this->_version == 0) { return true; } } if ($this->_version == 1) { // LSWS ENTERPRISE; $edition = strtoupper($_SERVER['LSWS_EDITION']); return ( strpos($edition, "ENTERPRISE" ) === false ); } $proc = $_SERVER['LSWS_CHILDREN']{0}; if ( !$proc) { $proc = 1; } if ($this->_version == 2) { // LSWS 2CPU + return ($proc < 2); } if ($this->_version == 4) {// XCPU, unlimited is 9:n (n is actual used) return ($proc != '9'); } return true; // not supported } public function dup($key, $label, $helpkey) { $d = parent::dup($key, $label, $helpkey); $d->_version = $this->_version; $d->_feature = $this->_feature; return $d; } public function bypassSavePost() { return ($this->_FDE[2] == 'N' || $this->blockedVersion()); } }