本文整理汇总了PHP中Runalyze\Configuration::Privacy方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::Privacy方法的具体用法?PHP Configuration::Privacy怎么用?PHP Configuration::Privacy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Runalyze\Configuration
的用法示例。
在下文中一共展示了Configuration::Privacy方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initInternalObjects
/**
* Init pointer to DB/Error-object
*/
protected function initInternalObjects()
{
parent::initInternalObjects();
if (!\Runalyze\Configuration::Privacy()->showPrivateActivitiesInList()) {
$this->DatasetQuery->showOnlyPublicActivities();
}
}
示例2: getListLinkForCurrentUser
/**
* Get link to shared list for current user
* @param string $text [optional]
* @return string
*/
public static function getListLinkForCurrentUser($text = null)
{
if (!Configuration::Privacy()->listIsPublic()) {
return '';
}
if (is_null($text)) {
$text = Icon::$ATTACH;
}
return '<a href="shared/' . SessionAccountHandler::getUsername() . '/" target="_blank" ' . Ajax::tooltip('', __('Public list'), false, true) . '>' . $text . '</a>';
}
示例3: hidesMap
/**
* Hides map?
* @return boolean
*/
public function hidesMap()
{
$RoutePrivacy = Configuration::Privacy()->RoutePrivacy();
if ($RoutePrivacy->showRace()) {
return !$this->Type()->isCompetition();
} elseif ($RoutePrivacy->showAlways()) {
return false;
}
return true;
}
示例4: allCategories
/**
* All categories
* @return ConfigurationCategory[]
*/
private function allCategories()
{
return array(Configuration::General(), Configuration::Privacy(), Configuration::ActivityView(), Configuration::ActivityForm(), Configuration::Design(), Configuration::DataBrowser(), Configuration::Vdot(), Configuration::Trimp(), Configuration::BasicEndurance(), Configuration::Misc());
}
示例5: initDays
/**
* Init all days for beeing displayed
*/
protected function initDays()
{
$this->initShortModes();
$this->initEmptyDays();
$WhereNotPrivate = FrontendShared::$IS_SHOWN && !Configuration::Privacy()->showPrivateActivitiesInList() ? 'AND is_public=1' : '';
$AllTrainings = $this->DB->query('
SELECT
id,
time,
`s` as `s_sum_with_distance`,
DATE(FROM_UNIXTIME(time)) as `date`
' . $this->Dataset->getQuerySelectForAllDatasets() . '
FROM `' . PREFIX . 'training`
WHERE `time` BETWEEN ' . ($this->timestamp_start - 10) . ' AND ' . ($this->timestamp_end - 10) . '
AND accountid = ' . SessionAccountHandler::getId() . '
' . $WhereNotPrivate . '
ORDER BY `time` ASC
')->fetchAll();
foreach ($AllTrainings as $Training) {
$w = Time::diffInDays($Training['time'], $this->timestamp_start);
if (in_array($Training['sportid'], $this->sports_short) || in_array($Training['typeid'], $this->types_short)) {
$this->days[$w]['shorts'][] = $Training;
} else {
$this->days[$w]['trainings'][] = $Training;
}
}
}
示例6: getQueryWhereNotPrivate
/**
* Get string for query to not select private trainings
* @return string
*/
private function getQueryWhereNotPrivate()
{
return FrontendShared::$IS_SHOWN && !Configuration::Privacy()->showPrivateActivitiesInList() ? 'AND is_public=1' : '';
}
示例7: userAllowsList
/**
* Does this user allow a shared list?
* @return boolean
*/
protected function userAllowsList()
{
return Configuration::Privacy()->listIsPublic();
}
示例8: hideMap
/**
* @return boolean
*/
public function hideMap()
{
if (!Request::isOnSharedPage()) {
return false;
}
$RoutePrivacy = Configuration::Privacy()->RoutePrivacy();
if ($RoutePrivacy->showAlways()) {
return false;
}
$type = $this->activity()->type();
if ($RoutePrivacy->showRace()) {
return !$type->isCompetition();
}
return true;
}
示例9: foreach
<tr class="r' . $trClass . '">
<td class="l" style="width:24px;">';
foreach ($day['shorts'] as $short) {
$this->Dataset->setActivityData($short);
$this->Dataset->displayShortLink();
}
echo '</td>
<td class="l as-small-as-possible">' . Dataset::getDateString($day['date']) . '</td>
<td colspan="' . ($this->Dataset->cols() + $this->showPublicLink) . '"></td>
</tr>';
}
}
echo '</tbody>';
echo '<tbody>';
// Z U S A M M E N F A S S U N G
$WhereNotPrivate = FrontendShared::$IS_SHOWN && !\Runalyze\Configuration::Privacy()->showPrivateActivitiesInList() ? 'AND is_public=1' : '';
$sports = DB::getInstance()->query('SELECT `id`, `time`, `sportid`, SUM(1) as `num` FROM `' . PREFIX . 'training` WHERE `time` BETWEEN ' . ($this->timestamp_start - 10) . ' AND ' . ($this->timestamp_end - 10) . ' AND accountid = ' . SessionAccountHandler::getId() . ' ' . $WhereNotPrivate . ' GROUP BY `sportid` ORDER BY `num` DESC')->fetchAll();
foreach ($sports as $i => $sportdata) {
$Sport = new Sport($sportdata['sportid']);
echo '<tr class="r no-zebra">
<td colspan="' . $this->additionalColumns . '">
<small>' . $sportdata['num'] . 'x</small>
' . $Sport->name() . '
</td>';
$this->Dataset->loadGroupOfTrainings($sportdata['sportid'], $this->timestamp_start, $this->timestamp_end);
$this->Dataset->displayTableColumns();
echo '
</tr>';
}
?>
</tbody>