Version 4 (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: Unallow node owner access to left column

Description: Not allowing node owners to use left column for adding content.

Done on wifidog version 1226 by Wad (wmaalouf at fqccl dot org)
The use of this patch is to reserve the left content column of every portal to the network administrator (admin)

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);