Version 1 (modified by wad, 14 years ago)


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.

Patch 1: Not allowing node owners to use left column

Done on wifidog version 1226 by Wad (wmaalouf at fqccl dot org)

In function:

GenerateFromTable (in file Classes/FormSelectGenerator?.php)

Replace the line:

$db->execSql("SELECT $primaryKeyField, $displayField FROM $table", $results, false);


	$usr = User :: getCurrentUser();
	if ($displayField == 'display_area' && $usr->getUsername() != 'admin'){
		$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);
		$db->execSql("SELECT $primaryKeyField,  $displayField FROM $table", $results, false);