EVE-SECURE / temars-eve-api

Automatically exported from code.google.com/p/temars-eve-api
0 stars 0 forks source link

Error on updating 1.2.1 to latest developer version #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
TEA Version?
1.2.1
SMF Version?
2.0.2

What steps will reproduce the problem?
1. click on download latest dev from TEA admin page.
2. click install mod.
3.

What is the expected output? What do you see instead?
expect a sucessful install.  Error/test fail on the following:

./Sources/Profile-Modify.php
Error/fail on this is the following scripted modification:

FIND:
        'type' => !empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum') ? 'text' : 'label',
             'label' => $txt['name'],
             'subtext' => $txt['display_name_desc'],

REPLACE:
            'type' => !empty($modSettings['tea_usecharname']) ? 'select' : (!empty($modSettings['allow_editDisplayName']) || allowedTo('moderate_forum') ? 'text' : 'label'),
             'label' => $txt['name'],
             'subtext' => $txt['display_name_desc'],
             'options' => 'Global $tea; if($modSettings["tea_custom_name"]) $format = TRUE; return $tea -> get_char_list(FALSE, $format);',

./Themes/default/Profile.template.php

Please provide any additional information below.

Error/fail on this is the following scripted modifications (two replacement 
attempts):

FIND:
                                    ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "' . ($context['member']['avatar']['choice'] == 'server_stored' ? '' : 'none') . '";' : '', '
                                     ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "' . ($context['member']['avatar']['choice'] == 'external' ? '' : 'none') . '";' : '', '
                                     ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "' . ($context['member']['avatar']['choice'] == 'upload' ? '' : 'none') . '";' : '', '

                                     function swap_avatar(type)
                                     {
                                         switch(type.id)
                                         {
                                             case "avatar_choice_server_stored":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 break;
                                             case "avatar_choice_external":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 break;
                                             case "avatar_choice_upload":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '', '
                                                 break;
                                             case "avatar_choice_none":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 break;
                                         }
                                     }

REPLACE:
                                    ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "' . ($context['member']['avatar']['choice'] == 'server_stored' ? '' : 'none') . '";' : '', '
                                     ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "' . ($context['member']['avatar']['choice'] == 'external' ? '' : 'none') . '";' : '', '
                                     ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "' . ($context['member']['avatar']['choice'] == 'upload' ? '' : 'none') . '";' : '', '
                                     ', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "' . ($context['member']['avatar']['choice'] == 'tea' ? '' : 'none') . '";' : '', '

                                     function swap_avatar(type)
                                     {
                                         switch(type.id)
                                         {
                                             case "avatar_choice_server_stored":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 ', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
                                                 break;
                                             case "avatar_choice_external":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 ', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
                                                 break;
                                             case "avatar_choice_upload":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "";' : '', '
                                                 ', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "none";' : '', '
                                                 break;
                                             case "avatar_choice_tea":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 ', !empty($modSettings["tea_enable"]) ? 'document.getElementById("avatar_tea").style.display = "";' : '', '
                                                 break;
                                             case "avatar_choice_none":
                                                 ', !empty($context['member']['avatar']['allow_server_stored']) ? 'document.getElementById("avatar_server_stored").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_external']) ? 'document.getElementById("avatar_external").style.display = "none";' : '', '
                                                 ', !empty($context['member']['avatar']['allow_upload']) ? 'document.getElementById("avatar_upload").style.display = "none";' : '', '
                                                 break;                                      }
                                     }

and the following:

FIND:
                                ', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label>' : '', '

REPLACE:
                                ', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label><br />' : '', '
                                 ', !empty($modSettings["tea_enable"]) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_tea" value="tea"' . ($context['member']['avatar']['choice'] == 'tea' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['tea_avatar'] . '</label>' : '', '

Proceeding with install anyway will result in the inability to enter or modify 
API keys.  Fails with a 500 error with ./?profile action=TEA/save or something 
like that.

Original issue reported on code.google.com by omgfy...@gmail.com on 5 Jan 2012 at 4:57