Subversion Repositories php_users

Rev

Rev 17 | Rev 19 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 18
Line 85... Line 85...
85
      }
85
      }
86
      return implode( "\n", $return );
86
      return implode( "\n", $return );
87
   }
87
   }
88
   
88
   
89
   protected function addEdit( $connection ) {
89
   protected function addEdit( $connection ) {
-
 
90
      //print "<pre>addEdit\n" . print_r( $this->workingOn, true) . '</pre>';
90
      $return = parent::addEdit( $connection );
91
      $return = parent::addEdit( $connection );
91
      
-
 
92
      return $return;
-
 
93
      
-
 
94
      $data = array();
92
      $data = array();
95
      // now we process all of the permissions
93
      // now we process all of the permissions
96
      if ( $return != 'Error' ) {
94
      if ( $return != 'Error' ) {
97
         foreach ( $this->workingOn['permissions'] as $name => $value ) {
95
         foreach ( $this->workingOn['permissions'] as $name => $value ) {
98
            $htmlFieldName = $this->configuration['input prefix'] . $name;
96
            $htmlFieldName = $this->configuration['input prefix'] . $name;
99
            if ( $this->workingOn['id'] == -1 || ( isset( $_REQUEST[$htmlFieldName] ) != $this->workingOn[$name] ) ) {
97
            if ( $this->workingOn['id'] == -1 || ( isset( $_REQUEST[$htmlFieldName] ) != $this->workingOn['permissions'][$name] ) ) {
100
               $data[$name] = isset( $_REQUEST[$htmlFieldName] ) ? 1 : 0;
98
               $data[$name] = isset( $_REQUEST[$htmlFieldName] ) ? 1 : 0;
101
            }
99
            }
102
         } // foreach
100
         } // foreach
103
         $connection->updatePermissions( $this->workingOn['id'],$data );
101
         $connection->updatePermissions( $this->workingOn['id'],$data );
104
      } // if not an error
102
      } // if not an error
105
      return $return;
103
      return $return;
106
   } // addEdit
104
   } // addEdit
-
 
105
   
107
 
106
 
108
}
107
}
109
 
108
 
110
?>
109
?>