* 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"/>
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
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
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
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
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
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
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
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
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)
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)
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
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'
* 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
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
Change the function fetch to fetchAll. Fetch returns a 2 dimensional array and fetchAll returns a 3 dimensional array. which changes the array structure so it works better with count.
created new class to look after generating the list of ringbacks
available
adjusted MOH class so legacy method is still possible (just not recommend) and utilizes optgroups as well
converted ring_groups and ivr_menus to use new method
added translations
implemented list_recordings in switch_recordings class
Remove default 192.168.42.42/32 allow.
Restore missing app/fax/resources/functions/parse_attachments.php to satisfy pre-existing include
Fix so sql in voicemail app works if var undefined. Warning: don't know if non Mariadb's like cast(...) .
Cleanup close in event socket.
Also many minor warning bug fixes in schema.php
Might as well take the plunge and go to default show warnings.
Uninitialized variable and small bug fixes install fusionpbx
Also a few warning causes fixed.
Also, one step along the way to allow freeswitch to be u freeswitch g freeswitch and fusionpbx to run www-data:www-data.
Cause all the .php files containing lines ending with \r\n to instead end with \n.
DYI with:
find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
So, please find in this set numerous small changes which eliminate numerous php warning messages.
Also, a small bug fix in an sql statistics routine, naming a count(*) field as count, so displaying correct detail.
If any of the proposed changes are omitted, the relevant page will experience php warnings.
There are no doubt fusionpbx pages I've yet to visit that still generate warnings, this set is nearly certainly not comprehensive.
Problem now in `tepmplate.php`
```PHP
$menu_array = $menu->menu_array();
...
foreach ($menu_array as $index_main => $menu_parent) {
```
It appear while install process because in this moment there not `$db`
and `$menu->menu_array()` returns nothing.
This problem also can be solved in `tepmplate.php` like
```PHP
if(is_array($menu_array)){
foreach ($menu_array as $index_main => $menu_parent) {
...
```
If a installation is missing the .project.ROOT previously it would just use the last search path as the project root (wrong) this will cause a Exception should it be unable to find it