Changeset 55 for trunk/Modules/Meet


Ignore:
Timestamp:
Apr 7, 2020, 12:55:39 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
Location:
trunk/Modules/Meet
Files:
2 edited

Legend:

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

    r47 r55  
    3434function HumanDateTimeToTime($DateTime)
    3535{
    36   if($DateTime == '') return(NULL);
     36  if ($DateTime == '') return NULL;
    3737  $DateTime = str_replace('. ', '.', $DateTime);
    3838  $Parts = explode(' ', $DateTime);
     
    4444  } else $TimeParts = array(0, 0, 0);
    4545  $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]);
    46   return($Result);
     46  return $Result;
    4747}
    4848
    4949function HumanDateToTime($Date)
    5050{
    51   if($Date == '') return(NULL);
    52   return(HumanDateTimeToTime($Date.' 0:0:0'));
     51  if ($Date == '') return NULL;
     52  return HumanDateTimeToTime($Date.' 0:0:0');
    5353}
    5454
     
    6060  $ret = html_entity_decode($str, ENT_COMPAT, 'UTF-8');
    6161  $p2 = 0;
    62   for(;;)
     62  for (;;)
    6363  {
    6464    $p = strpos($ret, $prefix, $p2);
     
    105105function is_alpha($Char)
    106106{
    107   return ((($Char >= 'a') and ($Char <= 'z')) or (($Char >= 'A') and ($Char <= 'Z')));
     107  return (($Char >= 'a') and ($Char <= 'z')) or (($Char >= 'A') and ($Char <= 'Z'));
    108108}
    109109
     
    116116{
    117117  $Result = '';
    118   for(;;)
     118  for (;;)
    119119  {
    120120    $Pos = strpos($Text, $Needle);
     
    142142{
    143143  $Result = '';
    144   for(;;)
     144  for (;;)
    145145  {
    146146    $Pos = strpos($Text, $Needle);
     
    432432      $Result = 1;
    433433    } else $Result = 0;
    434     return($Result);
    435   }
    436 }
     434    return $Result;
     435  }
     436}
  • trunk/Modules/Meet/MeetPage.php

    r49 r55  
    8484      '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL FROM MeetItem) AS T WHERE (T.Hidden=0) AND '.
    8585      $Where.$Order['SQL'].$PageList['SQLLimit']);
    86     while($MeetItem = $DbResult->fetch_assoc())
     86    while ($MeetItem = $DbResult->fetch_assoc())
    8787    {
    8888      $Output .= '<tr>'.
     
    109109      $Output .= '<div><a href="'.$this->System->Link('/seznamka/rss/').'"><img src="'.$this->System->Link('/images/rss20.png').'" alt="rss20"/></a></div>';
    110110    }
    111     return($Output);
     111    return $Output;
    112112  }
    113113}
     
    145145    $this->Title = 'Inzerát - Seznamka - '.$this->Title;
    146146    $Output = '';
    147     if(count($this->System->PathItems) > 2)
     147    if (count($this->System->PathItems) > 2)
    148148    {
    149149      $id = $this->System->PathItems[2] * 1;
     
    211211    $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '.
    212212      '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '`Hidden`=0 ORDER BY `Time` DESC LIMIT 30');
    213     while($MeetItem = $DbResult->fetch_assoc())
     213    while ($MeetItem = $DbResult->fetch_assoc())
    214214    {
    215215      $Title = $MeetItem['Name'];
Note: See TracChangeset for help on using the changeset viewer.