Changeset 8131


Ignore:
Timestamp:
Dec 14, 2010, 3:36:20 PM (10 years ago)
Author:
patdenice
Message:

feature 2060: Remove adviser from db structure.
Remove adviser from user_list page and some db queries.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_list.php

    r8126 r8131  
    103103// |                    virtual categories management                      |
    104104// +-----------------------------------------------------------------------+
    105 // request to delete a virtual category / not for an adviser
     105// request to delete a virtual category
    106106if (isset($_GET['delete']) and is_numeric($_GET['delete']))
    107107{
  • trunk/admin/themes/default/default-colors.css

    r6363 r8131  
    3030
    3131/**
    32  * Header message like upgrade or adviser mode
     32 * Header message like upgrade
    3333 */
    3434.header_msgs {
  • trunk/admin/themes/default/template/extend_for_templates.tpl

    r6363 r8131  
    2929    {/foreach}
    3030  </table>
    31   {if !is_adviser()}
    3231  <p>
    3332    <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
    3433  </p>
    35   {/if}
    3634</form>
    3735{/if}
  • trunk/admin/themes/default/template/user_list.tpl

    r8128 r8131  
    121121      </td>
    122122    </tr>
    123 
    124     {if isset($adviser)}
    125     <tr>
    126       <td>{'Adviser'|@translate}</td>
    127       <td>
    128         <label><input type="radio" name="adviser" value="leave" checked="checked"> {'leave'|@translate}</label>
    129         / {'set to'|@translate}
    130         <label><input type="radio" name="adviser" value="true">{'Yes'|@translate}</label>
    131         <label><input type="radio" name="adviser" value="false">{'No'|@translate}</label>
    132       </td>
    133     </tr>
    134     {/if}
    135 
    136123  </table>
    137124</fieldset>
  • trunk/admin/user_list.php

    r6363 r8131  
    8787                u.'.$conf['user_fields']['email'].' AS email,
    8888                ui.status,
    89                 ui.adviser,
    9089                ui.enabled_high,
    9190                ui.level
     
    393392  $true_false_fields = array('expand', 'show_nb_comments',
    394393                       'show_nb_hits', 'enabled_high');
    395   if ($conf['allow_adviser'])
    396   {
    397     array_push($formfields, 'adviser');
    398     array_push($true_false_fields, 'adviser');
    399   }
    400394
    401395  foreach ($formfields as $formfield)
     
    459453          }
    460454        }
    461 
    462         // could not be adivser
    463         if (isset($data['adviser']))
    464         {
    465           $data['adviser'] = 'false';
    466         }
    467455      }
    468456
     
    523511    'F_FILTER_ACTION' => get_root_url().'admin.php'
    524512    ));
    525 
    526 // Hide radio-button if not allow to assign adviser
    527 if ($conf['allow_adviser'])
    528 {
    529   $template->assign('adviser', true);
    530 }
    531513
    532514// Display or Hide double password type
     
    708690        .($local_user['id'] == $conf['default_user_id']
    709691          ? '<br>['.l10n('default values').']' : ''),
    710       'STATUS' => l10n('user_status_'.
    711         $local_user['status']).(($local_user['adviser'] == 'true')
    712         ? '<br>['.l10n('Adviser').']' : ''),
     692      'STATUS' => l10n('user_status_'.$local_user['status']),
    713693      'EMAIL' => get_email_address_as_display_text($local_user['email']),
    714694      'GROUPS' => $groups_string,
  • trunk/include/functions_mail.inc.php

    r6706 r8131  
    305305  I.user_id =  U.'.$conf['user_fields']['id'].' and
    306306  I.status in (\'webmaster\',  \'admin\') and
    307   I.adviser = \'false\' and
    308307  '.$conf['user_fields']['email'].' is not null and
    309308  I.user_id <> '.$user['id'].'
  • trunk/install/db/91-database.php

    r8127 r8131  
    3333UPDATE ".USER_INFOS_TABLE."
    3434SET status = 'normal'
    35 WHERE (status = 'webmaster' OR status = 'admin')
     35WHERE status IN ('webmaster', 'admin')
    3636  AND adviser = 'true'
    3737;";
  • trunk/install/piwigo_structure-mysql.sql

    r5341 r8131  
    405405  `nb_line_page` tinyint(3) unsigned NOT NULL default '3',
    406406  `status` enum('webmaster','admin','normal','generic','guest') NOT NULL default 'guest',
    407   `adviser` enum('true','false') NOT NULL default 'false',
    408407  `language` varchar(50) NOT NULL default 'en_UK',
    409408  `maxwidth` smallint(6) default NULL,
  • trunk/install/piwigo_structure-pdo-sqlite.sql

    r6166 r8131  
    468468  "nb_line_page" INTEGER default 3 NOT NULL,
    469469  "status" VARCHAR(50) default 'guest',
    470   "adviser" BOOLEAN default false,
    471470  "language" VARCHAR(50) default 'en_UK' NOT NULL,
    472471  "maxwidth" INTEGER,
  • trunk/install/piwigo_structure-pgsql.sql

    r5452 r8131  
    569569  "nb_line_page" INTEGER default 3 NOT NULL,
    570570  "status" USER_INFOS_STATUS default 'guest'::USER_INFOS_STATUS,
    571   "adviser" BOOLEAN default false,
    572571  "language" VARCHAR(50) default 'en_UK' NOT NULL,
    573572  "maxwidth" INTEGER,
  • trunk/install/piwigo_structure-sqlite.sql

    r6166 r8131  
    468468  "nb_line_page" INTEGER default 3 NOT NULL,
    469469  "status" VARCHAR(50) default 'guest',
    470   "adviser" BOOLEAN default false,
    471470  "language" VARCHAR(50) default 'en_UK' NOT NULL,
    472471  "maxwidth" INTEGER,
  • trunk/password.php

    r6363 r8131  
    6666  INNER JOIN '.USER_INFOS_TABLE.' AS ui
    6767      ON u.'.$conf['user_fields']['id'].' = ui.user_id
    68 WHERE '
    69   .$conf['user_fields']['email'].' = \''.$mail_address.'\' AND
    70   (
    71     ui.status = \'normal\' OR
    72     (ui.status in (\'admin\', \'webmaster\') AND ui.adviser = \'true\')
    73   )
     68WHERE '.$conf['user_fields']['email'].' = \''.$mail_address.'\'
     69  AND ui.status = \'normal\'
    7470;';
    7571    $result = pwg_query($query);
  • trunk/themes/default/theme.css

    r8119 r8131  
    776776}
    777777
    778 /* Header message like upgrade or adviser mode */
     778/* Header message like upgrade*/
    779779.header_msgs {
    780780        text-align:center;
Note: See TracChangeset for help on using the changeset viewer.