Working on new access system...
[estigi.git] / core / block / block.boot
blob5f72051ee15868af256139941523ade38d7456c7
1 <?php
2 /** @file block.boot
3  * Block boot file
4  * For the booting process of the module
5  */
7 function block_isityou(){
9         global $x, $xx, $user;
11         if(user_access('blocks admin', 'block')){
12                 if($x == 'block/admin'){
13                         core_load('block', 'admin');
14                         return block_admin();
15                 }
16         
17                 if($x == 'block/admin/new'){
18                         core_load('block', 'admin');
19                         return block_edit();
20                 }
21         
22                 if(path_wildcards('block/admin/block/region/%', TRUE)){
23                         core_load('block', 'admin');
24                         return block_admin_block($xx[2], $xx[4]);
25                 }
26         
27                 if(path_wildcards('block/admin/edit/%', TRUE)){
28                         core_load('block', 'admin');
29                         return block_edit($xx[3]);
30                 }
32                 if(path_wildcards('block/admin/region/%', TRUE) || path_wildcards('block/admin/region/%/%', TRUE)){
33                         core_load('block', 'admin');
34                         return block_admin_region($xx[3], $xx[4]);
35                 }
37         }