Commit Graph

88 Commits

Author SHA1 Message Date
markjcrane f6920838c7 Add a default group check. 2016-04-03 11:54:09 -06:00
FusionPBX e241bd383a Merge pull request #1527 from moteus/menu_array_default_arg
Fix. Use default value in function definition.
2016-03-30 08:49:29 -06:00
Alexey Melnichuk 594a353fab Fix. warning about using NULL as first argument in `foreach`.
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) {
...
```
2016-03-30 10:15:49 +03:00
Alexey Melnichuk 645f493b11 Fix. Use default value in function definition.
On `themes/default/template.php` it called without args
```PHP
$menu_array = $menu->menu_array();
```

And it produce PHP warning.
2016-03-30 09:39:15 +03:00
markjcrane fa2b753e62 Add the menu_default method to app_defaults.php. 2016-03-26 22:59:00 -06:00
markjcrane c0b93e849c Change the method name to menu_default. 2016-03-26 21:22:52 -06:00
markjcrane d5b3fffda8 Add methoed 'default' to the menu class. 2016-03-26 21:18:02 -06:00
markjcrane e3175814bd Fix the reference to the prepared statement. 2016-03-26 14:03:44 -06:00
markjcrane c6f0759a5c Change the code in the menu to return immediately if the database object is not ready in this case its not ready until the install.php is finished. 2016-03-26 13:36:00 -06:00
markjcrane ba095f3852 Additional work to improve the install, template and the menu. 2016-03-26 12:22:15 -06:00
markjcrane 0e649f9020 Don't error if the menu is not available for the install.php. 2016-03-26 11:45:57 -06:00
reliberate 14f2705cb3 Menu: Updated code to create menu HTML from array, instead of database directly. 2015-07-30 11:49:51 -06:00
Mark Crane a3e3ed5a97 Add menu array to the menu class. 2015-06-22 17:56:40 +00:00
Nate Jones fe8032b1c3 Misc: Removed use of GLOB_BRACE as doesn't work on some systems, use non-GLOB_BRACE method instead. Thanks [xming] and Risk64. Should resolve Issue 916, as well. 2015-05-12 18:11:05 +00:00
Nate Jones ca9e59eca8 Menu: Re-enable Restore Default button for menus other than default, adjust other code to work better with non-default menus. 2015-05-12 06:31:34 +00:00
Nate Jones 7a0895de4d Menu: Restore Default now restores unprotected menu items and their default groups. Removed Restore All function (no longer necessary). Hide Restore Default button for menus other than the default menu. 2015-05-12 03:03:09 +00:00
Mark Crane 9cb5bbec4b Fix the main menu color. 2015-01-09 20:57:40 +00:00
Mark Crane 2497b33447 Add debug information. 2014-12-27 17:49:35 +00:00
Mark Crane d34fbd1063 Need to add GLOB_BRACE to support the {menu,config} 2014-12-27 17:30:07 +00:00
Mark Crane 4c69bd1cde Change the | to a comma had to review the syntax on the glob command. 2014-12-27 17:28:07 +00:00
Mark Crane ccd70da5ed Add $y = 0; and a try catch block to the menu. 2014-12-27 17:22:57 +00:00
Mark Crane 4b63b76309 Add a try catch to the menu include loop. 2014-12-27 07:25:11 +00:00
Mark Crane 9369fd8d0d Move the menu array to app_menu.php 2014-12-26 03:27:54 +00:00
Mark Crane 45d2b0fe54 Add primary key uuid to menu item group inserts 2014-09-20 04:01:53 +00:00
Mark Crane f85f1bca5d Move domain upgrade into the domain class and upgrade_schema into the schema class 2014-07-15 05:46:15 +00:00
Mark Crane 170a0864f5 Limit the transaction for the menu to SQLite. 2014-03-21 06:29:00 +00:00
Mark Crane affa8ee72c Add the SQL transactions back again to speed up install and menu restore. 2014-03-19 05:19:48 +00:00
Mark Crane bf80be8d87 Comment out the transaction support for the menu. 2014-02-16 09:04:52 +00:00
Nuno Miguel Reis e83d7ea1fd removed utf8encode not needed after all (local bug was causing the issues elsewhere) 2014-01-21 03:25:56 +00:00
Nuno Miguel Reis b4c5bffe68 added protection by encoding in utf8 2014-01-20 21:22:24 +00:00
Nuno Miguel Reis 4cb72d88cc menu fixing utf8 and ring groups pt-ring option 2014-01-16 23:30:56 +00:00
Mark Crane 7c3300faf6 Change menu class method restore2 to restore_all. Remove group permissions from restore (Restore Default) and leave in restore_all (Restore All) 2013-11-24 01:35:37 +00:00
Mark Crane a812951dc1 Improve the efficiency of the Menu PHP class by removing redundant code in the restore method of the PHP class and add PDO transactions. Improve the menu language for better multi-lingual support, escape the menu item title to so it will work correctly for French and other languages. 2013-11-24 00:15:02 +00:00
Mark Crane 826df9c40a Cleanup the menu class fixup the white space problems. 2013-09-27 04:15:43 +00:00
Mark Crane 867bd35d21 Change the menu back asc order. 2013-07-29 19:40:48 +00:00
Nuno Miguel Reis df24d0bf5d added db menu build and permissions block 2013-07-29 18:55:51 +00:00
Nuno Miguel Reis 834a8624c7 missing stuff dealing with group permissions 2013-07-29 17:22:40 +00:00
Mark Crane 3aa617ded7 Move the class files from includes to the resources directory. 2013-07-06 07:16:58 +00:00