app_defaults.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /*
  3. FusionPBX
  4. Version: MPL 1.1
  5. The contents of this file are subject to the Mozilla Public License Version
  6. 1.1 (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. for the specific language governing rights and limitations under the
  12. License.
  13. The Original Code is FusionPBX
  14. The Initial Developer of the Original Code is
  15. Mark J Crane <[email protected]>
  16. Portions created by the Initial Developer are Copyright (C) 2008-2019
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <[email protected]>
  20. */
  21. if ($domains_processed == 1) {
  22. //update the notifications table
  23. //if (is_array($_SESSION['switch']['scripts'])) {
  24. // $sql = "select count(*) from v_notifications ";
  25. // $num_rows = $database->select($sql, null, 'column');
  26. // if ($num_rows == 0) {
  27. // //build insert array
  28. // $array['notifications'][0]['notification_uuid'] = uuid();
  29. // $array['notifications'][0]['project_notifications'] = 'false';
  30. // //grant temporary permissions
  31. // $p = permissions::new();
  32. // $p->add('notification_add', 'temp');
  33. // //execute insert
  34. // $database->app_name = 'notifications';
  35. // $database->app_uuid = 'e746fbcb-f67f-4e0e-ab64-c414c01fac11';
  36. // $database->save($array, false);
  37. // unset($array);
  38. // //revoke temporary permissions
  39. // $p->delete('notification_add', 'temp');
  40. // }
  41. // unset($sql, $num_rows);
  42. //}
  43. }
  44. ?>