Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[*] CORE: Refactor Language::getLanguages calls #2902

Merged
merged 1 commit into from Apr 22, 2015
Merged

[*] CORE: Refactor Language::getLanguages calls #2902

merged 1 commit into from Apr 22, 2015

Conversation

gskema
Copy link
Contributor

@gskema gskema commented Apr 20, 2015

No description provided.

$resultsArray[$language['id_lang']] = Configuration::get($key, $language['id_lang'], $id_shop_group, $id_shop);
return $resultsArray;
$results_array = array();
foreach (Language::getLanguages() as $id_lang)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

maybe you want to do Language::getIDs(true) as $id_lang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do, I missed one :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gskema, any news about this ?

best regards.

@jnadaud jnadaud added the Improvement Type: Improvement label Apr 21, 2015
@@ -224,8 +223,8 @@ public static function createOrderDiscount($order, $productList, $qtyList, $name
// create discount
$voucher = new Discount();
$voucher->id_discount_type = Discount::AMOUNT;
foreach ($languages as $language)
$voucher->description[$language['id_lang']] = strval($name).(int)($order->id);
foreach (Language::getIDs((bool)$order) as $id_lang)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very odd, there is at least one more place like this. Argument should probably be true here, but I left it because I wasn't sure. Shall I change it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's ok, I will check make more functional test.
Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which functional tests ?
The Discount class is obsolete. Do you have functionnal tests on obsolete code ? I'm surprised
I don't understand that obsolete code is optimized .....

@gskema
Copy link
Contributor Author

gskema commented Apr 21, 2015

  • Updated;

Please check again.

jnadaud pushed a commit that referenced this pull request Apr 22, 2015
[*] CORE: Refactor Language::getLanguages calls
@jnadaud jnadaud merged commit f675780 into PrestaShop:1.6 Apr 22, 2015
@jnadaud
Copy link
Contributor

jnadaud commented Apr 22, 2015

Hi @gskema

Thank you for your contribution.

Best regards.

@jnadaud
Copy link
Contributor

jnadaud commented Apr 22, 2015

Hi, please have a look at #2914

Best regards.

@gskema gskema deleted the lang branch October 27, 2016 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Type: Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants