Changeset 18239 for extensions


Ignore:
Timestamp:
Sep 25, 2012, 7:28:33 PM (12 years ago)
Author:
Eric
Message:

using !empty($conf_UAM..) instead of $conf_UAM.. <> - Thx to flop25 for his advice ;-)

Location:
extensions/UserAdvManager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r17988 r18239  
    804804                $deltadays = floor($deltasecs / 86400);// Convert result from seconds to days
    805805 
    806                                                 if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and $conf_UAM[16] <> '')
     806                                                if (isset($conf_UAM[15]) and $conf_UAM[15]=='true' and !empty($conf_UAM[16]))
    807807                {
    808808                                if ($deltadays <= ($conf_UAM[16]/2))
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r18235 r18239  
    10071007      }
    10081008 
    1009       if (isset($conf_UAM_ConfirmMail[5]) and $conf_UAM_ConfirmMail[5] <> '')
     1009      if (isset($conf_UAM_ConfirmMail[5]) and !empty($conf_UAM_ConfirmMail[5]))
    10101010      {
    10111011        // Management of Extension flags ([username], [mygallery], [myurl])
     
    10331033    else
    10341034    {
    1035       if (isset($conf_UAM_ConfirmMail[6]) and $conf_UAM_ConfirmMail[6] <> '')
     1035      if (isset($conf_UAM_ConfirmMail[6]) and !empty($conf_UAM_ConfirmMail[6]))
    10361036      {
    10371037        // Management of Extension flags ([username], [mygallery], [myurl])
     
    11391139  {
    11401140    case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo)
    1141       if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
     1141      if (isset($conf_UAM[41]) and !empty($conf_UAM[41]))
    11421142      {
    11431143        // Management of Extension flags ([username], [mygallery])
     
    11581158     
    11591159    case 2: // Confirmation email on user profile update - With information email if modification done in user profile
    1160       if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
     1160      if (isset($conf_UAM[41]) and !empty($conf_UAM[41]))
    11611161      {
    11621162        // Management of Extension flags ([username], [mygallery])
     
    11741174      }
    11751175
    1176       $password = $password <> '' ? $password : l10n('UAM_empty_pwd');
    1177 
    1178       if (isset($conf_UAM[8]) and $conf_UAM[8] <> '')
     1176      $password = !empty($password) ? $password : l10n('UAM_empty_pwd');
     1177
     1178      if (isset($conf_UAM[8]) and !empty($conf_UAM[8]))
    11791179      {
    11801180        // Management of Extension flags ([username], [mygallery], [myurl])
     
    12201220       
    12211221    case 3: // Only information email send to user if checked
    1222       if (isset($conf_UAM[43]) and $conf_UAM[43] <> '')
     1222      if (isset($conf_UAM[43]) and !empty($conf_UAM[43]))
    12231223      {
    12241224        // Management of Extension flags ([username], [mygallery])
     
    12361236      }
    12371237
    1238       $password = $password <> '' ? $password : l10n('UAM_no_update_pwd');
    1239 
    1240       if (isset($conf_UAM[8]) and $conf_UAM[8] <> '')
     1238      $password = !empty($password) ? $password : l10n('UAM_no_update_pwd');
     1239
     1240      if (isset($conf_UAM[8]) and !empty($conf_UAM[8]))
    12411241      {
    12421242        // Management of Extension flags ([username], [mygallery], [myurl])
     
    12901290    );
    12911291
    1292     if (isset($conf_UAM[9]) and $conf_UAM[9] <> '') // Add personal text in confirmation email ?
     1292    if (isset($conf_UAM[9]) and !empty($conf_UAM[9])) // Add personal text in confirmation email ?
    12931293    {
    12941294      // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     
    14481448  {
    14491449    case 1: //Generating email content for remind with a new key
    1450       if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
     1450      if (isset($conf_UAM[42]) and !empty($conf_UAM[42]))
    14511451      {
    14521452        // Management of Extension flags ([username], [mygallery])
     
    14641464      }
    14651465     
    1466       if (isset($conf_UAM_ConfirmMail[2]) and $conf_UAM_ConfirmMail[2] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)
     1466      if (isset($conf_UAM_ConfirmMail[2]) and !empty($conf_UAM_ConfirmMail[2]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)
    14671467      {
    14681468                // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     
    15061506     
    15071507    case 2: //Generating email content for remind without a new key
    1508       if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
     1508      if (isset($conf_UAM[42]) and !empty($conf_UAM[42]))
    15091509      {
    15101510        // Management of Extension flags ([username], [mygallery])
     
    15221522      }
    15231523     
    1524       if (isset($conf_UAM_ConfirmMail[4]) and $conf_UAM_ConfirmMail[4] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)
     1524      if (isset($conf_UAM_ConfirmMail[4]) and !empty($conf_UAM_ConfirmMail[4]) and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)
    15251525      {
    15261526        // Management of Extension flags ([username], [mygallery], [myurl], [Kdays])
     
    16001600  load_language('plugin.lang', UAM_PATH);
    16011601
    1602   if (isset($conf_UAM[45]) and $conf_UAM[45] <> '')
     1602  if (isset($conf_UAM[45]) and !empty($conf_UAM[45]))
    16031603  {
    16041604    // Management of Extension flags ([username], [mygallery])
     
    16161616  }
    16171617
    1618   if (isset($conf_UAM[17]) and $conf_UAM[17] <> '' and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
     1618  if (isset($conf_UAM[17]) and !empty($conf_UAM[17]) and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
    16191619  {
    16201620    // Management of Extension flags ([username], [mygallery], [myurl], [days])
     
    16961696  }
    16971697
    1698   if (isset($conf_UAM[44]) and $conf_UAM[44] <> '')
     1698  if (isset($conf_UAM[44]) and !empty($conf_UAM[44]))
    16991699  {
    17001700    // Management of Extension flags ([username], [mygallery])
     
    17121712  }
    17131713     
    1714   if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
     1714  if (isset($conf_UAM[24]) and !empty($conf_UAM[24]))
    17151715  {
    17161716    // Management of Extension flags ([username], [mygallery], [myurl])
     
    18101810  $result = pwg_db_fetch_assoc(pwg_query($query));
    18111811
    1812   if (isset($conf_UAM[46]) and $conf_UAM[46] <> '')
     1812  if (isset($conf_UAM[46]) and !empty($conf_UAM[46]))
    18131813  {
    18141814    // Management of Extension flags ([username], [mygallery])
     
    18261826  }
    18271827     
    1828   if (isset($conf_UAM[27]) and $conf_UAM[27] <> '')
     1828  if (isset($conf_UAM[27]) and !empty($conf_UAM[27]))
    18291829  {
    18301830    // Management of Extension flags ([username], [mygallery], [myurl])
     
    25142514  $conf_UAM = unserialize($conf['UserAdvManager']);
    25152515
    2516   if (isset($login) and isset($conf_UAM[6]) and $conf_UAM[6] <> '')
     2516  if (isset($login) and isset($conf_UAM[6]) and !empty($conf_UAM[6]))
    25172517  {
    25182518    $conf_CharExclusion = preg_split("/,/",$conf_UAM[6]);
     
    25732573  $conf_UAM = unserialize($conf['UserAdvManager']);
    25742574 
    2575                 if (isset($email) and isset($conf_UAM[11]) and $conf_UAM[11] <> '')
     2575                if (isset($email) and isset($conf_UAM[11]) and !empty($conf_UAM[11]))
    25762576                {
    25772577                                $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[11]);
Note: See TracChangeset for help on using the changeset viewer.