Updated application to use bool and int instead of boolean and integer. Also added an order by to the getSubscriptionCounties function

This commit is contained in:
2026-09-05 09:39:26 -04:00
parent 55081a11cf
commit 6401534c90
19 changed files with 39 additions and 35 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ class Alerts extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -645,7 +645,7 @@ class Base {
$zip_code = filter_input(INPUT_POST, "zip_code", FILTER_SANITIZE_NUMBER_INT) ?: 0; $zip_code = filter_input(INPUT_POST, "zip_code", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$zip_code = (integer) substr((string) $zip_code, 0, 5); $zip_code = (int) substr((string) $zip_code, 0, 5);
$zipCodeDetail = null; $zipCodeDetail = null;
+1 -1
View File
@@ -308,7 +308,7 @@ class Cities extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+9 -5
View File
@@ -251,7 +251,8 @@ class Counties extends Base {
public function getCounties() { public function getCounties() {
$SQL = "select view_counties.* $SQL = "select view_counties.*
from view_counties"; from view_counties
order by view_counties.county_name";
return $this->getTable("counties", $SQL); return $this->getTable("counties", $SQL);
} }
@@ -264,7 +265,8 @@ class Counties extends Base {
$SQL = "select view_counties.* $SQL = "select view_counties.*
from view_counties from view_counties
where view_counties.county_area = '{$area}'"; where view_counties.county_area = '{$area}'
order by view_counties.county_name";
return $this->getTable("counties", $SQL); return $this->getTable("counties", $SQL);
} }
@@ -277,7 +279,8 @@ class Counties extends Base {
$SQL = "select view_counties.* $SQL = "select view_counties.*
from view_counties from view_counties
where view_counties.county_name = '{$county_name}'"; where view_counties.county_name = '{$county_name}'
order by view_counties.county_name";
return $this->getTable("counties", $SQL); return $this->getTable("counties", $SQL);
} }
@@ -311,7 +314,7 @@ class Counties extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
@@ -387,7 +390,8 @@ class Counties extends Base {
$SQL = "select view_subscriptioncounties.* $SQL = "select view_subscriptioncounties.*
from view_subscriptioncounties from view_subscriptioncounties
where view_subscriptioncounties.subscriptioncounty_subscription = '{$subscription_serial}'"; where view_subscriptioncounties.subscriptioncounty_subscription = '{$subscription_serial}'
order by view_subscriptioncounties.subscriptioncounties_county_name_verbose";
return $this->getTable("subscriptioncounties", $SQL); return $this->getTable("subscriptioncounties", $SQL);
} }
+2 -2
View File
@@ -341,7 +341,7 @@ class Dropdowns extends Base {
public function dropdowntypeActive() { public function dropdowntypeActive() {
$dropdowntype_serial = (integer) filter_input(INPUT_POST, "dropdowntype_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $dropdowntype_serial = (int) filter_input(INPUT_POST, "dropdowntype_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$SQL = "select dropdown_serial $SQL = "select dropdown_serial
from view_dropdowns from view_dropdowns
@@ -587,7 +587,7 @@ class Dropdowns extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -149,7 +149,7 @@ class Export extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -100,7 +100,7 @@ class Journal extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -253,7 +253,7 @@ class Popovers extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -308,7 +308,7 @@ class ProjectTypes extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+3 -3
View File
@@ -215,7 +215,7 @@ class Reports extends Base {
$reports = $this->getTable("reports", $SQL); $reports = $this->getTable("reports", $SQL);
return (integer) ($reports->record->report_serial ?? 0); return (int) ($reports->record->report_serial ?? 0);
} }
// ======================= // =======================
@@ -268,7 +268,7 @@ class Reports extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
@@ -357,7 +357,7 @@ class Reports extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -279,7 +279,7 @@ class SICCodes extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+1 -1
View File
@@ -310,7 +310,7 @@ class Statuses extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+4 -4
View File
@@ -35,8 +35,8 @@ class Subscriptions extends Base {
public function goToSubscription() { public function goToSubscription() {
$subscription_serial = (integer) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $subscription_serial = (int) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$usersubscription_serial = (integer) filter_input(INPUT_POST, "usersubscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $usersubscription_serial = (int) filter_input(INPUT_POST, "usersubscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$subscription = $this->getSubscription($subscription_serial); $subscription = $this->getSubscription($subscription_serial);
@@ -227,7 +227,7 @@ class Subscriptions extends Base {
case "prompt": case "prompt":
$subscription_serial = (integer) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $subscription_serial = (int) filter_input(INPUT_POST, "subscription_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$subscription = $this->getSubscription($subscription_serial); $subscription = $this->getSubscription($subscription_serial);
@@ -841,7 +841,7 @@ class Subscriptions extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
+6 -6
View File
@@ -113,8 +113,8 @@ class Users extends Base {
$user_random_password = $this->generateRandomPassword(); $user_random_password = $this->generateRandomPassword();
$user_temp_password = password_hash($user_random_password, PASSWORD_DEFAULT); $user_temp_password = password_hash($user_random_password, PASSWORD_DEFAULT);
$user_change_password = (boolean) true; $user_change_password = (bool) true;
$user_active = (boolean) true; $user_active = (bool) true;
// Add the User // Add the User
@@ -204,7 +204,7 @@ class Users extends Base {
case "prompt": case "prompt":
$user_serial = (integer) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0; $user_serial = (int) filter_input(INPUT_POST, "user_serial", FILTER_SANITIZE_NUMBER_INT) ?: 0;
$user = $this->getUser($user_serial); $user = $this->getUser($user_serial);
@@ -310,7 +310,7 @@ class Users extends Base {
$users = $this->getUserByUserId($user_id); $users = $this->getUserByUserId($user_id);
return ($users->count() === 0) ? 0 : (integer) $users->record->user_serial; return ($users->count() === 0) ? 0 : (int) $users->record->user_serial;
} }
// ===================== // =====================
@@ -359,7 +359,7 @@ class Users extends Base {
$recordset = $statement->fetch(PDO::FETCH_ASSOC); $recordset = $statement->fetch(PDO::FETCH_ASSOC);
$count = (count($recordset) > 0) ? (integer) $recordset["count"] : (integer) 0; $count = (count($recordset) > 0) ? (int) $recordset["count"] : (int) 0;
// Pagination // Pagination
@@ -517,7 +517,7 @@ class Users extends Base {
if (password_verify($user_password, $stored_hashed_password)) { if (password_verify($user_password, $stored_hashed_password)) {
$_SESSION[self::USER_AUTHENTICATED] = true; $_SESSION[self::USER_AUTHENTICATED] = true;
$_SESSION[self::USER_SERIAL] = (integer) $user->record->user_serial; $_SESSION[self::USER_SERIAL] = (int) $user->record->user_serial;
$_SESSION[self::USER_ID] = (string) $user->record->user_id; $_SESSION[self::USER_ID] = (string) $user->record->user_id;
$_SESSION[self::USER_NAME] = (string) $user->record->user_name; $_SESSION[self::USER_NAME] = (string) $user->record->user_name;
$_SESSION[self::USER_EMAIL] = (string) $user->record->user_email; $_SESSION[self::USER_EMAIL] = (string) $user->record->user_email;
+1 -1
View File
@@ -4898,7 +4898,7 @@
// Public // Public
getContent() { getContent() {
return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean); return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(bool);
} }
hasContent() { hasContent() {
return this.getContent().length > 0; return this.getContent().length > 0;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -95,7 +95,7 @@ class ActiveUserSubscriptions extends TCPDF {
foreach ($users as $user) { foreach ($users as $user) {
$user_serial = (integer) $user->user_serial; $user_serial = (int) $user->user_serial;
$subscriptions = (new Subscriptions())->getUsersActiveSubscriptions($user_serial); $subscriptions = (new Subscriptions())->getUsersActiveSubscriptions($user_serial);
+2 -2
View File
@@ -11506,7 +11506,7 @@ class TCPDF {
* series of length values, which are the lengths of the on and off dashes. * series of length values, which are the lengths of the on and off dashes.
* For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on, * For example: "2" represents 2 on, 2 off, 2 on, 2 off, ...; "2,1" is 2 on,
* 1 off, 2 on, 1 off, ...</li> * 1 off, 2 on, 1 off, ...</li>
* <li>phase (integer): Modifier on the dash pattern which is used to shift * <li>phase (int): Modifier on the dash pattern which is used to shift
* the point at which the pattern starts.</li> * the point at which the pattern starts.</li>
* <li>color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName).</li> * <li>color (array): Draw color. Format: array(GREY) or array(R,G,B) or array(C,M,Y,K) or array(C,M,Y,K,SpotColorName).</li>
* </ul> * </ul>
@@ -22233,7 +22233,7 @@ class TCPDF {
/** /**
* Set parameters for drop shadow effect for text. * Set parameters for drop shadow effect for text.
* @param array $params Array of parameters: enabled (boolean) set to true to enable shadow; depth_w (float) shadow width in user units; depth_h (float) shadow height in user units; color (array) shadow color or false to use the stroke color; opacity (float) Alpha value: real value from 0 (transparent) to 1 (opaque); blend_mode (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity. * @param array $params Array of parameters: enabled (bool) set to true to enable shadow; depth_w (float) shadow width in user units; depth_h (float) shadow height in user units; color (array) shadow color or false to use the stroke color; opacity (float) Alpha value: real value from 0 (transparent) to 1 (opaque); blend_mode (string) blend mode, one of the following: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity.
* @since 5.9.174 (2012-07-25) * @since 5.9.174 (2012-07-25)
* @public * @public
*/ */