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

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}
// 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;
		}		
	}

}
