Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1708 closed defect (fixed)

Mediadir - Entries active timeperiod isn't recognized

Reported by: markusliechti Owned by: michael.raess
Priority: normal Milestone: Contrexx 3.1 Hotfix 1
Component: MediaDir Version: 3.1
Severity: normal Keywords: mediadir, time
Cc:

Description (last modified by kramer)

Mediadir - active Entries with active timeperiod are feched form DB even if the "duration_end" date has passed.

Solution Now: Entries with active state are returned, the time period is ignored. -> I think the timeperiod check happens somewhere later. This rises the issue of wrong entriy counting in the cathegories and levels.

Correcet Solution: Only Entries with active state and which are in the desired time period should be returned.

-> Fix -> mediadir/lib/entry.php


@line 151: old

if(!empty($this->bolActive)) {

$strWhereActive = "AND (entry.active = 1) ";

}


Replace with


if(!empty($this->bolActive)) {

$strWhereActive = "AND (entry.active = 1) "; $strWhereActiveTime = "AND (entry.duration_end >= ".time().") ";

}


AND.... ca. @line 250 ... in the Query ... add


".$strWhereActiveTime."


-> I like to kill bugs ;-)

Change History (4)

comment:1 Changed 7 years ago by michael.raess

  • Owner changed from comvation to michael.raess

comment:2 Changed 7 years ago by kramer

  • Milestone changed from unknown to Contrexx 3.1 Hotfix 1

comment:3 Changed 7 years ago by kramer

  • Resolution set to fixed
  • Status changed from new to closed

(In https://github.com/Cloudrexx/cloudrexx/commit/025958433201175c0a48a5a291ce1c7228345592) Merged revision(s) 27095 from trunk: Mediadir (fixed #1708): there is an option for each entry which allow to publish an entry only in a date range. this option hasn't been checked in sql queries

comment:4 Changed 7 years ago by kramer

  • Description modified (diff)
Note: See TracTickets for help on using tickets.