Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

List filters NOT logic not working 02 Dec 2016 10:31 #14808

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Or manual in the file :
classes/model/list.php

function :
filterPivot()
switch ($logic)
{
	case 'NOT':
	case 'OR':
		// Matches "at least one" value
		$conditions = array();
		foreach($values as $value)
		{
			if (empty($value))
				continue;

			$conditions[] = 'a.' . $relation->foreignKey . ' = ' . (int)$value;
		}




// FIX : THIS CHECK HERE
		if (count($conditions))
		{

			// Search for all related items matching the filter values
			$ids = $this->belongsOf($relation, $conditions);

			if ($logic == 'OR')
				// SQL Restriction list from the related items founds
				$this->addRestrict($ids);
			else if ($logic == 'NOT')
				// SQL Exclusion of the related items founds.
				$this->addExclude($ids);

		}

		break;
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.056 seconds

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started