Changeset 607


Ignore:
Timestamp:
Nov 26, 2013, 9:30:19 PM (10 years ago)
Author:
maron
Message:
  • Added: tool for set uncomplete quest mark complete = 0
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r579 r607  
    2121  '<small>Přidá aktualitu na hlavní stranu projektu</small><br/><br/>'.   
    2222  '<a href="'.$System->Link('/admin/?action=testing').'">Testování</a><br/>'.
    23   '<small>Testovací funkce</small><br/><br/>';   
     23  '<small>Testovací funkce</small><br/><br/>'.   
     24  '<a href="'.$System->Link('/admin/?action=uncomplete').'">Nastavit nekompletní texty</a><br/>'.
     25  '<small>Nastaví questy, které jsou v popisu nebo objektu stejné jako nedokončené</small><br/><br/>';   
    2426  return($Output);
    2527}
     
    6163  return($Output);
    6264}
     65function Uncomplete()
     66{
     67  global $System;
     68 
     69                $DbResult = $System->Database->query('SELECT  `gs_tran`.`ID`,`gs_tran`.`Details`,`gs_tran`.`Objectives` FROM '
     70     .'`textquest` AS  `gs_tran` '
     71     .'JOIN  `textquest` AS  `gs_orig` ON  `gs_orig`.`Entry` =  `gs_tran`.`Entry` '
     72    .'AND  `gs_orig`.`Language` =0 '
     73    .'WHERE  `gs_tran`.`Language` !=0 '
     74    .'AND  `gs_tran`.`Complete` =1 '
     75    .'AND ( (`gs_tran`.`Details` =  `gs_orig`.`Details` AND  "" !=  `gs_orig`.`Details` )'
     76    .' OR ( `gs_tran`.`Objectives` !=  `gs_orig`.`Objectives` AND  "" =  `gs_tran`.`Objectives` )'
     77    .' OR ( `gs_tran`.`Details` !=  `gs_orig`.`Details` AND  "" =  `gs_tran`.`Details` )'
     78    .' OR (`gs_tran`.`Objectives` =  `gs_orig`.`Objectives` AND  "" !=  `gs_orig`.`Objectives` ))'
     79    );
     80    $Output = 'Questy: <br />';
     81                while($quest = $DbResult->fetch_assoc())
     82                {
     83                  $Output .= $quest['ID'].', ';
     84                        $System->Database->query('UPDATE `textquest` SET `complete` = 0 WHERE ID='.$quest['ID']);
     85                }
     86  $Output .= '<br / ><br / >Questy nastaveny jako nedokončené!';
     87  return($Output);
     88}           
    6389
    6490$Output = '';
     
    7399    else if($_GET['action'] == 'testing') $Output .= Testing();
    74100    else if($_GET['action'] == 'phpinfo') $Output .= ShowPHPInfo();
     101    else if($_GET['action'] == 'uncomplete') $Output .= Uncomplete();
    75102    else $Output .= ShowMenu();
    76103  } else $Output .= ShowMenu(); 
  • trunk/includes/Version.php

    r605 r607  
    66// and system will need database update.
    77
    8 $Revision = 605; // Subversion revision
     8$Revision = 607; // Subversion revision
    99$DatabaseRevision = 604; // Database structure revision
    10 $ReleaseTime = '2013-11-25';
     10$ReleaseTime = '2013-11-26';
Note: See TracChangeset for help on using the changeset viewer.