<commit_before><?php
	/*
	Copyight: <NAME> 2015
	LICENCE: MIT http://deuxhuithuit.mit-license.org;
	*/
	
	if(!defined("__IN_SYMPHONY__")) die("<h2>Error</h2><p>You cannot directly access this file</p>");
	
	/**
	 *
	 * @author <NAME>
	 * https://deuxhuithuit.com/
	 *
	 */
	class extension_multilingual_selectbox_link_field extends extension_selectbox_link_field {

		/**
		 * Name of the extension
		 * @var string
		 */
		const EXT_NAME = 'Field: Multilingual Selectbox Link';
		
		/* ********* INSTALL/UPDATE/UNINSTALL ******* */

		/**
		 * Creates the table needed for the settings of the field
		 */
		public function install() {
			$__select_box_link_loaded = false;
			try {
				require_once(EXTENSIONS . '/selectbox_link_field/extension.driver.php');
				require_once(EXTENSIONS . '/selectbox_link_field/fields/field.selectbox_link.php');
				$__select_box_link_loaded = true;
			} catch (Exception $ex) {
				$__select_box_link_loaded = false;
			}
			if ($__select_box_link_loaded != true) {
				Administration::instance()->Page->pageAlert('Could not load selectbox_link_field extension.', Alert::ERROR);
				return false;
			}
			// depends on "Languages"
			$languages_status = ExtensionManager::fetchStatus(array('handle' => 'languages'));
			$languages_status = current($languages_status);
			if ($languages_status != EXTENSION_ENABLED) {
				Administration::instance()->Page->pageAlert('Could not load languages extension.', Alert::ERROR);
				return false;
			}
			
			// create table "alias"
			Administration::instance()->Database()->query("CREATE VIEW `tbl_fields_multilingual_selectbox_link` AS
				SELECT * FROM `tbl_fields_selectbox_link`;");
			
			return true;
		}

		/**
		 * This method will update the extension according to the
		 * previous and current version parameters.
		 * @param string $previousVersion
		 */
		public function update($previousVersion = false) {
			$ret = true;
			return $ret;
		}

		public function uninstall() {
			Administration::instance()->Database()->query("DROP VIEW `tbl_fields_multilingual_selectbox_link`");
			return true;
		}

	}<commit_msg>fix install problems<commit_after><?php
	/*
	Copyight: <NAME> 2015
	LICENCE: MIT http://deuxhuithuit.mit-license.org;
	*/
	
	if(!defined("__IN_SYMPHONY__")) die("<h2>Error</h2><p>You cannot directly access this file</p>");
	
	if (!class_exists('extension_selectbox_link_field')) {
		define('__SBLF_NOT_INSTALLED', 1);
		class extension_selectbox_link_field extends Extension {}
	}
	
	/**
	 *
	 * @author <NAME>
	 * https://deuxhuithuit.com/
	 *
	 */
	class extension_multilingual_selectbox_link_field extends extension_selectbox_link_field {

		/**
		 * Name of the extension
		 * @var string
		 */
		const EXT_NAME = 'Field: Multilingual Selectbox Link';
		
		/* ********* INSTALL/UPDATE/UNINSTALL ******* */

		/**
		 * Creates the table needed for the settings of the field
		 */
		public function install() {
			if (__SBLF_NOT_INSTALLED) {
				$sbl_status = ExtensionManager::fetchStatus(array('handle' => 'selectbox_link_field'));
				$sbl_status = current($sbl_status);
				if ($sbl_status != EXTENSION_ENABLED) {
					Administration::instance()->Page->pageAlert('Could not load `selectbox_link_field` extension.', Alert::ERROR);
					return false;
				}
			}
			// depends on "Languages"
			$languages_status = ExtensionManager::fetchStatus(array('handle' => 'languages'));
			$languages_status = current($languages_status);
			if ($languages_status != EXTENSION_ENABLED) {
				Administration::instance()->Page->pageAlert('Could not load `languages` extension.', Alert::ERROR);
				return false;
			}
			
			// create table "alias"
			Administration::instance()->Database()->query("CREATE OR REPLACE VIEW `tbl_fields_multilingual_selectbox_link` AS
				SELECT * FROM `tbl_fields_selectbox_link`;");
			
			return true;
		}

		/**
		 * This method will update the extension according to the
		 * previous and current version parameters.
		 * @param string $previousVersion
		 */
		public function update($previousVersion = false) {
			$ret = true;
			return $ret;
		}

		public function uninstall() {
			Administration::instance()->Database()->query("DROP VIEW IF EXISTS `tbl_fields_multilingual_selectbox_link`");
			return true;
		}

	}
{'fraction_non_alphanumeric': 0.1376470588235294, 'fraction_numerical': 0.003058823529411765, 'mean_word_length': 4.109375, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 34, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1029493', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1294, 'n_words': 281}