Jump to content

Edit History

itmag.pro

itmag.pro


add screenshot

/public_html/controllers/admin/AdminThemesController.php

protected function updateLogo($field_name, $logo_prefix)
{
    // OK, PHP upload_tmp_dir accessible for read/write
    echo $_FILES[$field_name]['tmp_name'];exit;
    /tmp/phpG9zHIi

    $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');
    echo $tmp_name;exit;
    // OK, temp file move_uploaded_file() to
    /public_html/img/tmp/PSDv6zcS

    // OK, ImageManager::resize() copy files to _PS_IMG_DIR_
    /public_html/img/
    // with new names by as:
    // specled-logo-1689021933.jpg
    // specled-logo_invoice-1689021765.jpg
    // specled-logo_mail-1689021709.jpg

    // AFTER OLD FILE DELETE
    @unlink(_PS_IMG_DIR_.Configuration::get($field_name));
    ...
    // BUT ON NEXT LAST 3 lines configuration NOT UPDATED
    Configuration::updateValue($field_name, $logo_name, false, $id_shop_group, $id_shop);
    Hook::exec('actionAdminThemesControllerUpdate_optionsAfter');
    @unlink($tmp_name);
}

IN RESULT:

  • - new file created;
  • - old file deleted;
  • - configuration "$field_name" NOT UPDATED and we have broken design!

also no any php errors in error_log='/path_to_log' when I play with this function.

I search in DB by key "PS_LOGO_INVOICE" and see 2 line, that in one has "date_upd" field be modified when I try upload logo

installed 2 themes may be where somethings wrong with "id_configuration"

ps-theme-config1.jpg

...UPDATE...

switch theme to default-bootstrap and back only broken my design but not solved problem with upload logo!;(

PS THIS UNPOSIBLE BIG AND PERMANENT PROBLEM...I dont known any other ...malformed engine.

itmag.pro

itmag.pro


add screenshot

/public_html/controllers/admin/AdminThemesController.php

protected function updateLogo($field_name, $logo_prefix)
{
    // OK, PHP upload_tmp_dir accessible for read/write
    echo $_FILES[$field_name]['tmp_name'];exit;
    /tmp/phpG9zHIi

    $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');
    echo $tmp_name;exit;
    // OK, temp file move_uploaded_file() to
    /public_html/img/tmp/PSDv6zcS

    // OK, ImageManager::resize() copy files to _PS_IMG_DIR_
    /public_html/img/
    // with new names by as:
    // specled-logo-1689021933.jpg
    // specled-logo_invoice-1689021765.jpg
    // specled-logo_mail-1689021709.jpg

    // AFTER OLD FILE DELETE
    @unlink(_PS_IMG_DIR_.Configuration::get($field_name));
    ...
    // BUT ON NEXT LAST 3 lines configuration NOT UPDATED
    Configuration::updateValue($field_name, $logo_name, false, $id_shop_group, $id_shop);
    Hook::exec('actionAdminThemesControllerUpdate_optionsAfter');
    @unlink($tmp_name);
}

IN RESULT:

  • - new file created;
  • - old file deleted;
  • - configuration "$field_name" NOT UPDATED and we have broken design!

also no any php errors in error_log='/path_to_log' when I play with this function.

I search in DB by key "PS_LOGO_INVOICE" and see 2 line, that in one has "date_upd" field be modified when I try upload logo

installed 2 themes may be where somethings wrong with "id_configuration"

ps-theme-config1.jpg

itmag.pro

itmag.pro

/public_html/controllers/admin/AdminThemesController.php

protected function updateLogo($field_name, $logo_prefix)
{
    // OK, PHP upload_tmp_dir accessible for read/write
    echo $_FILES[$field_name]['tmp_name'];exit;
    /tmp/phpG9zHIi

    $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');
    echo $tmp_name;exit;
    // OK, temp file move_uploaded_file() to
    /public_html/img/tmp/PSDv6zcS

    // OK, ImageManager::resize() copy files to _PS_IMG_DIR_
    /public_html/img/
    // with new names by as:
    // specled-logo-1689021933.jpg
    // specled-logo_invoice-1689021765.jpg
    // specled-logo_mail-1689021709.jpg

    // AFTER OLD FILE DELETE
    @unlink(_PS_IMG_DIR_.Configuration::get($field_name));
    ...
    // BUT ON NEXT LAST 3 lines configuration NOT UPDATED
    Configuration::updateValue($field_name, $logo_name, false, $id_shop_group, $id_shop);
    Hook::exec('actionAdminThemesControllerUpdate_optionsAfter');
    @unlink($tmp_name);
}

IN RESULT:

  • - new file created;
  • - old file deleted;
  • - configuration "$field_name" NOT UPDATED and we have broken design!

also no any php errors in error_log='/path_to_log' when I play with this function.

itmag.pro

itmag.pro

/public_html/controllers/admin/AdminThemesController.php

protected function updateLogo($field_name, $logo_prefix)
{
    // OK, PHP upload_tmp_dir accessible for read/write
    echo $_FILES[$field_name]['tmp_name'];exit;
    /tmp/phpG9zHIi

    $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');
    echo $tmp_name;exit;
    // OK, temp file move_uploaded_file() to
    /public_html/img/tmp/PSDv6zcS

    // OK, ImageManager::resize() copy files to _PS_IMG_DIR_
    /public_html/img/
    // with new names by as:
    // specled-logo-1689021933.jpg
    // specled-logo_invoice-1689021765.jpg
    // specled-logo_mail-1689021709.jpg

    // AFTER OLD FILE DELETE
    @unlink(_PS_IMG_DIR_.Configuration::get($field_name));
    ...
    // BUT ON NEXT LAST 3 lines configuration NOT UPDATED
    Configuration::updateValue($field_name, $logo_name, false, $id_shop_group, $id_shop);
    Hook::exec('actionAdminThemesControllerUpdate_optionsAfter');
    @unlink($tmp_name);
}

IN RESULT:

  • - new file created;
  • - old file deleted;
  • - configuration "$field_name" NOT UPDATED and we have broken design!

also no any php errors in error_log='/path_to_log' when I play with this function.

×
×
  • Create New...