/** * How long we think the export will take. * * @return one of PORTFOLIO_TIME_XX constants. */ public function expected_time() { // By number of exported entries. if (!empty($this->eids)) { $dbtime = portfolio_expected_time_db(count(explode(',', $this->eids))); } else { if (!empty($this->ecount)) { $dbtime = portfolio_expected_time_db($this->ecount); } else { $dbtime = PORTFOLIO_TIME_HIGH; } } // Only if export includes embedded files but this is in config and not // yet accessible here .... $filetime = PORTFOLIO_TIME_HIGH; return $filetime > $dbtime ? $filetime : $dbtime; }
/** * */ public function expected_time() { return portfolio_expected_time_db(count($this->messages)); }
/** * how long might we expect this export to take * * @return constant one of PORTFOLIO_TIME_XX */ public function expected_time() { $filetime = portfolio_expected_time_file($this->multifiles); $dbtime = portfolio_expected_time_db(count($this->exportdata['entries'])); return $filetime > $dbtime ? $filetime : $dbtime; }
/** * How long we think the export will take * Single entry is probably not too long. * But we check for filesizes * Else base it on the number of records * * @return one of PORTFOLIO_TIME_XX constants */ public function expected_time() { if ($this->recordid) { return $this->expected_time_file(); } else { return portfolio_expected_time_db(count($this->records)); } }
function expected_time() { $filetime = $this->expected_time_file(); if ($this->posts) { $posttime = portfolio_expected_time_db(count($this->posts)); if ($filetime < $posttime) { return $posttime; } } return $filetime; }
public function expected_time() { if ($this->exporttype == 'single') { return PORTFOLIO_TIME_LOW; } return portfolio_expected_time_db(count($this->exportdata)); }
public function expected_time() { return portfolio_expected_time_db(count($this->exportdata['entries'])); }