Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/12/2015 in all areas

  1. He'd need the full zip as the patch is from 3.6.0 -> 3.6.1
    2 points
  2. Hi all, Just sharing an approach that can be used in a custom module to check whether a service field value is unique or already in use (e.g. to enforce unique domain names). public function validateService($package, array $vars=null, $edit=false) { if ($package) $module_row_id = $package->module_row; else $module_row_id = isset($vars['module_row']) ? $vars['module_row'] : null; $row = $this->getModuleRow($module_row_id); //get the service id using a known and guaranteed unique field. this is needed to perform a unique validation of service fields without having the same service that may already have the field to cause validation to fail (e.g. when activating a pending service). $service_id = $this->getServiceIDUsingUniqueServiceField('myUniqueServiceUID', $params['myUniqueServiceUID']); $rules = array( 'domain' => array( 'unique' => array( 'final' => true, 'rule' => array(array($this, "checkUniqueDomain"), $service_id), 'negate' => true, 'message' => Language::_("ModuleName.!error.domain_valid.unique", true) ) ) ); $this->Input->setRules($rules); return $this->Input->validates($params); } // check any service field value exists private function checkServiceFieldValueExists($key, $value, $service_id = null) { Loader::loadComponents($this, array("Record")); $exists = false; if (is_null($service_id)) { $service_id = -1; } $this->Record->select() ->from("service_fields") ->where("service_fields.key", "=", $key) ->where("service_fields.value", "=", $value) ->where("service_fields.service_id", "!=", $service_id); if($this->Record->numResults() > 0) { $exists = true; } $this->Record->reset(); return $exists; } // check domain is unique public function checkUniqueDomain($value, $service_id = null) { return $this->checkServiceFieldValueExists('domain', $value, $service_id); }
    1 point
  3. You can download it from Github at https://github.com/CyanDarkInc/cPanel-Extended according to the OP. The files should be uploaded to /components/modules/cpanelextended/ and then you should be able to see and install it under Settings > Company > Modules > Available.
    1 point
  4. After uploading over all the files run /admin/upgrade in your browser to update the database. You may also wish to ensure that your license is covered by support & updates. If you purchased it over a year ago then you'll need a support & updates plan. Unless it's a monthly license, then you're good to go.
    1 point
  5. Download Patch from Here You have full Upgrade tutorial here https://docs.blesta.com/display/user/Upgrading+Blesta#UpgradingBlesta-Patchinganexistinginstall In short you have to download 3.6.1 patch and upload/overwrite your files ,than after upload is finished point your broswer to url of your blesta admin area + /upgrade ...like this http://yoururl.tld/blesta_dir/admin/upgrade
    1 point
  6. You would set up the term as 1 month, for the cheapest amount (probably the longest contract term). Then, create a config option that adds $x/mo for say month to month contract, $x-y/mo for semi-annual, and $0 for annual, for example. Blesta will not track contract length, but if you are handling cancellations then you can assess whatever penalty is necessary for early cancellations. We discussed that internally, though looking at the task I'm not sure if it is mentioned. I've commented on the task for clarification.
    1 point
×
×
  • Create New...