Skip to content

Commit

Permalink
11.0.3: [Code Cleanup]
Browse files Browse the repository at this point in the history
  • Loading branch information
jstanden committed Jan 11, 2025
1 parent b22e895 commit a105b80
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# What is Cerb?

**Cerb** is a fully customizable, web-based platform for enterprise communication and process automation. The project has continuously evolved for 22+ years based on the feedback of thousands of teams around the world in almost every industry. It is used by everyone from solo founders to 1,000+ person teams managing millions of customer requests.
**Cerb** is a fully customizable, web-based platform for team email and workflow automation. The project has continuously evolved for over 23 years based on the feedback of thousands of teams around the world in almost every industry. It is used by everyone from solo founders to 1,000+ person teams managing millions of customer requests.

Cerb integrates with any API-based service. It can automate nearly any repetitive digital workflow with its specialized [KATA](https://cerb.ai/docs/kata/) language and browser-based coding tools. [Automations](https://cerb.ai/docs/automations/) add conditional actions to any event. [Interactions](https://cerb.ai/docs/interactions/) extend any toolbar for complex multistep workflows that require user input.

Expand Down
2 changes: 1 addition & 1 deletion api/Application.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static function processRequest(DevblocksHttpRequest $request) {
}
}

static function checkRequirements() {
static function checkRequirements() : array {
$errors = [];

// Privileges
Expand Down
2 changes: 1 addition & 1 deletion api/app/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function handleRequest(DevblocksHttpRequest $request) {
$errors = [];

/*
* This well-designed software is the result of over 22 years of R&D.
* This well-designed software is the result of over 23 years of R&D.
* We're sharing every resulting byte of that hard work with you.
* You're free to make changes for your own use, but we ask that you
* please respect our licensing and help support commercial open source.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function _render(string $prompt_key, Model_AutomationContinuation $conti
if(is_array($sheet_data) && array_key_exists('automation', $sheet_data)) {
$automation_uri = $sheet_data['automation']['uri'] ?? null;

if(!is_null($automation_uri) && false != ($callback = DAO_Automation::getByUri($automation_uri))) {
if(!is_null($automation_uri) && ($callback = DAO_Automation::getByUri($automation_uri))) {
if($callback->extension_id != AutomationTrigger_UiSheetData::ID)
return;

Expand Down
2 changes: 1 addition & 1 deletion features/cerberusweb.core/api/uri/profiles/automation.php
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ private function _profileAction_getExtensionConfig() {
if(!$extension_id)
return;

if(false == ($trigger_ext = Extension_AutomationTrigger::get($extension_id, true)))
if(!($trigger_ext = Extension_AutomationTrigger::get($extension_id, true)))
DevblocksPlatform::dieWithHttpError(null, 404);

/* @var $trigger_ext Extension_AutomationTrigger */
Expand Down
15 changes: 1 addition & 14 deletions features/cerberusweb.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7014,23 +7014,10 @@
<param key="uri" value="data_query_tester" />
</params>
</extension>

<extension point="cerberusweb.ui.page.section">
<id>core.page.setup.developers.data_query_builder</id>
<name>Data Query Builder</name>
<class>
<file>api/uri/config/data_query_builder.php</file>
<name>PageSection_SetupDevelopersDataQueryBuilder</name>
</class>
<params>
<param key="page_id" value="core.page.configuration" />
<param key="uri" value="data_query_builder" />
</params>
</extension>

<extension point="cerberusweb.ui.page.section">
<id>core.page.setup.developers.database_schema</id>
<name>Data Query Tester</name>
<name>Database Schema</name>
<class>
<file>api/uri/config/database_schema.php</file>
<name>PageSection_SetupDevelopersDatabaseSchema</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<script nonce="{DevblocksPlatform::getRequestNonce()}" type="text/javascript">
$(function() {
var $frm = $('#frmSetupSecurity');
let $frm = $('#frmSetupSecurity');
Devblocks.formDisableSubmit($frm);
Expand Down
2 changes: 1 addition & 1 deletion libs/devblocks/Devblocks.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,7 @@ static function getHttpHeaders() {
$headers = [];

foreach($_SERVER as $k => $v) {
if('HTTP_' == substr($k, 0, 5)) {
if(str_starts_with($k, 'HTTP_')) {
$headers[DevblocksPlatform::strLower(substr($k, 5))] = $v;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function activate(Model_Automation $automation, DevblocksDictionaryDelegate $dic
}

if(!($results = $data->executeQuery($query, $query_params, $error))) {
throw new Exception_DevblocksAutomationError($error);
throw new Exception_DevblocksAutomationError($error ?? 'An unexpected error occurred.');

} else {
if($output) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ function activate(Model_Automation $automation, DevblocksDictionaryDelegate $dic
throw new Exception_DevblocksAutomationError($error);
}

if (false == ($automation = DAO_Automation::getByUri($params['uri'], AutomationTrigger_AutomationFunction::ID))) {
if (!($automation = DAO_Automation::getByUri($params['uri'], AutomationTrigger_AutomationFunction::ID))) {
throw new Exception_DevblocksAutomationError(sprintf('Function (%s) must be an automation.function', $params['uri']));
}

$initial_state = [
'inputs' => $inputs,
];

if (false == ($automation_results = $automator->executeScript($automation, $initial_state, $error))) {
if (!($automation_results = $automator->executeScript($automation, $initial_state, $error))) {
throw new Exception_DevblocksAutomationError($error);
}

Expand Down
2 changes: 2 additions & 0 deletions libs/devblocks/api/services/data/record_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function getData($query, $chart_fields, &$error=null, array $options=[]) {
$record_type_exts = Extension_DevblocksContext::getAll(true);

foreach($record_type_exts as $record_type_ext) {
if(!$record_type_ext) continue;

if(null != ($chart_model['options'] ?? null)) {
$options = $record_type_ext->manifest->params['options'][0] ?? [];

Expand Down

0 comments on commit a105b80

Please sign in to comment.