<?php
//============================================================================
// (c) 2002-2015, Go Albert - All Rights Reserved.
// This source code is the property of Go Albert. Its content may not be
// disclosed to third parties, copied or duplicated in any form, in whole
// or in part, without the prior written permission of Go Albert. Use,
// duplication, or disclosure of the technical data contained in this
// document is subject to restrictions as the software is patented.
//============================================================================
// SourceBox extension

LoadConfiguration(dirname(__FILE__) . '/configuration.js');

class Extension_link extends amiExtension{

	public function __construct(){
		parent::__construct();
		$this->_priority = 100;
	}

	function GetVersion() {	
		return '1.0';
	}

	function HasFeature($feat) {
		switch($feat) {
			case 'source_mode': return true;
			case 'bm_local_index': return true;
			case 'bm_desc_index': 	return true;
			default: return false;
		}
	}

	function getModes() {   
		return array('link');
	}

	function GetFamily() {
		return 'watch';
	}

	function SetBookmarkFromHTTPVar(&$bookmark){
		Tool::GetHttpVar('first_indexation', $bookmark->x_options['first_indexation']);
		Tool::GetHttpVar('attachments_mode', $bookmark->x_options['attachments_mode']);
	}

};
