mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 00:59:03 +00:00
Text messaging Receive only: database 4.3.6 adds sms_providers.sms_provider_send, and a provider set to Receive only in its window takes texts in as tickets, replies and codes and texts nothing out (no Text reply, ticket number, STOP or HELP answers, texts to clients or test texts), needs no SID or secret, cancels the texts waiting to go when switched, and is shown on Text Messaging, Text Messages, Notifications and Tickets settings and in the reply box of a ticket that came in by text, with the number to call; 26.12.3 changelog
This commit is contained in:
23
admin/database_updates/4.3.6.php
Normal file
23
admin/database_updates/4.3.6.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 4.3.6 (from 4.3.5)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* sms_providers.sms_provider_send - whether texts go out through the provider (1), or it only takes texts in (0,
|
||||
* Receive only: texts to the number still become tickets, replies and codes, and nothing is texted - for a number
|
||||
* that can't send yet, or a service where sending is a hassle to set up). Every provider set up already sends.
|
||||
*
|
||||
* Re-runnable: the column is made only where it isn't there.
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
$itflow_sms_table = mysqli_query($mysqli, "SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'sms_providers' LIMIT 1");
|
||||
if ($itflow_sms_table && mysqli_num_rows($itflow_sms_table) > 0) {
|
||||
$itflow_send_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'sms_providers' AND COLUMN_NAME = 'sms_provider_send' LIMIT 1");
|
||||
if (!$itflow_send_exists || mysqli_num_rows($itflow_send_exists) === 0) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `sms_providers` ADD `sms_provider_send` tinyint(1) NOT NULL DEFAULT 1 AFTER `sms_provider_active`");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user