当前位置: 首页>>代码示例>>PHP>>正文


PHP Configuration::Privacy方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:10,代码来源:class.DataBrowserShared.php

示例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>';
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:15,代码来源:class.SharedLinker.php

示例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;
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:14,代码来源:class.TrainingObject.php

示例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());
 }
开发者ID:guancio,项目名称:Runalyze,代码行数:8,代码来源:class.ConfigTabGeneral.php

示例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;
            }
        }
    }
开发者ID:9x,项目名称:Runalyze,代码行数:30,代码来源:class.DataBrowser.php

示例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' : '';
 }
开发者ID:Nugman,项目名称:Runalyze,代码行数:8,代码来源:class.Dataset.php

示例7: userAllowsList

 /**
  * Does this user allow a shared list?
  * @return boolean 
  */
 protected function userAllowsList()
 {
     return Configuration::Privacy()->listIsPublic();
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:8,代码来源:class.FrontendSharedList.php

示例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;
 }
开发者ID:n0rthface,项目名称:Runalyze,代码行数:18,代码来源:Context.php

示例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>
开发者ID:Nugman,项目名称:Runalyze,代码行数:31,代码来源:tpl.DataBrowser.php


注:本文中的Runalyze\Configuration::Privacy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。