Version 8 (modified by wad, 15 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. These patches are not meant to be elegant, are not supported, and should be only applied by programmers that can bring the right changes to the patch (if any needed) depending on the discrepancies they notice. Use these patches at your own risk.

Patch 1: Remove node owner access to left column

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

Example: : See below, file patch.gauche.PNG

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