Changes between Initial Version and Version 1 of doc/developer/Patches

Show
Ignore:
Timestamp:
08/03/07 12:33:10 (14 years ago)
Author:
wad
Comment:

wad

Legend:

Unmodified
Added
Removed
Modified
  • doc/developer/Patches

    v1 v1  
     1''NOTE: These are non supported patches. They are not complicated, but make sure you make a backup copy of the file you're modifying. Use these patches at your own risk.'' 
     2---- 
     3== Patch 1: Not allowing node owners to use left column == 
     4 
     5Done on wifidog version 1226 by Wad (wmaalouf at fqccl dot org)[[BR]] 
     6 
     7'''In function:''' 
     8 
     9 !GenerateFromTable (in file Classes/FormSelectGenerator.php) 
     10 
     11 
     12'''Replace the line:''' 
     13 $db->execSql("SELECT $primaryKeyField,  $displayField FROM $table", $results, false); 
     14 
     15'''With:''' 
     16{{{ 
     17        $usr = User :: getCurrentUser(); 
     18        if ($displayField == 'display_area' && $usr->getUsername() != 'admin'){ 
     19                $db->execSql("SELECT $primaryKeyField,  $displayField FROM $table WHERE display_area <> 'left_area_middle' and display_area <> 'left_area_top' and display_area <> 'left_area_bottom'", $results, false); 
     20        }else{ 
     21                $db->execSql("SELECT $primaryKeyField,  $displayField FROM $table", $results, false); 
     22        } 
     23}}}