Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
fix_profile_seo_lang
Creato
6 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
1 rimozione
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
44 linee
Copia tutti
8 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
51 linee
Copia tutti
public function getLanguageLink($idLang, Context $context = null)
public function getLanguageLink($idLang, Context $context = null)
{
{
if (!$context) {
if (!$context) {
$context = Context::getContext();
$context = Context::getContext();
}
}
$params = $_GET;
$params = $_GET;
unset($params['isolang'], $params['controller']);
unset($params['isolang'], $params['controller']);
if (!$this->allow) {
if (!$this->allow) {
$params['id_lang'] = $idLang;
$params['id_lang'] = $idLang;
} else {
} else {
unset($params['id_lang']);
unset($params['id_lang']);
}
}
$controller = Dispatcher::getInstance()->getController();
$controller = Dispatcher::getInstance()->getController();
if (!empty($context->controller->php_self)) {
if (!empty($context->controller->php_self)) {
$controller = $context->controller->php_self;
$controller = $context->controller->php_self;
}
}
Copia
Copiato
Copia
Copiato
if (isset($params['fc']) && isset($params['module'])) {
if($params['fc'] == 'module' && $params['module'] == 'appagebuilder' && $controller == 'appagebuilderhome')
unset($params['fc']);
unset($params['module']);
$controller = 'index';
}
if ($controller == 'product' && isset($params['id_product'])) {
if ($controller == 'product' && isset($params['id_product'])) {
return $this->getProductLink((int) $params['id_product'], null, null, null, (int) $idLang);
return $this->getProductLink((int) $params['id_product'], null, null, null, (int) $idLang);
} elseif ($controller == 'category' && isset($params['id_category'])) {
} elseif ($controller == 'category' && isset($params['id_category'])) {
return $this->getCategoryLink((int) $params['id_category'], null, (int) $idLang);
return $this->getCategoryLink((int) $params['id_category'], null, (int) $idLang);
} elseif ($controller == 'supplier' && isset($params['id_supplier'])) {
} elseif ($controller == 'supplier' && isset($params['id_supplier'])) {
return $this->getSupplierLink((int) $params['id_supplier'], null, (int) $idLang);
return $this->getSupplierLink((int) $params['id_supplier'], null, (int) $idLang);
} elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) {
} elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) {
return $this->getManufacturerLink((int) $params['id_manufacturer'], null, (int) $idLang);
return $this->getManufacturerLink((int) $params['id_manufacturer'], null, (int) $idLang);
} elseif ($controller == 'cms' && isset($params['id_cms'])) {
} elseif ($controller == 'cms' && isset($params['id_cms'])) {
return $this->getCMSLink(new CMS((int) $params['id_cms']), null, null, (int) $idLang);
return $this->getCMSLink(new CMS((int) $params['id_cms']), null, null, (int) $idLang);
} elseif ($controller == 'cms' && isset($params['id_cms_category'])) {
} elseif ($controller == 'cms' && isset($params['id_cms_category'])) {
return $this->getCMSCategoryLink(new CMSCategory((int) $params['id_cms_category']), null, (int) $idLang);
return $this->getCMSCategoryLink(new CMSCategory((int) $params['id_cms_category']), null, (int) $idLang);
} elseif (isset($params['fc']) && $params['fc'] == 'module') {
} elseif (isset($params['fc']) && $params['fc'] == 'module') {
$module = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : '';
$module = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : '';
if (!empty($module)) {
if (!empty($module)) {
unset($params['fc'], $params['module']);
unset($params['fc'], $params['module']);
return $this->getModuleLink($module, $controller, $params, null, (int) $idLang);
return $this->getModuleLink($module, $controller, $params, null, (int) $idLang);
}
}
}
}
return $this->getPageLink($controller, null, $idLang, $params);
return $this->getPageLink($controller, null, $idLang, $params);
}
}
Diff salvati
Testo originale
Apri file
public function getLanguageLink($idLang, Context $context = null) { if (!$context) { $context = Context::getContext(); } $params = $_GET; unset($params['isolang'], $params['controller']); if (!$this->allow) { $params['id_lang'] = $idLang; } else { unset($params['id_lang']); } $controller = Dispatcher::getInstance()->getController(); if (!empty($context->controller->php_self)) { $controller = $context->controller->php_self; } if ($controller == 'product' && isset($params['id_product'])) { return $this->getProductLink((int) $params['id_product'], null, null, null, (int) $idLang); } elseif ($controller == 'category' && isset($params['id_category'])) { return $this->getCategoryLink((int) $params['id_category'], null, (int) $idLang); } elseif ($controller == 'supplier' && isset($params['id_supplier'])) { return $this->getSupplierLink((int) $params['id_supplier'], null, (int) $idLang); } elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) { return $this->getManufacturerLink((int) $params['id_manufacturer'], null, (int) $idLang); } elseif ($controller == 'cms' && isset($params['id_cms'])) { return $this->getCMSLink(new CMS((int) $params['id_cms']), null, null, (int) $idLang); } elseif ($controller == 'cms' && isset($params['id_cms_category'])) { return $this->getCMSCategoryLink(new CMSCategory((int) $params['id_cms_category']), null, (int) $idLang); } elseif (isset($params['fc']) && $params['fc'] == 'module') { $module = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : ''; if (!empty($module)) { unset($params['fc'], $params['module']); return $this->getModuleLink($module, $controller, $params, null, (int) $idLang); } } return $this->getPageLink($controller, null, $idLang, $params); }
Testo modificato
Apri file
public function getLanguageLink($idLang, Context $context = null) { if (!$context) { $context = Context::getContext(); } $params = $_GET; unset($params['isolang'], $params['controller']); if (!$this->allow) { $params['id_lang'] = $idLang; } else { unset($params['id_lang']); } $controller = Dispatcher::getInstance()->getController(); if (!empty($context->controller->php_self)) { $controller = $context->controller->php_self; } if (isset($params['fc']) && isset($params['module'])) { if($params['fc'] == 'module' && $params['module'] == 'appagebuilder' && $controller == 'appagebuilderhome') unset($params['fc']); unset($params['module']); $controller = 'index'; } if ($controller == 'product' && isset($params['id_product'])) { return $this->getProductLink((int) $params['id_product'], null, null, null, (int) $idLang); } elseif ($controller == 'category' && isset($params['id_category'])) { return $this->getCategoryLink((int) $params['id_category'], null, (int) $idLang); } elseif ($controller == 'supplier' && isset($params['id_supplier'])) { return $this->getSupplierLink((int) $params['id_supplier'], null, (int) $idLang); } elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) { return $this->getManufacturerLink((int) $params['id_manufacturer'], null, (int) $idLang); } elseif ($controller == 'cms' && isset($params['id_cms'])) { return $this->getCMSLink(new CMS((int) $params['id_cms']), null, null, (int) $idLang); } elseif ($controller == 'cms' && isset($params['id_cms_category'])) { return $this->getCMSCategoryLink(new CMSCategory((int) $params['id_cms_category']), null, (int) $idLang); } elseif (isset($params['fc']) && $params['fc'] == 'module') { $module = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : ''; if (!empty($module)) { unset($params['fc'], $params['module']); return $this->getModuleLink($module, $controller, $params, null, (int) $idLang); } } return $this->getPageLink($controller, null, $idLang, $params); }
Trovare la differenza