Commit Graph

532 Commits

Author SHA1 Message Date
chansizzle ad1c5205d4 Update text.php (#4654) 2019-09-24 16:40:50 -06:00
chansizzle 16e08250bf Update event_socket.php (#4652)
removes potential "Warning: fsockopen(): unable to connect to 127.0.0.1:8021 (Connection refused)"
2019-09-24 16:40:31 -06:00
chansizzle 347b38db4e Update ringbacks.php (#4643) 2019-09-24 12:12:15 -06:00
FusionPBX 7ed95878e5 Update token.php 2019-09-16 18:23:15 -06:00
FusionPBX 977a1af64e Create token.php 2019-09-16 08:18:16 -06:00
Nate 911a43219e Users: Prevent duplicate usernames. 2019-09-10 19:23:14 -06:00
FusionPBX 19e8305a8e Update schema.php 2019-09-10 17:50:41 -06:00
FusionPBX c37f2958e5 Update destinations.php 2019-09-10 13:50:42 -06:00
Nate 37b5713c4b Misc Classes: Database class integration. 2019-09-04 06:44:50 -06:00
Nate 07cb911e70 Menu Class: Database class integration. 2019-09-03 09:59:37 -06:00
Nate 836fb87136 Misc Classes: Database class integration. 2019-09-02 15:57:18 -06:00
FusionPBX b9bba7edce Update database.php 2019-08-20 13:05:27 -06:00
FusionPBX a4f1854452 Update database.php 2019-08-20 12:40:51 -06:00
FusionPBX d07ef4711a Update destinations.php 2019-08-13 12:44:38 -06:00
FusionPBX ba8cb5b0a3 Update destinations.php 2019-08-13 12:41:55 -06:00
FusionPBX d5ebe489bb Update database.php 2019-08-03 16:16:30 -06:00
FusionPBX 6202f6ab79 Update cache.php 2019-07-30 00:11:50 -06:00
FusionPBX ccfce8ee1f Update groups.php 2019-07-28 16:09:17 -06:00
FusionPBX 65d74aa7f8 Update groups.php 2019-07-28 15:34:21 -06:00
Nate b07150a01d Make singular() method public in database class. 2019-07-27 21:03:16 -06:00
FusionPBX 25a4220c4f Update schema.php 2019-07-27 16:53:42 -06:00
FusionPBX a80547d1d9 Update schema.php 2019-07-27 16:34:20 -06:00
FusionPBX 75909d85b6 Update schema.php 2019-07-27 09:12:38 -06:00
Nate e6c1d232df Adjust singular() method in database class to support 'addresses'. 2019-07-27 09:02:47 -06:00
FusionPBX 9c230f66e7 Update groups.php 2019-07-25 23:37:48 -06:00
Nate 77b85a3f9c Database class integration. Modify database class singular() method to support table names ending in 'ses', such as v_databases. 2019-07-09 20:06:17 -06:00
Nate 32b04431f7 Fix typo in select() method switch statement. 2019-07-01 13:26:26 -06:00
Nate a591c87776 Database Class Support for "...ies" Table Names (#4321)
Currently, the permission checks within the class try to singularize the table name, then check for permissions based on the result.  This PR modifies the private singular() function to support table names that end in "...ies", where an _add or _edit permission likely uses a 'y' instead.  An example would be where inserting records into v_event_categories, the class should probably look for an "event_category_add" permission, instead of "event_categorie_add".  Likewise for update queries.  

This proposed change isn't foolproof, obviously. In the case of inserting or updating records in a table named v_pies, it would fail to suffice.  You're welcome to integrate a better solution, if one exists.
2019-06-30 15:11:15 -06:00
jpattWPC 4ae27f13b6 Add support for PostgreSQL TLS (#4262)
This commit adds support for PostgreSQL TLS communication. This requires /etc/fusionpbx/config.php to have two parameters added:

$db_secure = true;
$db_cert_authority = "/path/to/ca.crt";
2019-06-05 21:10:58 -06:00
FusionPBX 58537ce365 Update message.php 2019-05-30 01:55:07 -06:00
FusionPBX ed92a99130 Revert "[4.5] Fix the ALTER TABLE (#4097)"
This reverts commit 8822528227.
2019-05-30 00:56:51 -06:00
FusionPBX c34ff1d4c6 Update database.php 2019-05-27 19:56:32 -06:00
FusionPBX 157db18dc7 White space cleanup on the text class. 2019-05-25 23:40:51 -06:00
Luis Daniel Lucio Quiroz d39190913d [4.5] Fix the ALTER TABLE (#4097)
* Fix the ALTER TABLE

when $apps[$x]['db'][$y]['fields'][$z]['name'] is an array, you dont try to get the ['text'] index therefore fields such as v_xml_cdr.xml_uuid, v_destinations.destination_type and v_destinations.destination_number wont be created when upgrading.

This patch fixes it

* Update schema.php
2019-05-08 14:02:20 -06:00
FusionPBX cd5dd78c25 Update destinations.php 2019-05-05 19:34:56 -06:00
FusionPBX 9796cabe28 Update database.php 2019-05-05 19:30:05 -06:00
FusionPBX 0ee574151b Create captcha.php 2019-04-24 19:43:09 -06:00
FusionPBX 57a62cf6b6 Update database.php 2019-04-23 09:28:49 -06:00
FusionPBX 76f52e2686 Update database.php 2019-04-09 10:49:51 -06:00
Nate b31b82bd66 Schema Class: Update compatibility with timestamptz field types. 2019-04-02 09:53:57 -06:00
FusionPBX 7112aed941 Delete orm.php 2019-03-25 23:28:46 -06:00
FusionPBX 50c6bd254f Update database.php 2019-03-25 09:32:00 -06:00
FusionPBX b4cf441521 Update database.php 2019-03-23 17:27:58 -06:00
FusionPBX d9ffd80138 Update menu.php 2019-03-08 11:02:09 -07:00
Nate ace3275ba6 Update message.php
Fix for Domain Selector and other JS dependent features not working due to $_SESSION['message'] not being of type text.
2019-02-28 13:10:55 -07:00
Nate 41cba72be7 Update message.php
Add method to retrieve quick (rough) count of alert messages waiting.
2019-02-19 14:50:03 -07:00
FusionPBX f1e5fa4848 Update schema.php 2019-02-12 08:47:44 -07:00
FusionPBX 800aa94ecf Update destinations.php 2018-10-16 00:33:43 -06:00
FusionPBX f749925ebe Update and rename messages.php to message.php 2018-08-30 21:12:55 -06:00
FusionPBX 9adf103166 Update cache.php 2018-08-10 17:41:02 -06:00
FusionPBX a34947fa85 Update cache.php 2018-07-24 16:55:56 -05:00
FusionPBX 7b66b01f97 Update destinations.php 2018-07-01 11:16:47 -06:00
FusionPBX 2f5826db3d Update destinations.php 2018-06-28 23:29:21 -06:00
FusionPBX e9d243a230 Update destinations.php 2018-06-20 23:26:47 -06:00
FusionPBX fcbac2bd02 Update database.php 2018-05-31 09:15:23 -06:00
FusionPBX 5028507062 Update database.php 2018-05-19 15:48:02 -06:00
FusionPBX 70f9d4944d Update database.php 2018-05-18 18:56:06 -06:00
FusionPBX cd8b7f332f Update ringbacks.php 2018-04-10 21:14:12 -06:00
FusionPBX 952b5b4547 Update ringbacks.php 2018-04-10 20:37:01 -06:00
FusionPBX 2178711775 Update ringbacks.php 2018-04-10 20:13:38 -06:00
FusionPBX a2dfb76a47 Update ringbacks.php 2018-03-29 19:27:22 -06:00
FusionPBX 863c35f60c Update tones.php 2018-03-29 19:26:01 -06:00
Mafoo 3a72a6e3c2 Enhance - Text class (#3012)
try and preserve existing comments when organizing a language
2018-03-06 10:06:56 -07:00
FusionPBX 6247765f80 Update ringbacks.php 2018-03-01 21:19:38 -07:00
FusionPBX 1f1c813675 Update domains.php 2018-02-25 01:08:54 -07:00
FusionPBX 3dbc6e9936 Update schema.php 2018-02-23 10:11:34 -07:00
FusionPBX 38eb772745 Update database.php 2018-02-12 08:40:23 -07:00
FusionPBX 29c01ad34b Update sounds.php 2018-02-10 08:46:15 -07:00
FusionPBX 7fc34cd3c1 Create sounds.php 2018-02-09 18:28:35 -07:00
FusionPBX 97073cdad5 Update destinations.php 2018-01-09 12:45:04 -07:00
FusionPBX d7efaee49f Update destinations.php 2018-01-09 12:43:23 -07:00
FusionPBX f4d219336e Update destinations.php 2018-01-07 20:01:32 -07:00
FusionPBX 44904fe0bf Update destinations.php 2017-12-23 16:24:00 -07:00
FusionPBX 8895402f28 Update destinations.php 2017-12-21 01:36:36 -07:00
FusionPBX a20cb0b75f Update menu.php 2017-11-17 14:44:31 -07:00
FusionPBX b4f4cd7b79 Update menu.php 2017-11-17 14:28:07 -07:00
FusionPBX 27309fabf2 Update menu.php 2017-11-17 13:06:04 -07:00
FusionPBX c0493f6976 Update destinations.php 2017-10-27 04:36:37 -06:00
FusionPBX 6b6fbaaf0c Update destinations.php 2017-09-28 03:19:12 -06:00
konradSC b969629f58 File cache sync via curl (#2851)
* Add sendevent when using file caching

* Create clear_cache.lua

FS receives a command via curl to call this script which deletes the single cache entry or flushes the entire cache.

* Create file_cache.lua

This scripts monitors for custom events. When an event is processed it will send out a command via curl to other FS servers telling them to clear their cache. 

This must be called from conf/autoload_configs/lua.conf.xml
 <param name="startup-script" value="app/server/resources/memcache.lua"/>
2017-09-20 16:19:56 -06:00
Mafoo 05f76b0556 Pass on languages before importing updates (#2849)
put language files into consistent state in preparation of a import
2017-09-19 09:48:40 -06:00
FusionPBX 12308f4082 Update database.php 2017-09-11 01:21:36 -05:00
FusionPBX 1bb950dde8 Update cache.php 2017-09-02 09:56:30 -06:00
FusionPBX 84191e4090 Update cache.php 2017-07-22 15:52:45 -06:00
FusionPBX 09f1ea706e Update cache.php 2017-07-22 13:18:03 -06:00
FusionPBX a24528c196 Update database.php 2017-07-15 23:06:22 -06:00
FusionPBX 030752f964 Update database.php 2017-07-15 22:26:01 -06:00
FusionPBX 1fedc4e009 Update database.php 2017-07-15 20:38:56 -06:00
FusionPBX 420cce478d Update database.php 2017-07-15 20:20:51 -06:00
FusionPBX 3c9acd16dc Update database.php 2017-07-15 17:20:21 -06:00
FusionPBX bc414459de Update database.php 2017-07-15 17:09:01 -06:00
FusionPBX e7b49caad6 Update database.php 2017-07-14 20:44:45 -06:00
FusionPBX 0e68a3ff2f Update database.php 2017-07-14 20:41:23 -06:00
FusionPBX d0cfe5e0e1 Update database.php 2017-07-14 10:52:30 -06:00
FusionPBX a55ada0195 Update database.php 2017-07-11 12:48:20 -06:00
FusionPBX c91b280edd Update database.php 2017-07-11 11:30:22 -06:00
FusionPBX 1d8f16446a Update database.php 2017-07-11 00:13:54 -06:00
FusionPBX a086610092 Update database.php 2017-07-10 22:38:29 -06:00
FusionPBX 96cb411d72 Update database.php 2017-07-08 01:10:28 -06:00
FusionPBX c6c5c012e1 Update database.php 2017-07-04 09:48:52 -06:00
FusionPBX d5e7977317 Update menu.php 2017-07-01 16:05:25 -06:00
FusionPBX 98b834e1b8 Update menu.php 2017-07-01 14:13:51 -06:00
Mafoo b312fbc425 Enhance-Multiple messages display (#2702)
Store messages by mood so they can be grouped up
change default mood to positive and add a default colour to catch messages with a wrong mood
migrate settings so upgrading vs new is consistent
2017-06-21 08:27:05 -06:00
Mafoo 0098dd01c2 Enhance - text class autofill (#2679)
Try and auto fill a value when its blank an the same baseline language
has a value
2017-06-12 22:19:02 -07:00
FusionPBX a93b7983ea Use null instead of an empty string for user_uuid when not available. 2017-06-11 08:48:18 -06:00
Mafoo 4d6f1b57a0 BugFix - messages class (#2674)
missed the self class reference when adding a legacy message
2017-06-10 16:12:05 -06:00
FusionPBX db20220eef Create text.php
Switch require back to include what it was originally as it breaks too many things with little benefits.
2017-06-10 09:42:54 -06:00
Mafoo ed48da536c Enhance text class (#2670)
make the get routine a little more rugged by checking if the file exists not the directory it is in.
throw a exception if we are asked to load a app_languages that doesn't exist
don't reload the resources/app_languages if exclude_global was ommitted
code styling update to match project
2017-06-10 09:14:58 -06:00
Mafoo 8a2afdcdd0 Enhance - remove statsh/pop from messages class (#2671)
statsh/pop was present to work around a bad implementation in loginphp.
This removes the now redundant code.
2017-06-10 08:59:21 -06:00
Mafoo bf3faaa051 Enhance - add message stash/pop (#2660)
add new methods to messages class to let it take care of stash and pop of the messages
update login.php to use new methods
tweak html function to put the $_SESSION['message'] in the stack so there is only one code point to maintain for rendering
2017-06-09 22:15:18 -06:00
Mafoo bc26ecf6ae Enhance - better reasons for 403 in orm class (#2659)
update return message when code 403 to also state the permission that failed
2017-06-09 20:03:22 -06:00
Mafoo 70cfac5876 remove debug lines in permissions (#2658)
because application defaults is now captured for output these debug
lines show up when used. This removes them
2017-06-09 13:32:31 -06:00
Mafoo b941879c91 BugFix - database class app_uuid (#2663)
if $database->app_uuid is not set it would use '' in some conditions
which isset would test true.
This fix uses strlen instead, but also fixes number_transations app that
highlighted the flaw
2017-06-09 13:31:50 -06:00
Mafoo 32a6f76ed0 Enhance [master] provide $app_path during upgrade (#2573)
if a application is installed via a symlink PHP will resolve the symlink
for __DIR__ and __FILE__ making it impossible for an application to work
out it's relative path withing the fusion system.
By providing $app_path during upgrade routines an application will
beable to provide the correct link for menu items (e.g.
/opt/languages/index.php) instead of having to hard code it where it
could change depending on how the application was installed
2017-06-08 09:41:56 -06:00
Mafoo bfe3ff173f Enhance - Display text on app_defaults (#2645)
enable display_type on domains (and therefore app_defaults)
capture the output of app_defaults
format if statements to project preference
use more generic label display for results reducing number of translations required
change upgrade.php to use the more consistent $display_type
2017-06-08 09:39:50 -06:00
Mafoo 8709d01fb0 BugFix [master] language update (#2628)
Imported Found language ro as ro-ro Romanian (tested by reverse translation)
Add placeholders for all found languages
Add new missing flags
Enhancements to text class
* improved sort to keep language-* tags organized at the top
* if a language is missing a name tag, add it
* changed organizer to not add a final \n
* corrected some indenting
* added detect_all_languages that attempts to find any languages that haven't been defined in resources/app_languages.php
* added language_totals, this is used by the optional languages application to calculate how complete a language is
2017-06-02 13:24:12 -06:00
Mafoo 4ae8b418d4 BugFix [master] - Convert all menus to 2-2 format (#2627)
convert all app_menu.php files to have all placeholders and languages and use 2-2 format for languages
update app_defaults to convert any items found using legacy values in user_setings, domain_settings and default_settings
2017-06-02 12:17:50 -06:00
Mafoo 828646b258 BugFix [master] - menu class (#2622)
when a translation is missing/blank take it from en-us
take the list of lanaguages from text class so all languages get a value
(should fix missing logout button in some languages)
2017-06-01 10:21:21 -06:00
Mafoo 10188339e5 BugFix [master] - messages class (#2618)
htmlspecialchars isn't required for the javascript, only the \r?\n escape
2017-05-31 14:09:07 -06:00
Mafoo c295bd25e1 BugFix [master] - messages class escape more text automatically (#2612)
because we are using javascript to populate the messages list we need to
make sure all special chars are escaped or line feeds will cause
problems
2017-05-30 13:44:51 -06:00
Mafoo 71f681496b BugFix [master] database class (#2594)
Fix for if you send an array containing both updates and new data, it would end up placing all the new data on top of the last item containing the uuid of the last update (if updates are earlier in the array than new items)
2017-05-28 10:18:07 -06:00
Mafoo 1ff6bc7ad5 Enhance [master] Better reasons for 403 in database class (#2596)
update return message when code 403 to also state the permission that failed
2017-05-25 23:54:10 -06:00
Mafoo 13557c30ec BugFix [master] text class (#2598)
update escape_str to more reliabiliy escape the string into a consistent
format
2017-05-23 09:26:33 -06:00
Mafoo f44aee3bf8 Enhance - Convert all languages to 2-2 digit (#2581)
Convert all languages to use the en-us style codes
Where an installation is using a 2 digit code, use the legacy map to find
the mapped language and provide that text correctly
Have escape_str strip \' before converting or we end up with a double
encode
Update organzie_languages to understand how to convert legacy languages
automatically
updated flags
2017-05-13 13:13:38 -06:00
Mafoo 0302d8085c reworked text class to gather the languages on construction (more efficient) (#2576)
organize_languages will now use an internal function to escape values as fusion's check_str would not be appropriate
enabled two missing flags
organize on remaining app_languages.php and add missing 'he'
2017-05-12 08:44:53 -06:00
Mafoo 22dc22c30e BugFix [master] Languages add missing text placeholders (#2572)
* BugFix [master] Languages add missing text placeholders

add placeholders for missing language text
reorganise file so languages are in a consistent order with en-us always first, and the remaining stored alphabetically
space out tag names to make them line up for readability

* add organize_language to text class

also add get_languages
2017-05-10 13:40:46 -06:00
Mafoo 941b115d92 Enhance-Add message stack (#2521)
Implement new messages class
Support legacy $_SESSION['message_*']
New function messages::add($message, $mood, $delay) to simplify adding messages
updated core/users/user_edit.php to demonstrate
includes space->tab corrections
2017-04-27 11:30:52 -06:00
FusionPBX 6421dffba3 Update database.php 2017-03-17 00:09:32 -06:00
FusionPBX 0fb9850d07 Update database.php 2017-03-16 22:20:11 -06:00
FusionPBX 5ebcad413a Update destinations.php 2017-02-22 20:59:30 -07:00
FusionPBX 2d68fa9118 Update schema.php 2017-02-16 00:03:33 -07:00
FusionPBX f6fdd9523f Update domains.php 2017-01-17 13:37:26 -07:00
jalr 49d80dcec3 fix condition (#2298) 2017-01-17 10:16:13 -07:00
FusionPBX 6fe57bace2 Update domains.php 2017-01-14 18:17:21 -07:00
FusionPBX c6c5329a56 Update domains.php 2017-01-14 18:15:34 -07:00
FusionPBX 532a0c0590 Minor syntax fix spotted in dry run now activate. 2017-01-14 14:39:05 -07:00
FusionPBX b9bf07a5e6 Add the settings method to the upgrade method. 2017-01-14 14:33:05 -07:00
FusionPBX 841d56938d Add the settings method to the domains class. 2017-01-14 13:15:03 -07:00
FusionPBX 95c36e4d35 Update event_socket.php 2017-01-11 14:43:45 -07:00
FusionPBX 46be3c8e97 Update groups.php
Prevent warnings in groups.php.
2017-01-11 14:39:40 -07:00
FusionPBX da9cd4cbcf Update event_socket.php
Add freeswitch defaults to event_socket.php
2017-01-11 14:14:47 -07:00
FusionPBX edb1a964a7 Update groups.php 2017-01-10 07:55:09 -07:00
FusionPBX d8cf528a50 Update switch_settings.php 2017-01-10 01:18:17 -07:00
FusionPBX 212cd7d025 Update schema.php 2017-01-05 03:58:01 -07:00
FusionPBX c43c1a556f Update schema.php
Prevent php warnings.
2017-01-05 03:53:02 -07:00
FusionPBX e2ae375abd Update schema.php 2016-12-18 16:48:24 -07:00
FusionPBX d6b10c6e64 Update database.php
An improvement to make the database class more robust.
2016-11-27 00:16:18 -07:00
FusionPBX 2fcb774dc0 Update database.php
Update the database class delete method.
2016-11-23 13:39:20 -07:00
FusionPBX 549ac9a70d Update database.php
Enhance database->delete() method.
2016-11-19 14:10:06 -07:00
FusionPBX 1b06ed31d5 Update database.php 2016-11-19 11:57:36 -07:00