includes/pageutils.php
changeset 19 5d003b6c9e89
parent 16 64e0d3d4cf14
child 21 663fcf528726
equal deleted inserted replaced
18:edfc24408769 19:5d003b6c9e89
  1782           }
  1782           }
  1783           return $return;
  1783           return $return;
  1784           break;
  1784           break;
  1785         case 'save_new':
  1785         case 'save_new':
  1786         case 'save_edit':
  1786         case 'save_edit':
       
  1787           if ( defined('ENANO_DEMO_MODE') )
       
  1788           {
       
  1789             return Array('mode'=>'error','error'=>'Editing access control lists is disabled in the administration demo.');
       
  1790           }
  1787           $q = $db->sql_query('DELETE FROM '.table_prefix.'acl WHERE target_type='.intval($parms['target_type']).' AND target_id='.intval($parms['target_id']).'
  1791           $q = $db->sql_query('DELETE FROM '.table_prefix.'acl WHERE target_type='.intval($parms['target_type']).' AND target_id='.intval($parms['target_id']).'
  1788             '.$page_where_clause_lite.';');
  1792             '.$page_where_clause_lite.';');
  1789           if(!$q)
  1793           if(!$q)
  1790             return Array('mode'=>'error','error'=>mysql_error());
  1794             return Array('mode'=>'error','error'=>mysql_error());
  1791           $rules = $session->perm_to_string($parms['perms']);
  1795           $rules = $session->perm_to_string($parms['perms']);
  1809               'page_id' => $page_id,
  1813               'page_id' => $page_id,
  1810               'namespace' => $namespace,
  1814               'namespace' => $namespace,
  1811             );
  1815             );
  1812           break;
  1816           break;
  1813         case 'delete':
  1817         case 'delete':
       
  1818           if ( defined('ENANO_DEMO_MODE') )
       
  1819           {
       
  1820             return Array('mode'=>'error','error'=>'Editing access control lists is disabled in the administration demo.');
       
  1821           }
  1814           $q = $db->sql_query('DELETE FROM '.table_prefix.'acl WHERE target_type='.intval($parms['target_type']).' AND target_id='.intval($parms['target_id']).'
  1822           $q = $db->sql_query('DELETE FROM '.table_prefix.'acl WHERE target_type='.intval($parms['target_type']).' AND target_id='.intval($parms['target_id']).'
  1815             '.$page_where_clause_lite.';');
  1823             '.$page_where_clause_lite.';');
  1816           if(!$q)
  1824           if(!$q)
  1817             return Array('mode'=>'error','error'=>mysql_error());
  1825             return Array('mode'=>'error','error'=>mysql_error());
  1818           return Array(
  1826           return Array(