Ignore:
Timestamp:
Jan 1, 2014, 11:28:39 PM (11 years ago)
Author:
maron
Message:
  • fixed: import
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Import/Import.php

    r681 r682  
    7272      if($this->HaveSameText($this->Group, $DbRowBefore, $Value) and ($DbResultBefore->num_rows > 0) )
    7373      {
    74         $insert = false;
    75           //echo ();
    76           $this->System->Database->query('UPDATE `'.$this->Group['TablePrefix'].'` SET `VersionEnd` = "'.$this->Version['BuildNumber'].'" WHERE `ID`='.$DbRowBefore['ID']);
     74          $insert = false;
     75          if ($this->Group['Id'] == 1) {
     76             $set = ' , EndText = "'.$Value['EndText'].'" , ObjectiveText1 = "'.$Value['ObjectiveText1'].'"'.' , ObjectiveText2 = "'.$Value['ObjectiveText2'].'"'.' , ObjectiveText3 = "'.$Value['ObjectiveText3'].'"'.' , ObjectiveText4 = "'.$Value['ObjectiveText4'].'"';
     77          } else $set = '';
     78          $this->System->Database->query('UPDATE `'.$this->Group['TablePrefix'].'` SET `VersionEnd` = "'.$this->Version['BuildNumber'].'" '.$set.' WHERE `ID`='.$DbRowBefore['ID']);
    7779          echo('b ');
    78          
     80          
    7981      } else
    8082      if($this->HaveSameText($this->Group, $DbRowAfter, $Value) and ($DbResultAfter->num_rows > 0))
    8183      {
    82         $insert = false;
    83           $this->System->Database->query('UPDATE `'.$this->Group['TablePrefix'].'` SET `VersionStart` = "'.$this->Version['BuildNumber'].'" WHERE `ID`='.$DbRowAfter['ID']);
     84          $insert = false;
     85          if ($this->Group['Id'] == 1) {
     86             $set = ' , EndText = "'.$Value['EndText'].'" , ObjectiveText1 = "'.$Value['ObjectiveText1'].'"'.' , ObjectiveText2 = "'.$Value['ObjectiveText2'].'"'.' , ObjectiveText3 = "'.$Value['ObjectiveText3'].'"'.' , ObjectiveText4 = "'.$Value['ObjectiveText4'].'"';
     87          } else $set = '';
     88          $this->System->Database->query('UPDATE `'.$this->Group['TablePrefix'].'` SET `VersionStart` = "'.$this->Version['BuildNumber'].'" '.$set.' WHERE `ID`='.$DbRowAfter['ID']);
    8489          echo('a ');
    8590         
     91          if ( ($Value['EndText'] <> $DbRowAfter['EndText'])
     92           or ($Value['ObjectiveText1'] <> $DbRowAfter['ObjectiveText1'])
     93           or ($Value['ObjectiveText2'] <> $DbRowAfter['ObjectiveText2'])
     94           or ($Value['ObjectiveText3'] <> $DbRowAfter['ObjectiveText3'])
     95           or ($Value['ObjectiveText4'] <> $DbRowAfter['ObjectiveText4']) )
     96           echo $Value['Entry'].'='.$set.' '; 
    8697      } else
    8798      {
     
    102113            //if [DEPRECATED] do not import
    103114        foreach($this->Group['Items'] as $GroupItem) {
    104           if (false !== strpos($Value[$GroupItem['Column']],'[DEPRECATED'))   
     115          if (false !== strpos($Value[$GroupItem['Column']],'[DEPRECATED')) {
     116            echo('d '.$DbRowBefore['Entry'].' ');
    105117            $insert = false;
     118          }   
    106119        }   
    107120
     
    273286      $old = strtolower($old);
    274287      $old = str_replace('$b', '', $old);
    275  
     288     
     289      while ($part = substr($old, strpos($old, '<'), strpos($old, '>')-strpos($old, '<')))
     290        if ($part <> '') {
     291          $old = str_replace($part.'>', '', $old);
     292        }
    276293 
    277294      if (($GroupItem['MangosColumn'] <> '') and ($Group['MangosDatabase'] == 'mangos'))
     
    294311      $new = strtolower($new);
    295312      $new = str_replace('$b', '', $new);
     313
     314      while ($part = substr($new, strpos($new, '<'), strpos($new, '>')-strpos($new, '<')))
     315        if ($part <> '') {
     316          $new = str_replace($part.'>', '', $new);
     317        }
    296318     
    297319      if(($old == 'null') or ($old == 'NULL')) $old = '';
     
    301323      {
    302324        //  echo $old.'X'.$new;
    303         $result = false;
     325        if ( ($GroupItem['Column'] <> 'EndText')
     326        and ($GroupItem['Column'] <> 'ObjectiveText1')
     327        and ($GroupItem['Column'] <> 'ObjectiveText2')
     328        and ($GroupItem['Column'] <> 'ObjectiveText3')
     329        and ($GroupItem['Column'] <> 'ObjectiveText4') )
     330          $result = false;
    304331      }
    305332    }
Note: See TracChangeset for help on using the changeset viewer.