public function executeIndex() { // httpsが使えるならlogin画面はhttpsを強制 if (Config::get('enable_https')) { if (strpos(mfwRequest::url(), 'http://') === 0) { return $this->redirect(mfwrequest::makeUrl('/login', 'https')); } } return $this->build(); }
protected function saveUrlBeforeLogin() { if (mfwRequest::method() === 'GET') { $url = mfwRequest::url(); if (Config::get('enable_https')) { $url = preg_replace('/^http:/', 'https:', $url); } mfwSession::set(self::SESKEY_URL_BEFORE_LOGIN, $url); } else { mfwSession::clear(self::SESKEY_URL_BEFORE_LOGIN); } }
<?php $anchor = "pull_{$alert['pull']->getId()}"; $linkid = mfwRequest::makeLinkId(mfwRequest::url() . "#{$anchor}"); ?> <div class="alert_block" id="<?php echo $anchor; ?> "> <div class="block_head"> <ul class="repo_name"> <li><a href="<?php echo url("/pulls/repo?repo_id={$alert['repo']->getId()}"); ?> "><?php echo $alert['repo']->getProject(); ?> </a></li> </ul> <h3><a href="<?php echo $alert['github_url']; ?> " target="_blank"><span class="number"><?php echo $alert['pull']->getNumber(); ?> :</span> <?php echo $alert['pull']->getTitle(); ?> </a></h3> <ul class="info"> <li><span class="tag">Login Name:</span> <?php
/** * このリクエストのURL. */ public static function url() { if (self::$url === null) { $scheme = 'http'; if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') { $scheme = 'https'; } self::$url = "{$scheme}://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; } return self::$url; }
<?php } else { ?> <li class="previous"><a href="<?php echo mfwHttp::composeURL(mfwRequest::url(), array('page' => $current_page - 1)); ?> ">Previous</a></li> <?php } ?> <?php if ($has_next_page) { ?> <li class="next"><a href="<?php echo mfwHttp::composeURL(mfwRequest::url(), array('page' => $current_page + 1)); ?> ">Next</a></li> <?php } else { ?> <li class="next disabled"><span>Next</span></li> <?php } ?> </ul> </div> </div> <div class="visible-xs">
<div class="pager"> <?php if (!isset($paramname)) { $paramname = 'page'; } list($base, $param) = mfwHttp::extractURL(mfwRequest::url()); unset($param[$paramname]); $baseurl = mfwHttp::composeUrl($base, $param); if ($page > 1) { $url = mfwHttp::composeUrl($baseurl, array($paramname => $page - 1)); echo "<a class=\"prev\" href=\"{$url}\">Prev</a>\n"; } else { echo "<span class=\"prev\">Prev</span>\n"; } if ($page_max <= 9) { for ($i = 1; $i <= $page_max; ++$i) { if ($i != $page) { $url = mfwHttp::composeUrl($baseurl, array($paramname => $i)); echo "<a href=\"{$url}\">{$i}</a>\n"; } else { echo "<span>{$i}</span>\n"; } } } elseif ($page <= 5) { for ($i = 1; $i <= 7; ++$i) { if ($i != $page) { $url = mfwHttp::composeUrl($baseurl, array($paramname => $i)); echo "<a href=\"{$url}\">{$i}</a>\n"; } else { echo "<span>{$i}</span>\n"; }
?> (<?php echo $c->getCreated('Y-m-d H:i'); ?> ) </div> </li> <?php } ?> </ul> </div> <div class="text-center"> <?php echo block('paging', array('urlbase' => mfwRequest::url())); ?> </div> </div> </div> <div class="visible-xs"> <?php echo block('app_infopanel'); ?> </div> <script type="text/javascript"> $('#comment-form form').submit(function(){