<?php
/*
	DevSaver Web Framework
	Copyright (c) 2013-2016 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com		
*/

// dependencies

/**
* description
*
* @library	
* @author	
* @since	
*/
class CModulesBackend extends CPlugin{
	
	var $tplvars; 

	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function getCurrentModuleLink() {

		if ($_REQUEST["module_id"]) {
			$module = $this->GetModuleInfo($_REQUEST["module_id"]);

			if (is_array($module)) {
				return "/" . $module["mod_url"] . "/";
			}
			
		}
		
	}


	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function PrepareLink($link) {
		global $_CONF , $_LANG , $_LANG_RAW;

		//check if the link needs index.php ..

		if ($this->vars->data["set_multilanguage"]) {
			return $_CONF["url"] . $_LANG . "/" . $link;
		} else {
			return $_CONF["url"] . $link;
		}		
	}

}
