Customise the CLinkPager

Hello,

I’ve looked at the code that creates the urls, and found that the parameters or the url are added in this function in the file framework/web/CUrlManager.php:




        /**

	 * Creates a path info based on the given parameters.

	 * @param array list of GET parameters

	 * @param string the separator between name and value

	 * @param string the separator between name-value pairs

	 * @return string the created path info

	 * @since 1.0.3

	 */

	public function createPathInfo($params,$equal,$ampersand)

	{

		$pairs=array();

		foreach($params as $key=>$value)

		{

			if(is_array($value))

			{

				foreach($value as $k=>$v)

					$pairs[]=urlencode($key).'['.urlencode($k).']'.$equal.urlencode($v);

			}

			else

				$pairs[]=urlencode($key).$equal.urlencode($value);

		}

		return implode($ampersand,$pairs);

	}



As I have explained above to create extensions for the pager, I think you can also create an extension for this class, or maybe a component, or just edit it in place in the framework if you really need it urgently.




// I think this..

$pairs[]=urlencode($key).'['.urlencode($k).']'.$equal.urlencode($v);

// must be like this:

$pairs[]=urlencode($key).'[]'.$equal.urlencode($v);



Best regards,

Alexandru