/modules/HarborAndSprout/Helpers/GoogleDriveApi.php Highlighted file source
Line 8: use Sprout\Helpers\Url;
Line 46: Url::redirect(sprintf('%s?%s', $config['auth_uri'], http_build_query($params)));
Line 147: * @param string $url API endpoint URL. @see https://developers.google.com/drive/v3/reference/
Line 152: public static function apiRequest($method, $url, $data = null, $headers = false)
Line 175: // Data as request URL params
Line 178: $url .= '?' . http_build_query($data);
Line 181: $resp = json_decode(HttpReq::req($url, $opts, $method == 'POST' ? $data : null), true);
Line 186: $resp['url'] = $url;
/modules/Welcome/Controllers/WelcomeController.php Highlighted file source
Line 37: use Sprout\Helpers\Url;
Line 59: Url::redirect('welcome/checklist');
Line 287: Url::redirect('welcome/db_conf_form');
Line 295: $view->db_config_url = 'welcome/db_conf_database';
Line 298: $view->pass_config_url = 'welcome/db_conf_password';
Line 305: $view->host_config_url = 'welcome/db_conf_hosts';
Line 459: Url::redirect('welcome/checklist');
Line 562: Url::redirect('welcome/super_op_form');
Line 585: Url::redirect('welcome/super_op_form');
Line 597: Url::redirect('welcome/super_op_result?' . http_build_query($params));
Line 611: $view->superop_config_url = 'welcome/super_op_conf';
Line 635: Url::redirect('welcome/checklist');
Line 641: Url::redirect('welcome/checklist');
Line 649: Url::redirect('welcome/checklist');
Line 741: $data['slug'] = Enc::urlname($name);
/skin/default/partials/_hero-banner.php Highlighted file source
Line 12: <img class="hero-banner__img" src="<?= Enc::html(File::resizeUrl($banners[0]['filename'], 'c1600x400-cc~80')); ?>" alt="">
Line 25: <p><a class="button button-large" href="<?= Enc::html(Lnk::url($banners[0]['link'])); ?>"><?= Enc::html($banners[0]['link_label']); ?></a></p>
/skin/default/partials/_hero-banner.php Highlighted file source
Line 12: <img class="hero-banner__img" src="<?= Enc::html(File::resizeUrl($banners[0]['filename'], 'c1600x400-cc~80')); ?>" alt="">
Line 25: <p><a class="button button-large" href="<?= Enc::html(Lnk::url($banners[0]['link'])); ?>"><?= Enc::html($banners[0]['link_label']); ?></a></p>
/skin/harbor/home.php Highlighted file source
Line 8: use Sprout\Helpers\Url;
Line 44: <?php if (!empty($file['url'])): ?><a bp="grid vertical-center" href="<?= Enc::html($file['url']); ?>"><?php else: ?><div bp="grid vertical-center"><?php endif; ?>
Line 48: <?php if (!empty($file['url'])): ?></a><?php else: ?></div><?php endif; ?>
/skin/harbor/home.php Highlighted file source
Line 8: use Sprout\Helpers\Url;
Line 44: <?php if (!empty($file['url'])): ?><a bp="grid vertical-center" href="<?= Enc::html($file['url']); ?>"><?php else: ?><div bp="grid vertical-center"><?php endif; ?>
Line 48: <?php if (!empty($file['url'])): ?></a><?php else: ?></div><?php endif; ?>
/sprout/Controllers/Admin/CategoryAdminController.php Highlighted file source
Line 28: use Sprout\Helpers\Url;
Line 248: Url::redirect('admin/edit/' . $this->controller_name . '/' . $item_id);
Line 337: Url::redirect('admin/delete/' . $this->controller_name . '/' . $id);
Line 441: Url::redirect('admin/contents/' . $this->controller_name);
Line 458: Url::redirect("admin/contents/{$item_name}?_category_id={$category_id}");
Line 500: Url::redirect('admin/contents/' . $this->controller_name);
Line 515: Url::redirect("admin/contents/{$item_name}");
/sprout/Controllers/Admin/CategoryAdminController.php Highlighted file source
Line 28: use Sprout\Helpers\Url;
Line 248: Url::redirect('admin/edit/' . $this->controller_name . '/' . $item_id);
Line 337: Url::redirect('admin/delete/' . $this->controller_name . '/' . $id);
Line 441: Url::redirect('admin/contents/' . $this->controller_name);
Line 458: Url::redirect("admin/contents/{$item_name}?_category_id={$category_id}");
Line 500: Url::redirect('admin/contents/' . $this->controller_name);
Line 515: Url::redirect("admin/contents/{$item_name}");
/sprout/Controllers/Admin/FileAdminController.php Highlighted file source
Line 51: use Sprout\Helpers\Url;
Line 147: $opts['chunk_url'] = 'admin/call/file/ajaxDragdropChunk';
Line 148: $opts['done_url'] = 'admin/call/file/ajaxDragdropDone';
Line 149: $opts['form_url'] = 'admin/call/file/ajaxDragdropForm';
Line 150: $opts['cancel_url'] = 'admin/call/file/ajaxDragdropCancel';
Line 693: 'rel_url' => File::relUrl($filename),
Line 720: $image_url = File::resizeUrl($view->data['filename'], 'r200x0');
Line 721: $image_url .= (strpos($image_url, '?') === false ? '?' : '&');
Line 722: $view->original_image = $image_url . 'version=' . Sprout::randStr(10);
Line 748: 'url' => 'admin/extra/' . $this->controller_name . '/find_usage/' . $item_id,
Line 962: // append size to redirect URL, e.g. file/123/small
Line 1132: $view->url = File::url($row['filename']);
Line 1200: Url::redirect('admin/extra/file/cleanup_invalid');
Line 1204: Url::redirect('admin/intro/file');
Line 1458: $preview = '<img src="' . str_replace('SITE/', '', File::resizeUrl($row['filename'], 'c50x50')) . '">';
Line 1459: $preview_large = str_replace('SITE/', '', File::resizeUrl($row['filename'], 'm400x150'));
Line 1512: Url::redirect('admin/intro/file');
Line 1515: Url::redirect($info['log_url']);
/sprout/Controllers/Admin/FileAdminController.php Highlighted file source
Line 51: use Sprout\Helpers\Url;
Line 147: $opts['chunk_url'] = 'admin/call/file/ajaxDragdropChunk';
Line 148: $opts['done_url'] = 'admin/call/file/ajaxDragdropDone';
Line 149: $opts['form_url'] = 'admin/call/file/ajaxDragdropForm';
Line 150: $opts['cancel_url'] = 'admin/call/file/ajaxDragdropCancel';
Line 693: 'rel_url' => File::relUrl($filename),
Line 720: $image_url = File::resizeUrl($view->data['filename'], 'r200x0');
Line 721: $image_url .= (strpos($image_url, '?') === false ? '?' : '&');
Line 722: $view->original_image = $image_url . 'version=' . Sprout::randStr(10);
Line 748: 'url' => 'admin/extra/' . $this->controller_name . '/find_usage/' . $item_id,
Line 962: // append size to redirect URL, e.g. file/123/small
Line 1132: $view->url = File::url($row['filename']);
Line 1200: Url::redirect('admin/extra/file/cleanup_invalid');
Line 1204: Url::redirect('admin/intro/file');
Line 1458: $preview = '<img src="' . str_replace('SITE/', '', File::resizeUrl($row['filename'], 'c50x50')) . '">';
Line 1459: $preview_large = str_replace('SITE/', '', File::resizeUrl($row['filename'], 'm400x150'));
Line 1512: Url::redirect('admin/intro/file');
Line 1515: Url::redirect($info['log_url']);
/sprout/Controllers/Admin/HasCategoriesAdminController.php Highlighted file source
Line 34: use Sprout\Helpers\Url;
Line 415: foreach ($this->main_actions as $name => $url) {
Line 416: $itemlist->addAction($name, $url, 'button-grey');
Line 837: Url::redirect('admin/contents/' . $this->controller_name);
Line 880: Url::redirect('admin/contents/' . $this->controller_name);
Line 885: Url::redirect('admin/contents/' . $this->controller_name);
Line 890: Url::redirect('admin/extra/' . $this->controller_name . '/multi_categorise' . '?' . http_build_query($_POST));
Line 901: Url::redirect('admin/contents/' . $this->controller_name);
Line 920: Url::redirect('admin/contents/' . $this->controller_name);
/sprout/Controllers/Admin/HasCategoriesAdminController.php Highlighted file source
Line 34: use Sprout\Helpers\Url;
Line 415: foreach ($this->main_actions as $name => $url) {
Line 416: $itemlist->addAction($name, $url, 'button-grey');
Line 837: Url::redirect('admin/contents/' . $this->controller_name);
Line 880: Url::redirect('admin/contents/' . $this->controller_name);
Line 885: Url::redirect('admin/contents/' . $this->controller_name);
Line 890: Url::redirect('admin/extra/' . $this->controller_name . '/multi_categorise' . '?' . http_build_query($_POST));
Line 901: Url::redirect('admin/contents/' . $this->controller_name);
Line 920: Url::redirect('admin/contents/' . $this->controller_name);
/sprout/Controllers/Admin/ManagedAdminController.php Highlighted file source
Line 43: use Sprout\Helpers\Url;
Line 302: Url::redirect('admin/contents/' . $this->controller_name);
Line 1073: foreach ($this->main_actions as $name => $url) {
Line 1074: $itemlist->addAction($name, $url, 'button-grey');
Line 1125: $url = Url::withoutArgs('page') . 'page=' . ($current_page - 1);
Line 1126: $paginate .= "<a class=\"paginate-bar-button paginate-bar-previous button button-blue button-small icon-before icon-keyboard_arrow_left\" href=\"{$url}\">Prev</a>";
Line 1132: $url = Url::withoutArgs('page') . 'page=' . ($current_page + 1);
Line 1133: $paginate .= "<a class=\"paginate-bar-button paginate-bar-next button button-blue button-small icon-after icon-keyboard_arrow_right\" href=\"{$url}\">Next</a>";
Line 1148: $base = Url::withoutArgs('main_mode');
Line 1451: * url => URL to link to, e.g. "admin/delete/thing/$item_id"
Line 1462: 'url' => 'admin/delete/' . $this->controller_name . '/' . $item_id,
Line 1473: * Return the URL to use for the 'view live site' button, when editing a given record
Line 1476: * @return string URL, either absolute or relative
Line 1477: * @return null Default url should be used
Line 1479: public function _getEditLiveUrl($item_id)
Line 1681: 'url' => 'admin/edit/' . $this->controller_name . '/' . $item_id,
Line 1797: Url::redirect('admin/contents/' . $this->controller_name);
Line 1817: Url::redirect('admin/contents/' . $this->controller_name);
Line 1822: Url::redirect('admin/contents/' . $this->controller_name);
Line 1850: Url::redirect('admin/contents/' . $this->controller_name);
/sprout/Controllers/Admin/ManagedAdminController.php Highlighted file source
Line 43: use Sprout\Helpers\Url;
Line 302: Url::redirect('admin/contents/' . $this->controller_name);
Line 1073: foreach ($this->main_actions as $name => $url) {
Line 1074: $itemlist->addAction($name, $url, 'button-grey');
Line 1125: $url = Url::withoutArgs('page') . 'page=' . ($current_page - 1);
Line 1126: $paginate .= "<a class=\"paginate-bar-button paginate-bar-previous button button-blue button-small icon-before icon-keyboard_arrow_left\" href=\"{$url}\">Prev</a>";
Line 1132: $url = Url::withoutArgs('page') . 'page=' . ($current_page + 1);
Line 1133: $paginate .= "<a class=\"paginate-bar-button paginate-bar-next button button-blue button-small icon-after icon-keyboard_arrow_right\" href=\"{$url}\">Next</a>";
Line 1148: $base = Url::withoutArgs('main_mode');
Line 1451: * url => URL to link to, e.g. "admin/delete/thing/$item_id"
Line 1462: 'url' => 'admin/delete/' . $this->controller_name . '/' . $item_id,
Line 1473: * Return the URL to use for the 'view live site' button, when editing a given record
Line 1476: * @return string URL, either absolute or relative
Line 1477: * @return null Default url should be used
Line 1479: public function _getEditLiveUrl($item_id)
Line 1681: 'url' => 'admin/edit/' . $this->controller_name . '/' . $item_id,
Line 1797: Url::redirect('admin/contents/' . $this->controller_name);
Line 1817: Url::redirect('admin/contents/' . $this->controller_name);
Line 1822: Url::redirect('admin/contents/' . $this->controller_name);
Line 1850: Url::redirect('admin/contents/' . $this->controller_name);
/sprout/Controllers/Admin/MySettingsAdminController.php Highlighted file source
Line 25: use Sprout\Helpers\Url;
Line 41: Url::redirect('admin/extra/my_settings/details');
Line 112: Url::redirect('admin/extra/my_settings/details');
Line 131: Url::redirect('admin/extra/my_settings/details');
Line 154: $qr_img = $goog->getQRImageUrl($qr_data);
Line 157: $view->action_url = 'admin/call/my_settings/tfaTotpSetupAction';
Line 163: $view->action_url = 'admin/call/my_settings/tfaDisableAction';
Line 184: Url::redirect('admin/extra/my_settings/twoFactor');
Line 194: Url::redirect('admin/extra/my_settings/twoFactor');
Line 209: Url::redirect('admin/extra/my_settings/twoFactor');
/sprout/Controllers/Admin/MySettingsAdminController.php Highlighted file source
Line 25: use Sprout\Helpers\Url;
Line 41: Url::redirect('admin/extra/my_settings/details');
Line 112: Url::redirect('admin/extra/my_settings/details');
Line 131: Url::redirect('admin/extra/my_settings/details');
Line 154: $qr_img = $goog->getQRImageUrl($qr_data);
Line 157: $view->action_url = 'admin/call/my_settings/tfaTotpSetupAction';
Line 163: $view->action_url = 'admin/call/my_settings/tfaDisableAction';
Line 184: Url::redirect('admin/extra/my_settings/twoFactor');
Line 194: Url::redirect('admin/extra/my_settings/twoFactor');
Line 209: Url::redirect('admin/extra/my_settings/twoFactor');
/sprout/Controllers/Admin/PageAdminController.php Highlighted file source
Line 66: use Sprout\Helpers\Url;
Line 193: 'url' => 'admin/add/page',
Line 198: 'url' => 'admin/add/page?type=tool',
Line 312: Slug::unique(Enc::urlname((string)@$_POST['name'], '-'), 'pages', $conds);
Line 314: $valid->addFieldError('name', 'this will result in a conflicting URL, please try another.');
Line 325: // Tell core AdminController the right URL to redirect to upon validation error
Line 326: $_POST['current_url'] = 'admin/add/page?type=tool';
Line 352: $update_fields['slug'] = Enc::urlname($_POST['name'], '-');
Line 562: Url::redirect("admin/import_upload/page");
Line 565: Url::redirect("admin/import_options/page?timestamp={$timestamp}&ext=xml");
Line 725: $images[$resname] = File::relUrl($image_filename);
Line 793: $update_fields['slug'] = Enc::urlname(trim($node['name']), '-');
Line 863: $view->preview_url = Subsites::getAbsRootAdmin() . 'admin/call/page/preview/' . $item_id;
Line 874: * Return the URL to use for the 'view live site' button, when editing a given record
Line 877: * @return string URL, either absolute or relative
Line 878: * @return null Default url should be used
Line 880: public function _getEditLiveUrl($item_id)
Line 882: return Page::url($item_id);
Line 915: if (empty($page['slug'])) $page['slug'] = Enc::urlname($page['name']);
Line 1396: $replace_to = File::relUrl($replace_to);
Line 1432: 'slug' => 'URL slug',
Line 1526: $update_fields['slug'] = Enc::urlname($_POST['slug'], '-');
Line 1732: $view->url = Sprout::absRoot() . "page/view_specific_rev/{$page_id}/{$rev_id}/{$approval_code}";
Line 1748: $view->url = Sprout::absRoot() . "page/view_specific_rev/{$page_id}/{$rev_id}";
Line 1884: Url::redirect('admin/extra/page/menu_groups');
Line 2003: $url = $node->getFriendlyUrl();
Line 2012: $res = Pdb::q($q, ['live', Pdb::likeEscape($url)], 'pdo');
Line 2017: $match = preg_match('/<a.*?href="' . preg_quote($url, '/') . '".*?>(.+?)<\/a>/', $row->text, $matches);
Line 2041: $items[] = array('id' => $match[1], 'url' => $match[1], 'text' => $match[2]);
Line 2047: 'URL' => 'url',
Line 2529: Url::redirect('admin/extra/page/link_checker');
Line 2534: Url::redirect('admin/extra/page/link_checker');
Line 2545: Url::redirect('admin/extra/page/link_checker');
Line 2549: Url::redirect('admin/extra/page/link_checker_info/' . $info['job_id']);
Line 2660: $url = Page::url($id);
Line 2661: if (!$url) continue;
Line 2663: $url = Subsites::getAbsRoot($row['subsite_id']) . $url;
Line 2670: 'url' => $url,
Line 2688: 'url' => $url,
Line 2739: Url::redirect('admin/intro/page');
/sprout/Controllers/Admin/PageAdminController.php Highlighted file source
Line 66: use Sprout\Helpers\Url;
Line 193: 'url' => 'admin/add/page',
Line 198: 'url' => 'admin/add/page?type=tool',
Line 312: Slug::unique(Enc::urlname((string)@$_POST['name'], '-'), 'pages', $conds);
Line 314: $valid->addFieldError('name', 'this will result in a conflicting URL, please try another.');
Line 325: // Tell core AdminController the right URL to redirect to upon validation error
Line 326: $_POST['current_url'] = 'admin/add/page?type=tool';
Line 352: $update_fields['slug'] = Enc::urlname($_POST['name'], '-');
Line 562: Url::redirect("admin/import_upload/page");
Line 565: Url::redirect("admin/import_options/page?timestamp={$timestamp}&ext=xml");
Line 725: $images[$resname] = File::relUrl($image_filename);
Line 793: $update_fields['slug'] = Enc::urlname(trim($node['name']), '-');
Line 863: $view->preview_url = Subsites::getAbsRootAdmin() . 'admin/call/page/preview/' . $item_id;
Line 874: * Return the URL to use for the 'view live site' button, when editing a given record
Line 877: * @return string URL, either absolute or relative
Line 878: * @return null Default url should be used
Line 880: public function _getEditLiveUrl($item_id)
Line 882: return Page::url($item_id);
Line 915: if (empty($page['slug'])) $page['slug'] = Enc::urlname($page['name']);
Line 1396: $replace_to = File::relUrl($replace_to);
Line 1432: 'slug' => 'URL slug',
Line 1526: $update_fields['slug'] = Enc::urlname($_POST['slug'], '-');
Line 1732: $view->url = Sprout::absRoot() . "page/view_specific_rev/{$page_id}/{$rev_id}/{$approval_code}";
Line 1748: $view->url = Sprout::absRoot() . "page/view_specific_rev/{$page_id}/{$rev_id}";
Line 1884: Url::redirect('admin/extra/page/menu_groups');
Line 2003: $url = $node->getFriendlyUrl();
Line 2012: $res = Pdb::q($q, ['live', Pdb::likeEscape($url)], 'pdo');
Line 2017: $match = preg_match('/<a.*?href="' . preg_quote($url, '/') . '".*?>(.+?)<\/a>/', $row->text, $matches);
Line 2041: $items[] = array('id' => $match[1], 'url' => $match[1], 'text' => $match[2]);
Line 2047: 'URL' => 'url',
Line 2529: Url::redirect('admin/extra/page/link_checker');
Line 2534: Url::redirect('admin/extra/page/link_checker');
Line 2545: Url::redirect('admin/extra/page/link_checker');
Line 2549: Url::redirect('admin/extra/page/link_checker_info/' . $info['job_id']);
Line 2660: $url = Page::url($id);
Line 2661: if (!$url) continue;
Line 2663: $url = Subsites::getAbsRoot($row['subsite_id']) . $url;
Line 2670: 'url' => $url,
Line 2688: 'url' => $url,
Line 2739: Url::redirect('admin/intro/page');
/sprout/Controllers/AdminController.php Highlighted file source
Line 59: use Sprout\Helpers\Url;
Line 90: $admin_url = Replication::adminUrl();
Line 91: if ($admin_url) {
Line 92: Url::redirect($admin_url);
Line 100: Url::redirect('http://' . $domain . Kohana::config('config.site_domain') . Url::current());
Line 139: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 148: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 191: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 200: Url::redirect('admin/login&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 217: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 222: Url::redirect('admin/login-two-factor?redirect=' . $_POST['redirect']);
Line 235: Url::redirect('admin/login');
Line 242: Url::redirect('admin/login');
Line 252: $view->action_url = 'admin/login-two-factor-action';
Line 273: Url::redirect('admin/login');
Line 293: Url::redirect('admin/login-two-factor?redirect=' . $_POST['redirect']);
Line 315: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 323: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 330: if (!empty($_POST['redirect']) and Url::checkRedirect($_POST['redirect'], true)) {
Line 331: Url::redirect($_POST['redirect']);
Line 334: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 354: Url::redirect('admin/login');
Line 396: Url::redirect('admin/intro/my_settings');
Line 398: Url::redirect('admin/intro/' . $first);
Line 432: Url::redirect('admin/dashboard');
Line 592: Url::redirect("admin/export/{$type}");
Line 697: Url::redirect("admin/import_upload/{$type}");
Line 700: Url::redirect("admin/import_options/{$type}?timestamp={$timestamp}");
Line 776: Url::redirect("admin/import_options/{$type}?timestamp={$_POST['timestamp']}&ext={$_POST['ext']}");
Line 784: Url::redirect("admin/contents/{$type}");
Line 840: Url::redirect('admin');
Line 925: * url Link URL
Line 931: * preview URL to set up a preview button
Line 947: $out .= '<a href="' . Enc::html($item['url']) . '" class="' . Enc::html($class) . '"';
Line 1203: if (!empty($_POST['current_url'])) {
Line 1204: Url::redirect($_POST['current_url']);
Line 1206: Url::redirect("admin/add/{$type}");
Line 1229: Url::redirect($result);
Line 1231: Url::redirect("admin/edit/{$type}/{$id}");
Line 1345: $url = $ctlr->_getEditLiveUrl($id);
Line 1346: if ($url) {
Line 1347: $view->live_url = Admin::ensureUrlAbsolute($url);
Line 1386: Url::redirect("admin/edit/{$type}/{$id}");
Line 1410: Url::redirect($result);
Line 1412: Url::redirect("admin/edit/{$type}/{$id}");
Line 1503: Url::redirect("admin/delete/{$type}/{$id}");
Line 1512: Url::redirect("admin/edit/{$type}/{$id}");
Line 1527: Url::redirect("admin/delete/{$type}/{$id}");
Line 1535: Url::redirect($result);
Line 1537: Url::redirect("admin/contents/{$type}");
Line 1728: Url::redirect("admin/duplicate/{$type}/{$orig_id}");
Line 1743: Url::redirect("admin/edit/{$type}/{$id}");
Line 1853: Url::redirect('admin/moderate');
Line 1870: * // Call with url admin/extra/booking/send_email/:record_id
Line 1979: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 1985: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 2036: $view->live_url = Subsites::getAbsRoot($_SESSION['admin']['active_subsite']);
Line 2179: Url::redirect('admin/edit/action_log/' . $log_id);
Line 2191: Url::redirect('admin/edit/' . Enc::url($ctlr->getControllerName()) . '/' . $main_record['record_id']);
Line 2193: Url::redirect('admin/edit/action_log/' . $log_id);
/sprout/Controllers/AdminController.php Highlighted file source
Line 59: use Sprout\Helpers\Url;
Line 90: $admin_url = Replication::adminUrl();
Line 91: if ($admin_url) {
Line 92: Url::redirect($admin_url);
Line 100: Url::redirect('http://' . $domain . Kohana::config('config.site_domain') . Url::current());
Line 139: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 148: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 191: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 200: Url::redirect('admin/login&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 217: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 222: Url::redirect('admin/login-two-factor?redirect=' . $_POST['redirect']);
Line 235: Url::redirect('admin/login');
Line 242: Url::redirect('admin/login');
Line 252: $view->action_url = 'admin/login-two-factor-action';
Line 273: Url::redirect('admin/login');
Line 293: Url::redirect('admin/login-two-factor?redirect=' . $_POST['redirect']);
Line 315: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 323: Url::redirect('admin/login?username=' . Enc::url($_POST['Username']) . '&redirect=' . Enc::url($_POST['redirect']) . '&nomsg=1');
Line 330: if (!empty($_POST['redirect']) and Url::checkRedirect($_POST['redirect'], true)) {
Line 331: Url::redirect($_POST['redirect']);
Line 334: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 354: Url::redirect('admin/login');
Line 396: Url::redirect('admin/intro/my_settings');
Line 398: Url::redirect('admin/intro/' . $first);
Line 432: Url::redirect('admin/dashboard');
Line 592: Url::redirect("admin/export/{$type}");
Line 697: Url::redirect("admin/import_upload/{$type}");
Line 700: Url::redirect("admin/import_options/{$type}?timestamp={$timestamp}");
Line 776: Url::redirect("admin/import_options/{$type}?timestamp={$_POST['timestamp']}&ext={$_POST['ext']}");
Line 784: Url::redirect("admin/contents/{$type}");
Line 840: Url::redirect('admin');
Line 925: * url Link URL
Line 931: * preview URL to set up a preview button
Line 947: $out .= '<a href="' . Enc::html($item['url']) . '" class="' . Enc::html($class) . '"';
Line 1203: if (!empty($_POST['current_url'])) {
Line 1204: Url::redirect($_POST['current_url']);
Line 1206: Url::redirect("admin/add/{$type}");
Line 1229: Url::redirect($result);
Line 1231: Url::redirect("admin/edit/{$type}/{$id}");
Line 1345: $url = $ctlr->_getEditLiveUrl($id);
Line 1346: if ($url) {
Line 1347: $view->live_url = Admin::ensureUrlAbsolute($url);
Line 1386: Url::redirect("admin/edit/{$type}/{$id}");
Line 1410: Url::redirect($result);
Line 1412: Url::redirect("admin/edit/{$type}/{$id}");
Line 1503: Url::redirect("admin/delete/{$type}/{$id}");
Line 1512: Url::redirect("admin/edit/{$type}/{$id}");
Line 1527: Url::redirect("admin/delete/{$type}/{$id}");
Line 1535: Url::redirect($result);
Line 1537: Url::redirect("admin/contents/{$type}");
Line 1728: Url::redirect("admin/duplicate/{$type}/{$orig_id}");
Line 1743: Url::redirect("admin/edit/{$type}/{$id}");
Line 1853: Url::redirect('admin/moderate');
Line 1870: * // Call with url admin/extra/booking/send_email/:record_id
Line 1979: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 1985: Url::redirect(Kohana::config('sprout.admin_intro'));
Line 2036: $view->live_url = Subsites::getAbsRoot($_SESSION['admin']['active_subsite']);
Line 2179: Url::redirect('admin/edit/action_log/' . $log_id);
Line 2191: Url::redirect('admin/edit/' . Enc::url($ctlr->getControllerName()) . '/' . $main_record['record_id']);
Line 2193: Url::redirect('admin/edit/action_log/' . $log_id);
/sprout/Controllers/ContentSubscribeController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 64: Url::redirect('result/error');
Line 121: Url::redirect('result/error');
Line 127: Url::redirect("content_subscribe/unsub/{$id}/{$code}");
Line 145: Url::redirect('result/error');
Line 229: // Set the URL as the key for each item
Line 233: $uniq_result[$row['url']] = $row;
Line 268: if ($row['url'][0] == '/') {
Line 269: $row['url'] = Subsites::getAbsRoot($subsite['id']) . ltrim($row['url'], '/');
Line 276: $view->unsubscribe_url = Subsites::getAbsRoot($subsite['id']) . "content_subscribe/unsub/{$deets['id']}/{$deets['code']}";
/sprout/Controllers/ContentSubscribeController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 64: Url::redirect('result/error');
Line 121: Url::redirect('result/error');
Line 127: Url::redirect("content_subscribe/unsub/{$id}/{$code}");
Line 145: Url::redirect('result/error');
Line 229: // Set the URL as the key for each item
Line 233: $uniq_result[$row['url']] = $row;
Line 268: if ($row['url'][0] == '/') {
Line 269: $row['url'] = Subsites::getAbsRoot($subsite['id']) . ltrim($row['url'], '/');
Line 276: $view->unsubscribe_url = Subsites::getAbsRoot($subsite['id']) . "content_subscribe/unsub/{$deets['id']}/{$deets['code']}";
/sprout/Controllers/DbToolsController.php Highlighted file source
Line 68: use Sprout\Helpers\Url;
Line 89: [ 'url' => 'dbtools/sql', 'name' => 'SQL', 'desc' => 'Allows the user to execute SQL queries' ],
Line 90: [ 'url' => 'dbtools/sync', 'name' => 'Database sync', 'desc' => 'Syncs the db structure to match db_struct.xml' ],
Line 91: [ 'url' => 'dbtools/struct', 'name' => 'View db structure', 'desc' => 'Shows table and column definitions' ],
Line 92: [ 'url' => 'dbtools/testSkinTemplates', 'name' => 'Test skin templates', 'desc' => 'Simple tool for testing skin templates' ],
Line 93: [ 'url' => 'dbtools/sessionEditor', 'name' => 'Session editor', 'desc' => 'Edit the $_SESSION' ],
Line 94: [ 'url' => 'dbtools/listRoutes', 'name' => 'Routes inspector', 'desc' => 'View a list of routes' ],
Line 95: [ 'url' => 'admin/extra/worker_job/manual_run', 'name' => 'Manual run worker job', 'desc' => 'Manually run a worker job in a browser' ],
Line 96: [ 'url' => 'admin/extra/cron_job/manual_run', 'name' => 'Manual run cron job', 'desc' => 'Manually run a cron job in a browser' ],
Line 97: [ 'url' => 'admin/style_guide', 'name' => 'Admin style guide', 'desc' => 'View styles of various admin features - form fields, etc' ],
Line 100: [ 'url' => 'dbtools/moduleBuilder', 'name' => 'Module builder', 'desc' => 'Generates blank modules' ],
Line 101: [ 'url' => 'dbtools/moduleBuilderDb', 'name' => 'Database struct generator', 'desc' => 'Generates db_struct.xml content for a module' ],
Line 102: [ 'url' => 'dbtools/moduleBuilderExisting', 'name' => 'Module builder from existing', 'desc' => 'Generates modules from an existing db_struct.xml file' ],
Line 103: [ 'url' => 'dbtools/multimake', 'name' => 'Generate multiedit', 'desc' => 'Generate multiedit code' ],
Line 106: [ 'url' => 'dbtools/info', 'name' => 'Env and PHP info', 'desc' => 'Sprout information + phpinfo()' ],
Line 107: [ 'url' => 'dbtools/varDump', 'name' => 'Var dump', 'desc' => 'View session, cookie & server data'],
Line 108: [ 'url' => 'dbtools/email', 'name' => 'Test email', 'desc' => 'Renders form to send emails' ],
Line 109: [ 'url' => 'dbtools/launchChecks', 'name' => 'Launch checks', 'desc' => 'Run a series of self-tests to ensure everything is configured correctly' ],
Line 110: [ 'url' => 'admin/user-agent', 'name' => 'User agent tool', 'desc' => 'Show browser information<br><span>(this link doesn\'t require auth)</span>' ],
Line 111: [ 'url' => 'dbtools/generatePasswordHash', 'name' => 'Generate password hash', 'desc' => 'Generate a password hash to store in a config file' ],
Line 112: [ 'url' => 'dbtools/bcryptSpeed', 'name' => 'Test hashing speed', 'desc' => 'Test hasing speed of bcrypt' ],
Line 113: [ 'url' => 'dbtools/fileTypesIndexingSupport', 'name' => 'File indexing support', 'desc' => 'List of file types which can be indexed for full-text search' ],
Line 116: [ 'url' => 'dbtools/exceptionLog', 'name' => 'Exception log', 'desc' => 'Browse and search exceptions' ],
Line 117: [ 'url' => 'admin/intro/cron_job', 'name' => 'Cron job log', 'desc' => 'Cron (scheduled task) log' ],
Line 118: [ 'url' => 'admin/intro/worker_job', 'name' => 'Worker job log', 'desc' => 'Log of worker (background) processes' ],
Line 121: [ 'url' => 'dbtools/exportFiles', 'name' => 'Export files', 'desc' => 'Exports all files' ],
Line 122: [ 'url' => 'dbtools/exportTables', 'name' => 'Export database', 'desc' => 'Export tables to an SQL file' ],
Line 123: [ 'url' => 'dbtools/importFiles', 'name' => 'Import files', 'desc' => 'Imports a files into the cms' ],
Line 124: [ 'url' => 'dbtools/importTables', 'name' => 'Import database', 'desc' => 'Import database tables from a .sql file' ],
Line 125: [ 'url' => 'dbtools/importXML', 'name' => 'Import XML', 'desc' => 'Import Sprout2 CMS export' ],
Line 144: Url::redirect('admin');
Line 170: 'url' => sprintf('dbtools/api/%s/%s', Enc::url($api['class']), Enc::url($api['method'])),
Line 203: $view->live_url = '';
Line 711: Url::redirect('dbtools/sql');
Line 814: Url::redirect('dbtools/importOptions?tempname=' . Enc::url($tempname));
Line 1221: $f_url = basename($temp_filename . $f);
Line 1222: echo "<p><a href=\"SITE/dbtools/gettempfile/export-database/{$f_url}/{$f}\">{$f}</a></p>";
Line 1263: Url::redirect('dbtools/importFiles');
Line 1268: Url::redirect('dbtools/importFiles');
Line 1488: echo '<input type="hidden" name="key[]" value="' . Enc::url($k) . '">';
Line 1591: Url::redirect('dbtools/sessionEditor');
Line 1948: Url::redirect('dbtools/moduleBuilderExistingForm/' . $filename);
Line 2025: Url::redirect('/dbtools/moduleBuilderExistingForm/' . $input_xml);
Line 2114: if (in_array(strtolower($l_part), ['url', 'gst'])) {
Line 2422: $url = '/dbtools/testSkinTemplatesAction/' . Enc::url($s) . '/' . Enc::url($f);
Line 2424: echo '<p><a href="' . Enc::html($url) . '">' . Enc::html($f) . '</a></p>';
Line 2794: Url::redirect('dbtools/email');
Line 2893: Url::redirect('dbtools/importXML');
Line 2900: Url::redirect('dbtools/importXML');
Line 2911: Url::redirect('dbtools/importXML');
Line 2975: preg_match('/dbtools\/api\/([a-zA-Z0-9_\%]+)\/([a-zA-Z0-9_\%]+)/', $api['url'], $matches);
Line 2977: if ((!empty($matches[1]) and urldecode($matches[1]) == $class) and (!empty($matches[2]) and urldecode($matches[2]) == $method)) {
Line 2996: $view->img = sprintf('%sdbtools/qrCodeImage?payload=%s', Sprout::absRoot(), Enc::url($_GET['payload']));
Line 3010: QrCode::render(urldecode($_GET['payload']));
/sprout/Controllers/DbToolsController.php Highlighted file source
Line 68: use Sprout\Helpers\Url;
Line 89: [ 'url' => 'dbtools/sql', 'name' => 'SQL', 'desc' => 'Allows the user to execute SQL queries' ],
Line 90: [ 'url' => 'dbtools/sync', 'name' => 'Database sync', 'desc' => 'Syncs the db structure to match db_struct.xml' ],
Line 91: [ 'url' => 'dbtools/struct', 'name' => 'View db structure', 'desc' => 'Shows table and column definitions' ],
Line 92: [ 'url' => 'dbtools/testSkinTemplates', 'name' => 'Test skin templates', 'desc' => 'Simple tool for testing skin templates' ],
Line 93: [ 'url' => 'dbtools/sessionEditor', 'name' => 'Session editor', 'desc' => 'Edit the $_SESSION' ],
Line 94: [ 'url' => 'dbtools/listRoutes', 'name' => 'Routes inspector', 'desc' => 'View a list of routes' ],
Line 95: [ 'url' => 'admin/extra/worker_job/manual_run', 'name' => 'Manual run worker job', 'desc' => 'Manually run a worker job in a browser' ],
Line 96: [ 'url' => 'admin/extra/cron_job/manual_run', 'name' => 'Manual run cron job', 'desc' => 'Manually run a cron job in a browser' ],
Line 97: [ 'url' => 'admin/style_guide', 'name' => 'Admin style guide', 'desc' => 'View styles of various admin features - form fields, etc' ],
Line 100: [ 'url' => 'dbtools/moduleBuilder', 'name' => 'Module builder', 'desc' => 'Generates blank modules' ],
Line 101: [ 'url' => 'dbtools/moduleBuilderDb', 'name' => 'Database struct generator', 'desc' => 'Generates db_struct.xml content for a module' ],
Line 102: [ 'url' => 'dbtools/moduleBuilderExisting', 'name' => 'Module builder from existing', 'desc' => 'Generates modules from an existing db_struct.xml file' ],
Line 103: [ 'url' => 'dbtools/multimake', 'name' => 'Generate multiedit', 'desc' => 'Generate multiedit code' ],
Line 106: [ 'url' => 'dbtools/info', 'name' => 'Env and PHP info', 'desc' => 'Sprout information + phpinfo()' ],
Line 107: [ 'url' => 'dbtools/varDump', 'name' => 'Var dump', 'desc' => 'View session, cookie & server data'],
Line 108: [ 'url' => 'dbtools/email', 'name' => 'Test email', 'desc' => 'Renders form to send emails' ],
Line 109: [ 'url' => 'dbtools/launchChecks', 'name' => 'Launch checks', 'desc' => 'Run a series of self-tests to ensure everything is configured correctly' ],
Line 110: [ 'url' => 'admin/user-agent', 'name' => 'User agent tool', 'desc' => 'Show browser information<br><span>(this link doesn\'t require auth)</span>' ],
Line 111: [ 'url' => 'dbtools/generatePasswordHash', 'name' => 'Generate password hash', 'desc' => 'Generate a password hash to store in a config file' ],
Line 112: [ 'url' => 'dbtools/bcryptSpeed', 'name' => 'Test hashing speed', 'desc' => 'Test hasing speed of bcrypt' ],
Line 113: [ 'url' => 'dbtools/fileTypesIndexingSupport', 'name' => 'File indexing support', 'desc' => 'List of file types which can be indexed for full-text search' ],
Line 116: [ 'url' => 'dbtools/exceptionLog', 'name' => 'Exception log', 'desc' => 'Browse and search exceptions' ],
Line 117: [ 'url' => 'admin/intro/cron_job', 'name' => 'Cron job log', 'desc' => 'Cron (scheduled task) log' ],
Line 118: [ 'url' => 'admin/intro/worker_job', 'name' => 'Worker job log', 'desc' => 'Log of worker (background) processes' ],
Line 121: [ 'url' => 'dbtools/exportFiles', 'name' => 'Export files', 'desc' => 'Exports all files' ],
Line 122: [ 'url' => 'dbtools/exportTables', 'name' => 'Export database', 'desc' => 'Export tables to an SQL file' ],
Line 123: [ 'url' => 'dbtools/importFiles', 'name' => 'Import files', 'desc' => 'Imports a files into the cms' ],
Line 124: [ 'url' => 'dbtools/importTables', 'name' => 'Import database', 'desc' => 'Import database tables from a .sql file' ],
Line 125: [ 'url' => 'dbtools/importXML', 'name' => 'Import XML', 'desc' => 'Import Sprout2 CMS export' ],
Line 144: Url::redirect('admin');
Line 170: 'url' => sprintf('dbtools/api/%s/%s', Enc::url($api['class']), Enc::url($api['method'])),
Line 203: $view->live_url = '';
Line 711: Url::redirect('dbtools/sql');
Line 814: Url::redirect('dbtools/importOptions?tempname=' . Enc::url($tempname));
Line 1221: $f_url = basename($temp_filename . $f);
Line 1222: echo "<p><a href=\"SITE/dbtools/gettempfile/export-database/{$f_url}/{$f}\">{$f}</a></p>";
Line 1263: Url::redirect('dbtools/importFiles');
Line 1268: Url::redirect('dbtools/importFiles');
Line 1488: echo '<input type="hidden" name="key[]" value="' . Enc::url($k) . '">';
Line 1591: Url::redirect('dbtools/sessionEditor');
Line 1948: Url::redirect('dbtools/moduleBuilderExistingForm/' . $filename);
Line 2025: Url::redirect('/dbtools/moduleBuilderExistingForm/' . $input_xml);
Line 2114: if (in_array(strtolower($l_part), ['url', 'gst'])) {
Line 2422: $url = '/dbtools/testSkinTemplatesAction/' . Enc::url($s) . '/' . Enc::url($f);
Line 2424: echo '<p><a href="' . Enc::html($url) . '">' . Enc::html($f) . '</a></p>';
Line 2794: Url::redirect('dbtools/email');
Line 2893: Url::redirect('dbtools/importXML');
Line 2900: Url::redirect('dbtools/importXML');
Line 2911: Url::redirect('dbtools/importXML');
Line 2975: preg_match('/dbtools\/api\/([a-zA-Z0-9_\%]+)\/([a-zA-Z0-9_\%]+)/', $api['url'], $matches);
Line 2977: if ((!empty($matches[1]) and urldecode($matches[1]) == $class) and (!empty($matches[2]) and urldecode($matches[2]) == $method)) {
Line 2996: $view->img = sprintf('%sdbtools/qrCodeImage?payload=%s', Sprout::absRoot(), Enc::url($_GET['payload']));
Line 3010: QrCode::render(urldecode($_GET['payload']));
/sprout/Controllers/EmailShareController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 51: * Validate that a given URL is absolute and for this site
Line 56: * @param string $url
Line 59: private static function validateUrl($url)
Line 61: $parts = parse_url($url);
Line 63: // Require an absolute url, i.e. has a scheme and a host
Line 86: if (empty($data['url']) and !empty($_GET['url'])) {
Line 87: if (self::validateUrl($_GET['url'])) {
Line 88: $data['url'] = $_GET['url'];
Line 90: throw new Exception('Invalid URL');
Line 97: } else if (!empty($data['url'])) {
Line 98: $data['title'] = $data['url'];
Line 102: if (empty($data['url'])) {
Line 103: Notification::error('No URL to share');
Line 104: Url::redirect('result/error');
Line 141: $_POST['url'] = trim(@$_POST['url']);
Line 146: if (!self::validateUrl($_POST['url'])) {
Line 147: throw new Exception('Invalid URL');
Line 153: $valid->required(['url', 'their_name', 'their_email']);
Line 155: $valid->check('url', 'Validity::length', 0, 255);
Line 173: Url::redirect('email_share/share');
Line 180: $view->page_url = $_POST['url'];
Line 194: Url::redirect ('email_share/thanks?url=' . Enc::url($_POST['url']));
Line 205: if (empty($_GET['url']) or strpos($_GET['url'], $siteRoot) !== 0) {
Line 206: Notification::error('The URL you provided appears invalid');
Line 207: Url::redirect ('');
Line 211: $form->url = $_GET['url'];
/sprout/Controllers/EmailShareController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 51: * Validate that a given URL is absolute and for this site
Line 56: * @param string $url
Line 59: private static function validateUrl($url)
Line 61: $parts = parse_url($url);
Line 63: // Require an absolute url, i.e. has a scheme and a host
Line 86: if (empty($data['url']) and !empty($_GET['url'])) {
Line 87: if (self::validateUrl($_GET['url'])) {
Line 88: $data['url'] = $_GET['url'];
Line 90: throw new Exception('Invalid URL');
Line 97: } else if (!empty($data['url'])) {
Line 98: $data['title'] = $data['url'];
Line 102: if (empty($data['url'])) {
Line 103: Notification::error('No URL to share');
Line 104: Url::redirect('result/error');
Line 141: $_POST['url'] = trim(@$_POST['url']);
Line 146: if (!self::validateUrl($_POST['url'])) {
Line 147: throw new Exception('Invalid URL');
Line 153: $valid->required(['url', 'their_name', 'their_email']);
Line 155: $valid->check('url', 'Validity::length', 0, 255);
Line 173: Url::redirect('email_share/share');
Line 180: $view->page_url = $_POST['url'];
Line 194: Url::redirect ('email_share/thanks?url=' . Enc::url($_POST['url']));
Line 205: if (empty($_GET['url']) or strpos($_GET['url'], $siteRoot) !== 0) {
Line 206: Notification::error('The URL you provided appears invalid');
Line 207: Url::redirect ('');
Line 211: $form->url = $_GET['url'];
/sprout/Controllers/FileController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 260: * Redirect to the resize url
Line 261: * This allows JS code to use a common URL without needing to be aware of which FilesBackend is in use
Line 268: Url::redirect(str_replace('SITE/', '', File::resizeUrl($filename, $size)));
Line 284: $view->filename = File::url($filename);
/sprout/Controllers/FileController.php Highlighted file source
Line 29: use Sprout\Helpers\Url;
Line 260: * Redirect to the resize url
Line 261: * This allows JS code to use a common URL without needing to be aware of which FilesBackend is in use
Line 268: Url::redirect(str_replace('SITE/', '', File::resizeUrl($filename, $size)));
Line 284: $view->filename = File::url($filename);
/sprout/Controllers/MultiStepFormController.php Highlighted file source
Line 24: use Sprout\Helpers\Url;
Line 86: $view->submit_url = "{$this->route}/submit/{$step}";
Line 156: Url::redirect($this->buildUrl($step));
Line 182: Url::redirect($this->buildUrl($session_step));
Line 228: Url::redirect($this->buildUrl($step));
Line 235: * Builds a URL to the form at a particular step
Line 238: * @return string the URL
Line 240: protected function buildUrl($step, $include_first = false)
Line 242: $url = $this->route;
Line 244: $url .= "/{$step}";
Line 246: return $url;
Line 261: Url::redirect("{$this->route}/{$this->complete_function}");
Line 268: Url::redirect($this->build_url(end($keys)));
/sprout/Controllers/MultiStepFormController.php Highlighted file source
Line 24: use Sprout\Helpers\Url;
Line 86: $view->submit_url = "{$this->route}/submit/{$step}";
Line 156: Url::redirect($this->buildUrl($step));
Line 182: Url::redirect($this->buildUrl($session_step));
Line 228: Url::redirect($this->buildUrl($step));
Line 235: * Builds a URL to the form at a particular step
Line 238: * @return string the URL
Line 240: protected function buildUrl($step, $include_first = false)
Line 242: $url = $this->route;
Line 244: $url .= "/{$step}";
Line 246: return $url;
Line 261: Url::redirect("{$this->route}/{$this->complete_function}");
Line 268: Url::redirect($this->build_url(end($keys)));
/sprout/Controllers/PageController.php Highlighted file source
Line 45: use Sprout\Helpers\Url;
Line 71: * @param string $name The URL of the page to display
Line 140: // URL redirect
Line 141: Url::redirect(Lnk::url($page['redirect']));
Line 263: // Load the ancestors for the page node and get the name (and url name) of the top-level ancestor
Line 267: $page_view->top_level_urlname = $anc[0]->getUrlName();
Line 273: $_GET['redirect'] = Url::current(true);
Line 310: $page_view->canonical_url = Page::url($page['id']);
Line 350: SocialMeta::setUrl($this->navigation_node->getFriendlyUrlNoPrefix());
Line 438: $url = $node->getFriendlyUrl();
Line 478: $view->url = $url;
Line 502: Url::redirect();
Line 507: Url::redirect();
Line 520: Url::redirect();
Line 525: Url::redirect(Page::url($rev['page_id']));
Line 528: Url::redirect();
Line 536: // N.B. Fetch URL after updating DB, as slugs may change with revisions
Line 537: $url = Subsites::getAbsRoot($rev['subsite_id']) . Page::url($rev['page_id']);
Line 544: $view->url = $url;
Line 556: Url::redirect($url);
Line 560: $url = Subsites::getAbsRoot($rev['subsite_id']) . Page::url($rev['page_id']);
Line 567: $view->url = $url;
Line 579: Url::redirect($url);
/sprout/Controllers/PageController.php Highlighted file source
Line 45: use Sprout\Helpers\Url;
Line 71: * @param string $name The URL of the page to display
Line 140: // URL redirect
Line 141: Url::redirect(Lnk::url($page['redirect']));
Line 263: // Load the ancestors for the page node and get the name (and url name) of the top-level ancestor
Line 267: $page_view->top_level_urlname = $anc[0]->getUrlName();
Line 273: $_GET['redirect'] = Url::current(true);
Line 310: $page_view->canonical_url = Page::url($page['id']);
Line 350: SocialMeta::setUrl($this->navigation_node->getFriendlyUrlNoPrefix());
Line 438: $url = $node->getFriendlyUrl();
Line 478: $view->url = $url;
Line 502: Url::redirect();
Line 507: Url::redirect();
Line 520: Url::redirect();
Line 525: Url::redirect(Page::url($rev['page_id']));
Line 528: Url::redirect();
Line 536: // N.B. Fetch URL after updating DB, as slugs may change with revisions
Line 537: $url = Subsites::getAbsRoot($rev['subsite_id']) . Page::url($rev['page_id']);
Line 544: $view->url = $url;
Line 556: Url::redirect($url);
Line 560: $url = Subsites::getAbsRoot($rev['subsite_id']) . Page::url($rev['page_id']);
Line 567: $view->url = $url;
Line 579: Url::redirect($url);
/sprout/Helpers/Admin.php Highlighted file source
Line 49: 'check_redirect' => 'URL must begin with http:// (external url) or / (internal url)',
Line 284: * @param array $actions Additional links to show in the cog icon menu; keys: url, class, name
Line 315: $url = str_replace('%%', $node['id'], $action['url']);
Line 316: echo "<a class=\"node-link\" href=\"{$url}\">{$name}</a>";
Line 326: $url = str_replace('%%', $node['id'], $action['url']);
Line 328: echo "<li class=\"{$class}\"><a href=\"", Enc::html($url), "\">", Enc::html($action['name']), "</a></li>";
Line 677: $dashboard_url = Enc::html(Kohana::config('sprout.admin_intro'));
Line 679: echo '<li class="home depth-1 on"><a href="', $dashboard_url, '">Home</a></li>';
Line 681: echo '<li class="home depth-1"><a href="', $dashboard_url, '">Home</a></li>';
Line 1024: * For a given URL, ensure it's absolute.
Line 1027: * @param string $url Either relative or absolute
Line 1028: * @return string Absolute URL
Line 1030: public static function ensureUrlAbsolute($url)
Line 1032: if (preg_match('!^https?://!', $url)) {
Line 1033: return $url;
Line 1035: return Subsites::getAbsRoot($_SESSION['admin']['active_subsite']) . ltrim($url, '/');
/sprout/Helpers/ContentReplace.php Highlighted file source
Line 64: * Replace links to internal pages in the format page/view_by_id/... with the page's friendly url
Line 82: return '<a ' . $matches[1] . 'href="' . $node->getFriendlyUrl() . '"';
Line 320: * Replaces an expando with a link to the specified URL
Line 324: * The lunk url is optional. If not provided, no link gets appended.
Line 327: * @param string $url A url for the link which gets appended to the end.
Line 329: public static function expandolink($html, $url = null)
Line 370: if ($url) {
Line 371: $html .= "<p><a href=\"{$url}\">More information</a></p>";
Line 379: * Replace anchors without a URL (e.g. href="#top") to include the page URL to fix issues with BASE HREF
Line 383: return str_replace('href="#', 'href="' . Url::current() . '#', $text);
Line 397: * Replace file URLs that refer to IDs with URLs which refer to filenames
Line 427: // [0] Everything from start of tag to end of file download URL
Line 428: // [1] Everything from the start of the tag up to the " at the start of the URL
Line 438: return $matches[1] . File::url($filename);
/sprout/Helpers/ContentReplace.php Highlighted file source
Line 64: * Replace links to internal pages in the format page/view_by_id/... with the page's friendly url
Line 82: return '<a ' . $matches[1] . 'href="' . $node->getFriendlyUrl() . '"';
Line 320: * Replaces an expando with a link to the specified URL
Line 324: * The lunk url is optional. If not provided, no link gets appended.
Line 327: * @param string $url A url for the link which gets appended to the end.
Line 329: public static function expandolink($html, $url = null)
Line 370: if ($url) {
Line 371: $html .= "<p><a href=\"{$url}\">More information</a></p>";
Line 379: * Replace anchors without a URL (e.g. href="#top") to include the page URL to fix issues with BASE HREF
Line 383: return str_replace('href="#', 'href="' . Url::current() . '#', $text);
Line 397: * Replace file URLs that refer to IDs with URLs which refer to filenames
Line 427: // [0] Everything from start of tag to end of file download URL
Line 428: // [1] Everything from the start of the tag up to the " at the start of the URL
Line 438: return $matches[1] . File::url($filename);
/sprout/Helpers/EmbedVideo.php Highlighted file source
Line 30: * Return HTML for embedding a video, based on the URL.
Line 37: * @param string $url
Line 42: public static function renderEmbed($url, $width = 400, $height = 300, array $options = array()) {
Line 43: $url = trim(Enc::cleanfunky($url));
Line 47: $idtype = self::getVideoIdType($url);
Line 50: // Determine URL for player
Line 54: $embed_url = '//www.youtube.com/embed/' . $video_id . '?rel=0&wmode=transparent';
Line 58: $embed_url = '//player.vimeo.com/video/' . $video_id . '?title=0&byline=0&portrait=0&color=00ADEF&fullscreen=0';
Line 64: $embed_url .= '&autoplay=1';
Line 74: . 'src="' . Enc::html($embed_url) . '" '
Line 77: . '<a href="' . Enc::html($url) . '">Watch video</a>'
Line 83: * Get a thumbnail as a full absolute URL)
Line 87: public static function getThumbFilename($url, $quality = 1)
Line 89: $url = trim($url);
Line 91: $idtype = self::getVideoIdType($url);
Line 123: * Return the URL for our dynamic thumbnail resizer for a given video url
Line 125: * Arguments are the same as `File::resizeUrl`
Line 128: public static function resizedThumb($url, $sizespec)
Line 130: $url = trim($url);
Line 132: $idtype = self::getVideoIdType($url);
Line 142: * Parse the URL into a video-id and type
Line 144: public static function getVideoIdType($url)
Line 146: $url = Enc::cleanfunky($url);
Line 147: if (! preg_match('!^https?://!', $url)) return null;
Line 149: // Get the host of the URL
Line 150: $urlparts = parse_url($url);
Line 151: if (! $urlparts['host']) return null;
Line 153: if (strpos($urlparts['host'], 'youtube.com') !== false) {
Line 155: if (strpos($urlparts['path'], '/v/') === 0) {
Line 156: return array(self::TYPE_YOUTUBE, substr($urlparts['path'], 3));
Line 159: $query_parts = explode('&', @$urlparts['query']);
Line 168: } else if (strpos($urlparts['host'], 'youtu.be') !== false) {
Line 170: $path = parse_url ($url, PHP_URL_PATH);
Line 174: } else if (strpos($urlparts['host'], 'vimeo.com') !== false) {
Line 176: $path = preg_replace('/[^0-9]/', '', $urlparts['path']);
/sprout/Helpers/EmbedVideo.php Highlighted file source
Line 30: * Return HTML for embedding a video, based on the URL.
Line 37: * @param string $url
Line 42: public static function renderEmbed($url, $width = 400, $height = 300, array $options = array()) {
Line 43: $url = trim(Enc::cleanfunky($url));
Line 47: $idtype = self::getVideoIdType($url);
Line 50: // Determine URL for player
Line 54: $embed_url = '//www.youtube.com/embed/' . $video_id . '?rel=0&wmode=transparent';
Line 58: $embed_url = '//player.vimeo.com/video/' . $video_id . '?title=0&byline=0&portrait=0&color=00ADEF&fullscreen=0';
Line 64: $embed_url .= '&autoplay=1';
Line 74: . 'src="' . Enc::html($embed_url) . '" '
Line 77: . '<a href="' . Enc::html($url) . '">Watch video</a>'
Line 83: * Get a thumbnail as a full absolute URL)
Line 87: public static function getThumbFilename($url, $quality = 1)
Line 89: $url = trim($url);
Line 91: $idtype = self::getVideoIdType($url);
Line 123: * Return the URL for our dynamic thumbnail resizer for a given video url
Line 125: * Arguments are the same as `File::resizeUrl`
Line 128: public static function resizedThumb($url, $sizespec)
Line 130: $url = trim($url);
Line 132: $idtype = self::getVideoIdType($url);
Line 142: * Parse the URL into a video-id and type
Line 144: public static function getVideoIdType($url)
Line 146: $url = Enc::cleanfunky($url);
Line 147: if (! preg_match('!^https?://!', $url)) return null;
Line 149: // Get the host of the URL
Line 150: $urlparts = parse_url($url);
Line 151: if (! $urlparts['host']) return null;
Line 153: if (strpos($urlparts['host'], 'youtube.com') !== false) {
Line 155: if (strpos($urlparts['path'], '/v/') === 0) {
Line 156: return array(self::TYPE_YOUTUBE, substr($urlparts['path'], 3));
Line 159: $query_parts = explode('&', @$urlparts['query']);
Line 168: } else if (strpos($urlparts['host'], 'youtu.be') !== false) {
Line 170: $path = parse_url ($url, PHP_URL_PATH);
Line 174: } else if (strpos($urlparts['host'], 'vimeo.com') !== false) {
Line 176: $path = preg_replace('/[^0-9]/', '', $urlparts['path']);
/sprout/Helpers/Fb.php Highlighted file source
Line 400: * - 'begin_url' (string)
Line 401: * - 'form_url' (string)
Line 402: * - 'done_url' (string)
Line 403: * - 'cancel_url' (string)
Line 422: 'begin_url' => 'file_upload/upload_begin',
Line 423: 'form_url' => 'file_upload/upload_form',
Line 424: 'chunk_url' => 'file_upload/upload_chunk',
Line 425: 'done_url' => 'file_upload/upload_done',
Line 426: 'cancel_url' => 'file_upload/upload_cancel',
Line 641: $out .= '<img src="' . Enc::html(File::resizeUrl($value, 'c50x50')) . '" alt="">';
Line 793: * Expects to be provided AJAX data in a format defined by jQuery UI (see 'url' option below).
Line 797: * The URL which handles the lookups needs to use the 'term' GET param to find matching values.
Line 799: * A call to the URL should return JSON which contains an array of hashes, each with the following keys:
Line 809: * 'url' (string, required) URL to access when fetching matches via AJAX.
Line 811: * label for display upon page by calling the URL with the 'id' GET param set
Line 821: if (empty($options['url'])) {
Line 822: throw new InvalidArgumentException("\$options['url'] must be specified");
Line 834: self::addAttr($attrs, 'data-lookup-url', $options['url']);
Line 862: * 'url' (string) ajax called endpoint to populate autocomplete list
Line 887: self::addAttr($attrs, 'data-url', $options['url']);
Line 1559: * url string AJAX lookup method which returns the
Line 1562: * The lookup url is provided GET params 'field', 'op', 'val' and
Line 1570: * @param array $params Array with two params, 'fields' and 'url'
Line 1738: $opts['chunk_url'] = 'admin/call/file/ajaxDragdropChunk';
Line 1739: $opts['done_url'] = 'admin/call/file/ajaxDragdropDone';
Line 1740: $opts['form_url'] = 'admin/call/file/ajaxDragdropForm';
Line 1741: $opts['cancel_url'] = 'admin/call/file/ajaxDragdropCancel';
/sprout/Helpers/Fb.php Highlighted file source
Line 400: * - 'begin_url' (string)
Line 401: * - 'form_url' (string)
Line 402: * - 'done_url' (string)
Line 403: * - 'cancel_url' (string)
Line 422: 'begin_url' => 'file_upload/upload_begin',
Line 423: 'form_url' => 'file_upload/upload_form',
Line 424: 'chunk_url' => 'file_upload/upload_chunk',
Line 425: 'done_url' => 'file_upload/upload_done',
Line 426: 'cancel_url' => 'file_upload/upload_cancel',
Line 641: $out .= '<img src="' . Enc::html(File::resizeUrl($value, 'c50x50')) . '" alt="">';
Line 793: * Expects to be provided AJAX data in a format defined by jQuery UI (see 'url' option below).
Line 797: * The URL which handles the lookups needs to use the 'term' GET param to find matching values.
Line 799: * A call to the URL should return JSON which contains an array of hashes, each with the following keys:
Line 809: * 'url' (string, required) URL to access when fetching matches via AJAX.
Line 811: * label for display upon page by calling the URL with the 'id' GET param set
Line 821: if (empty($options['url'])) {
Line 822: throw new InvalidArgumentException("\$options['url'] must be specified");
Line 834: self::addAttr($attrs, 'data-lookup-url', $options['url']);
Line 862: * 'url' (string) ajax called endpoint to populate autocomplete list
Line 887: self::addAttr($attrs, 'data-url', $options['url']);
Line 1559: * url string AJAX lookup method which returns the
Line 1562: * The lookup url is provided GET params 'field', 'op', 'val' and
Line 1570: * @param array $params Array with two params, 'fields' and 'url'
Line 1738: $opts['chunk_url'] = 'admin/call/file/ajaxDragdropChunk';
Line 1739: $opts['done_url'] = 'admin/call/file/ajaxDragdropDone';
Line 1740: $opts['form_url'] = 'admin/call/file/ajaxDragdropForm';
Line 1741: $opts['cancel_url'] = 'admin/call/file/ajaxDragdropCancel';
/sprout/Helpers/File.php Highlighted file source
Line 188: * Returns the public URL for a given file. Does not include domain.
Line 193: public static function url($filename)
Line 195: return self::backend()->absUrl($filename);
Line 200: * Returns the relative public URL for a given file.
Line 206: public static function relUrl($filename)
Line 208: return self::backend()->relUrl($filename);
Line 213: * Returns the public URL for a given file, including domain.
Line 218: public static function absUrl($filename)
Line 220: return self::backend()->absUrl($filename);
Line 225: * Returns the relative URL for a dynamically resized image.
Line 231: * @return string HTML-safe relative URL, e.g. file/resize/c400x300/123_example.jpg
Line 233: public static function resizeUrl($id, $size)
Line 235: return self::backend()->resizeUrl($id, $size);
Line 240: * Gets the relative URL for a fixed or dynamically resized image
Line 248: * @return string File URL, e.g. 'file/download/123/small' or 'files/123_test.c100x100.jpg'
Line 250: public static function sizeUrl($id, $size_name, $force_ext = null, $create_if_missing = false)
Line 269: $url = File::getResizeFilename($filename, $size_name, $force_ext);
Line 272: if ($create_if_missing and preg_match($pattern, $size_name) and !File::exists($url)) {
Line 276: return File::relUrl($url);
Line 313: // No problem, return original (broken) URL
Line 832: * The files can be used with `size_url` or `get_resize_filename` on the front-end.
Line 1095: * Checks the database for an updated URL path for a file.
Line 1098: * @return string Updated URL (relative to root), e.g. 'files/123_new_image.png' or 'file/download/123'
Line 1102: public static function lookupReplacementUrl($filename)
Line 1128: $replacement = self::lookupReplacementUrl($filename);
/sprout/Helpers/FilesBackend.php Highlighted file source
Line 22: * Returns the relative public URL for a given file.
Line 25: abstract function relUrl($filename);
Line 29: * Returns the public URL for a given file, including domain.
Line 31: abstract function absUrl($filename);
Line 35: * Returns the URL for a resized image. Does not include domain.
Line 38: abstract function resizeUrl($filename, $size);
/sprout/Helpers/FilesBackend.php Highlighted file source
Line 22: * Returns the relative public URL for a given file.
Line 25: abstract function relUrl($filename);
Line 29: * Returns the public URL for a given file, including domain.
Line 31: abstract function absUrl($filename);
Line 35: * Returns the URL for a resized image. Does not include domain.
Line 38: abstract function resizeUrl($filename, $size);
/sprout/Helpers/FilesBackendDirectory.php Highlighted file source
Line 28: * Returns the relative URL for a given file.
Line 35: public function relUrl($id)
Line 44: return File::lookupReplacementUrl($filename);
Line 46: // No problem, return original (broken) URL
Line 49: return 'files/' . Enc::url($filename);
Line 54: * Returns the absolute URL for a given file id, including domain.
Line 59: public function absUrl($id)
Line 61: return Sprout::absRoot() . $this->relUrl($id);
Line 66: * Returns the relative URL for a dynamically resized image.
Line 72: * @return string HTML-safe relative URL, e.g. file/resize/c400x300/123_example.jpg
Line 74: public function resizeUrl($id, $size)
Line 80: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($file_details['filename']), $signature);
Line 83: return sprintf('file/resize/%s/missing.png', Enc::url($size));
Line 91: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($filename), $signature);
Line 95: $replacement = File::lookupReplacementUrl($filename);
Line 101: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($file_details['filename']), $signature);
Line 106: return sprintf('file/resize/%s/missing.png', Enc::url($size));
/sprout/Helpers/FilesBackendDirectory.php Highlighted file source
Line 28: * Returns the relative URL for a given file.
Line 35: public function relUrl($id)
Line 44: return File::lookupReplacementUrl($filename);
Line 46: // No problem, return original (broken) URL
Line 49: return 'files/' . Enc::url($filename);
Line 54: * Returns the absolute URL for a given file id, including domain.
Line 59: public function absUrl($id)
Line 61: return Sprout::absRoot() . $this->relUrl($id);
Line 66: * Returns the relative URL for a dynamically resized image.
Line 72: * @return string HTML-safe relative URL, e.g. file/resize/c400x300/123_example.jpg
Line 74: public function resizeUrl($id, $size)
Line 80: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($file_details['filename']), $signature);
Line 83: return sprintf('file/resize/%s/missing.png', Enc::url($size));
Line 91: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($filename), $signature);
Line 95: $replacement = File::lookupReplacementUrl($filename);
Line 101: return sprintf('file/resize/%s/%s?s=%s', Enc::url($size), Enc::url($file_details['filename']), $signature);
Line 106: return sprintf('file/resize/%s/missing.png', Enc::url($size));
/sprout/Helpers/Html.php Highlighted file source
Line 26: public static $windowed_urls = FALSE;
Line 31: * @param string URL or URI string
Line 42: $site_url = Url::base(FALSE);
Line 46: // This is an id target link, not a URL
Line 47: $site_url = $uri;
Line 51: $site_url = Url::site($uri, $protocol);
Line 55: if (Html::$windowed_urls === TRUE AND empty($attributes['target']))
Line 60: $site_url = $uri;
Line 64: // Parsed URL
Line 65: '<a href="'.Enc::html($site_url).'"'
Line 68: // Title empty? Use the parsed URL
Line 69: .($escape_title ? Enc::html((($title === NULL) ? $site_url : $title), FALSE) : (($title === NULL) ? $site_url : $title)).'</a>';
Line 168: // Make the URL absolute
Line 169: $href = Url::base($index).$href;
Line 222: $script = Url::base((bool) $index).$script;
Line 262: // Make the src attribute into an absolute URL
Line 263: $attributes['src'] = Url::base($index).$attributes['src'];
/sprout/Helpers/ImportCMS.php Highlighted file source
Line 101: $fields['slug'] = Slug::unique(Enc::urlname($fields['name'], '-'), 'pages', $conds);
Line 180: $settings->text = self::replaceFileUrls($settings->text);
Line 190: * Replace page IDs within page URLS
Line 193: * @return string HTML with replaced URLs
Line 227: * Replace file URLs
Line 233: * @return string HTML with replaced file URLs
Line 235: private static function replaceFileUrls($html)
Line 239: $url = $matches[1] . '="file/download/' . $matches[2];
Line 242: $url .= '/small';
Line 244: $url .= '/medium';
Line 246: $url .= '/large';
Line 249: return $url . '"';
/sprout/Helpers/Itemlist.php Highlighted file source
Line 67: $base_url = Url::withoutArgs('order', 'dir', 'page');
Line 109: $val .= "<a class=\"icon-after icon-keyboard_arrow_up table-sort\" href=\"{$base_url}order={$field_name}&dir=desc\" title=\"Data is currently sorted by this column\">";
Line 114: $val .= "<a class=\"icon-after icon-keyboard_arrow_down table-sort\" href=\"{$base_url}order={$field_name}&dir=asc\" title=\"Data is currently sorted by this column (backwards)\">";
Line 119: $val .= "<a class=\"table-sort\" href=\"{$base_url}order={$field_name}\" title=\"Click to sort by this column\">";
Line 185: $url = $this->urlReplace($edit_action['url'], $item);
Line 187: $url = Enc::html($url);
Line 188: $val .= "<td><a href=\"{$url}\">{$value}</a></td>";
Line 205: $url = $this->urlReplace($details['url'], $item);
Line 209: $url = Enc::html($url);
Line 211: $val .= "<a href=\"{$url}\" class=\"{$class}\">{$name}</a> ";
Line 298: * @param string $url Link URL. This URL is processed by {@see Itemlist::urlReplace} during rendering
Line 302: public function addAction($name, $url, $classes = '', callable $show_func = null)
Line 304: $this->actions[$name] = ['url' => $url, 'classes' => $classes, 'show_func' => $show_func];
Line 413: * Does the parameter replacements on an action url
Line 417: private function urlReplace($url, $item)
Line 419: $url = str_replace('%%', Enc::url($item['id']), $url);
Line 420: $url = str_replace('%ne%', $item['id'], $url);
Line 422: return $url;
/sprout/Helpers/Lnk.php Highlighted file source
Line 102: * Convert a link specification into a URL.
Line 105: * @return string Target URL
Line 107: public static function url($spec)
Line 110: return $inst->getUrl($data);
Line 115: * Attempts to convert a link specification into a URL
Line 117: * This differs in behaviour to `Lnk::url` as it will return null if the spec is
Line 126: * @return string|null The target URL or null if the spec is empty or if a RowMissingException
Line 130: public static function tryUrl($spec)
Line 137: return self::url($spec);
Line 159: $html = '<a href="' . Enc::html($inst->getUrl($data)) . '"';
/sprout/Helpers/Navigation.php Highlighted file source
Line 211: $home_url = Url::base();
Line 212: if (Url::current() == 'home_page') {
Line 213: echo "<li id=\"nav{$nav_id}\" class=\"on\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 215: echo "<li id=\"nav{$nav_id}\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 255: echo "<a href=\"{$node->getFriendlyUrl()}\" class=\"main\">", Enc::html($node->getNavigationName()), "</a>";
Line 260: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 262: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 301: $home_url = Url::base();
Line 302: if (Url::current() == 'home_page') {
Line 303: echo "<li class=\"on\"><a href=\"{$home_url}\">Home</a></li>";
Line 305: echo "<li><a href=\"{$home_url}\">Home</a></li>";
Line 337: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 339: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 383: $home_url = Url::base();
Line 384: if (Url::current() == 'home_page') {
Line 385: echo "<li id=\"nav{$nav_id}\" class=\"on\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 387: echo "<li id=\"nav{$nav_id}\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 426: echo "<a href=\"{$node->getFriendlyUrl()}\" class=\"main\">", Enc::html($node->getNavigationName()), "</a>";
Line 431: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 433: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 456: static public function zippmenuChildren($page_url)
Line 462: $page = self::$root_node->findNode(new TreenodePathMatcher($page_url));
Line 481: echo "<li class=\"on\"><a href=\"{$child->getFriendlyUrl()}\">", Enc::html($child->getNavigationName()), "</a>";
Line 483: echo "<li><a href=\"{$child->getFriendlyUrl()}\">", Enc::html($child->getNavigationName()), "</a>";
Line 496: * @param array $post_crumbs Additional crumbs to add after the navigation ones. Should be in the format url => label
Line 509: * @return array [ url, label ]
Line 529: $crumbs[$node->getFriendlyUrl()] = $node->getNavigationName();
Line 533: $home_url = Url::base();
Line 534: $crumbs[$home_url] = 'Home';
Line 541: foreach ($post_crumbs as $url => $label) {
Line 542: if (!is_string($url)) $url = '';
Line 543: $crumbs[$url] = $label;
Line 554: * @param array $crumbs Crumbs for the breadcrumb. Should be in the format url => label
Line 561: foreach ($crumbs as $url => $label) {
Line 562: if (!is_string($url)) $url = '';
Line 563: $bc[] = '<a href="' . Enc::html($url) . '">' . Enc::html($label) . '</a>';
Line 584: * @param array $crumbs Crumbs for the breadcrumb. Should be in the format url => label
Line 627: $home_url = Url::base();
Line 628: if (Url::current() == 'home_page') {
Line 629: echo "<li class=\"nav{$i} on\"><a href=\"{$home_url}\">Home</a></li>";
Line 631: echo "<li class=\"nav{$i}\"><a href=\"{$home_url}\">Home</a></li>";
Line 640: echo "<li class=\"nav{$i} on\"><a href=\"{$page->getFriendlyUrl()}\">", Enc::html($page->getNavigationName()), "</a></li>";
Line 642: echo "<li class=\"nav{$i}\"><a href=\"{$page->getFriendlyUrl()}\">", Enc::html($page->getNavigationName()), "</a></li>";
Line 679: // [0] => id, [1] => name, [2] = url
Line 683: $page->getFriendlyUrl(),
Line 752: * @return array [id, friendly-url, menu-name, childs array]
Line 773: $home_url = Url::base();
Line 774: if (Url::current() == 'home_page' || Url::current() == null) {
Line 775: echo "<li class=\"menu-item menu-item-depth1 menu-home-page menu-current-item\"><a href=\"{$home_url}\">Home</a></li>";
Line 777: echo "<li class=\"menu-item menu-item-depth1 menu-home-page\"><a href=\"{$home_url}\">Home</a></li>";
Line 816: if (Url::current() === $node->getFriendlyUrlNoprefix()) {
Line 825: echo "<a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
/sprout/Helpers/Navigation.php Highlighted file source
Line 211: $home_url = Url::base();
Line 212: if (Url::current() == 'home_page') {
Line 213: echo "<li id=\"nav{$nav_id}\" class=\"on\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 215: echo "<li id=\"nav{$nav_id}\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 255: echo "<a href=\"{$node->getFriendlyUrl()}\" class=\"main\">", Enc::html($node->getNavigationName()), "</a>";
Line 260: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 262: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 301: $home_url = Url::base();
Line 302: if (Url::current() == 'home_page') {
Line 303: echo "<li class=\"on\"><a href=\"{$home_url}\">Home</a></li>";
Line 305: echo "<li><a href=\"{$home_url}\">Home</a></li>";
Line 337: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 339: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 383: $home_url = Url::base();
Line 384: if (Url::current() == 'home_page') {
Line 385: echo "<li id=\"nav{$nav_id}\" class=\"on\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 387: echo "<li id=\"nav{$nav_id}\"><a href=\"{$home_url}\" class=\"main\">Home</a></li>";
Line 426: echo "<a href=\"{$node->getFriendlyUrl()}\" class=\"main\">", Enc::html($node->getNavigationName()), "</a>";
Line 431: echo "<li class=\"on\"><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 433: echo "<li><a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
Line 456: static public function zippmenuChildren($page_url)
Line 462: $page = self::$root_node->findNode(new TreenodePathMatcher($page_url));
Line 481: echo "<li class=\"on\"><a href=\"{$child->getFriendlyUrl()}\">", Enc::html($child->getNavigationName()), "</a>";
Line 483: echo "<li><a href=\"{$child->getFriendlyUrl()}\">", Enc::html($child->getNavigationName()), "</a>";
Line 496: * @param array $post_crumbs Additional crumbs to add after the navigation ones. Should be in the format url => label
Line 509: * @return array [ url, label ]
Line 529: $crumbs[$node->getFriendlyUrl()] = $node->getNavigationName();
Line 533: $home_url = Url::base();
Line 534: $crumbs[$home_url] = 'Home';
Line 541: foreach ($post_crumbs as $url => $label) {
Line 542: if (!is_string($url)) $url = '';
Line 543: $crumbs[$url] = $label;
Line 554: * @param array $crumbs Crumbs for the breadcrumb. Should be in the format url => label
Line 561: foreach ($crumbs as $url => $label) {
Line 562: if (!is_string($url)) $url = '';
Line 563: $bc[] = '<a href="' . Enc::html($url) . '">' . Enc::html($label) . '</a>';
Line 584: * @param array $crumbs Crumbs for the breadcrumb. Should be in the format url => label
Line 627: $home_url = Url::base();
Line 628: if (Url::current() == 'home_page') {
Line 629: echo "<li class=\"nav{$i} on\"><a href=\"{$home_url}\">Home</a></li>";
Line 631: echo "<li class=\"nav{$i}\"><a href=\"{$home_url}\">Home</a></li>";
Line 640: echo "<li class=\"nav{$i} on\"><a href=\"{$page->getFriendlyUrl()}\">", Enc::html($page->getNavigationName()), "</a></li>";
Line 642: echo "<li class=\"nav{$i}\"><a href=\"{$page->getFriendlyUrl()}\">", Enc::html($page->getNavigationName()), "</a></li>";
Line 679: // [0] => id, [1] => name, [2] = url
Line 683: $page->getFriendlyUrl(),
Line 752: * @return array [id, friendly-url, menu-name, childs array]
Line 773: $home_url = Url::base();
Line 774: if (Url::current() == 'home_page' || Url::current() == null) {
Line 775: echo "<li class=\"menu-item menu-item-depth1 menu-home-page menu-current-item\"><a href=\"{$home_url}\">Home</a></li>";
Line 777: echo "<li class=\"menu-item menu-item-depth1 menu-home-page\"><a href=\"{$home_url}\">Home</a></li>";
Line 816: if (Url::current() === $node->getFriendlyUrlNoprefix()) {
Line 825: echo "<a href=\"{$node->getFriendlyUrl()}\">", Enc::html($node->getNavigationName()), "</a>";
/sprout/Helpers/Needs.php Highlighted file source
Line 62: * @param string $url The URL of the CSS file to include
Line 65: public static function addCssInclude($url, $extra_attrs = null, $key = null)
Line 67: if (! isset($extra_attrs['href'])) $extra_attrs['href'] = $url;
Line 78: * @param string $url The URL of the CSS file to include
Line 81: public static function addJavascriptInclude($url, $extra_attrs = null, $key = null)
Line 83: if (! isset($extra_attrs['src'])) $extra_attrs['src'] = $url;
Line 218: $url = '//maps.googleapis.com/maps/api/js?' . http_build_query($params);
Line 220: $need = '<script src="' . Enc::html($url) . '" async defer></script>';
Line 365: Event::$data = str_replace ('SITE/', Url::base(TRUE), Event::$data);
Line 379: $str = str_replace ('SITE/', Url::base(TRUE), $str);
/sprout/Helpers/Needs.php Highlighted file source
Line 62: * @param string $url The URL of the CSS file to include
Line 65: public static function addCssInclude($url, $extra_attrs = null, $key = null)
Line 67: if (! isset($extra_attrs['href'])) $extra_attrs['href'] = $url;
Line 78: * @param string $url The URL of the CSS file to include
Line 81: public static function addJavascriptInclude($url, $extra_attrs = null, $key = null)
Line 83: if (! isset($extra_attrs['src'])) $extra_attrs['src'] = $url;
Line 218: $url = '//maps.googleapis.com/maps/api/js?' . http_build_query($params);
Line 220: $need = '<script src="' . Enc::html($url) . '" async defer></script>';
Line 365: Event::$data = str_replace ('SITE/', Url::base(TRUE), Event::$data);
Line 379: $str = str_replace ('SITE/', Url::base(TRUE), $str);
/sprout/Helpers/Page.php Highlighted file source
Line 30: * Get the page id for a given URL
Line 32: public static function lookupUrl($url)
Line 37: $matcher = new TreenodePathMatcher($url);
Line 46: * Return the URL for a page, when given the page id
Line 47: * The URLs are relative
Line 49: * @param int $id The page id to return the URL for
Line 50: * @return string The friendly URL for the page
Line 52: public static function url($id)
Line 64: return $node->getFriendlyUrlNoprefix();
Line 69: * Fetches the URL for a tool page for a specific controller entrance method
Line 72: * @return string The URL to access the tool page
Line 75: public static function toolUrl($class, $method)
Line 81: return $node->getFriendlyUrl();
Line 89: * @return null Current URL is not a matched node
Line 122: * Load page social - title, image, description, url
Line 125: * @param Pagenode $node Node, for generating the URL; optional
Line 142: SocialMeta::setUrl($node->getFriendlyUrlNoPrefix());
Line 433: $list[] = ['href' => $node->getFriendlyUrl(), 'text' => $node->getNavigationName()];
/sprout/Helpers/Pagenode.php Highlighted file source
Line 36: * Returns the friendly url for a node
Line 39: public function getFriendlyUrl()
Line 42: return Lnk::url($this->data['redirect']);
Line 49: $parts[] = $node->getUrlName();
Line 52: return Kohana::config('core.site_domain', TRUE) . SubsiteSelector::$url_prefix . implode('/', $parts);
Line 56: * Returns the friendly url for a node - but don't include a directory prefix
Line 59: public function getFriendlyUrlNoprefix()
Line 65: $parts[] = $node->getUrlName();
Line 85: * Returns the name of this page only, when constructing a URL
Line 88: public function getUrlName()
Line 93: $name = Enc::urlname($this->data['name']);
Line 96: if (in_array($name, Constants::$conflict_page_urls)) {
/sprout/Helpers/PageRouting.php Highlighted file source
Line 35: $url_std = trim(Router::$current_uri, '/ ');
Line 37: 'url_std' => $url_std,
Line 38: 'url_like' => Pdb::likeEscape($url_std),
Line 48: (path_exact = '' OR path_exact LIKE :url_like)
Line 50: (path_contains = '' OR :url_std LIKE CONCAT('%', path_contains, '%'))
Line 59: $url = Lnk::url($row['destination']);
Line 62: if ($url) {
Line 63: Url::redirect($url, $method);
/sprout/Helpers/RichTextSanitiser.php Highlighted file source
Line 28: const ATTR_TYPE_URL = 1;
Line 88: 'href' => self::ATTR_TYPE_URL,
Line 276: * @param int $type The attribute type code, e.g. ATTR_TYPE_URL
Line 285: case self::ATTR_TYPE_URL:
Line 287: $url = parse_url($value);
Line 289: if ($url == false or strcasecmp($url['scheme'], 'javascript') == 0) {
Line 299: $url = parse_url($value);
Line 301: if ($url == false) {
Line 306: if (!empty($url['host'])) {
Line 308: // prone to breakage, e.g. Url::base().
Line 312: if (strcasecmp($url['host'], $base_domain) !== 0) {
/sprout/Helpers/RichTextSanitiser.php Highlighted file source
Line 28: const ATTR_TYPE_URL = 1;
Line 88: 'href' => self::ATTR_TYPE_URL,
Line 276: * @param int $type The attribute type code, e.g. ATTR_TYPE_URL
Line 285: case self::ATTR_TYPE_URL:
Line 287: $url = parse_url($value);
Line 289: if ($url == false or strcasecmp($url['scheme'], 'javascript') == 0) {
Line 299: $url = parse_url($value);
Line 301: if ($url == false) {
Line 306: if (!empty($url['host'])) {
Line 308: // prone to breakage, e.g. Url::base().
Line 312: if (strcasecmp($url['host'], $base_domain) !== 0) {
/sprout/Helpers/Router.php Highlighted file source
Line 43: /** Optional fake file extension that will be added to all generated URLs, e.g. '.html' */
Line 44: public static $url_suffix = '';
Line 200: if ($suffix = Kohana::config('core.url_suffix') AND strpos(Router::$current_uri, $suffix) !== FALSE)
Line 202: // Remove the URL suffix
Line 205: // Set the URL suffix
Line 206: Router::$url_suffix = $suffix;
Line 248: $url = $new_proto . '://' . $new_hostname . '/' . Router::$complete_uri;
Line 249: Url::redirect($url, '301');
Line 273: $url = $new_proto . '://' . $new_hostname . '/' . Router::$complete_uri;
Line 274: echo "Redirect:\n{$url}";
/sprout/Helpers/Router.php Highlighted file source
Line 43: /** Optional fake file extension that will be added to all generated URLs, e.g. '.html' */
Line 44: public static $url_suffix = '';
Line 200: if ($suffix = Kohana::config('core.url_suffix') AND strpos(Router::$current_uri, $suffix) !== FALSE)
Line 202: // Remove the URL suffix
Line 205: // Set the URL suffix
Line 206: Router::$url_suffix = $suffix;
Line 248: $url = $new_proto . '://' . $new_hostname . '/' . Router::$complete_uri;
Line 249: Url::redirect($url, '301');
Line 273: $url = $new_proto . '://' . $new_hostname . '/' . Router::$complete_uri;
Line 274: echo "Redirect:\n{$url}";
/sprout/Helpers/Search.php Highlighted file source
Line 318: $url_base = Url::withoutArgs('page');
Line 331: $out .= "<a href=\"{$url_base}page=" . ($curr_page - 1) . "\" class=\"page-prev\">« Prev</a> ";
Line 336: $out .= " <a href=\"{$url_base}page={$i}\" class=\"{$class}\">{$i}</a> ";
Line 340: $out .= " <a href=\"{$url_base}page=" . ($curr_page + 1) . "\" class=\"page-next\">Next »</a>";
/sprout/Helpers/Search.php Highlighted file source
Line 318: $url_base = Url::withoutArgs('page');
Line 331: $out .= "<a href=\"{$url_base}page=" . ($curr_page - 1) . "\" class=\"page-prev\">« Prev</a> ";
Line 336: $out .= " <a href=\"{$url_base}page={$i}\" class=\"{$class}\">{$i}</a> ";
Line 340: $out .= " <a href=\"{$url_base}page=" . ($curr_page + 1) . "\" class=\"page-next\">Next »</a>";
/sprout/Helpers/SessionStats.php Highlighted file source
Line 30: * Prefixes of URLs to ignore
Line 58: // Prefixes of URLs to ignore
Line 60: if (strpos(Url::current(), $prefix) === 0) return false;
Line 84: $host = parse_url($referrer, PHP_URL_HOST);
Line 119: $url = Url::current(false);
Line 120: if (empty($_SESSION['stats']['pageviews'][$url])) {
Line 121: $_SESSION['stats']['pageviews'][$url] = 1;
Line 123: $_SESSION['stats']['pageviews'][$url] += 1;
Line 131: * @param string $referrer Full URL, e.g. 'https://facebook.com/post/987654321
Line 140: $host = parse_url($referrer, PHP_URL_HOST);
Line 184: * Return the number of page views for a given url
Line 186: * @param int $url URL to return stats for; query strings are stripped
Line 189: public static function numPageviews($url)
Line 192: $url = preg_replace('!\?.+!', '', $url);
Line 194: if (!empty($_SESSION['stats']['pageviews'][$url])) {
Line 195: return $_SESSION['stats']['pageviews'][$url];
Line 236: * @return string URL
/sprout/Helpers/SitemapGenPages.php Highlighted file source
Line 25: * Loads content page URLs and calls {@see SitemapGenPages::childrenPages} to output their XML URLs in the sitemap
Line 37: * Outputs XML URLs for the children of a page in the sitemap, recursively until all descendents have been output
Line 45: $this->url($child->getFriendlyUrlNoprefix(), $child['date_modified'], NULL, $prio);
/sprout/Helpers/SitemapGenPages.php Highlighted file source
Line 25: * Loads content page URLs and calls {@see SitemapGenPages::childrenPages} to output their XML URLs in the sitemap
Line 37: * Outputs XML URLs for the children of a page in the sitemap, recursively until all descendents have been output
Line 45: $this->url($child->getFriendlyUrlNoprefix(), $child['date_modified'], NULL, $prio);
/sprout/Helpers/Skin.php Highlighted file source
Line 60: * Return the URL for a CSS file in the skin for the current subsite.
Line 61: * The URL will have an embedded timestamp.
Line 64: * <link href="<?php echo Skin::cssUrl('layout'); ?>" rel="stylesheet">
Line 66: * @return string URL for the specified css file
Line 68: public static function cssUrl($file)
Line 80: * The URLs will contain embedded timestamps, making them auto-versioned
Line 92: * If you need more control use the helper `css_url` and echo the tags yourself.
Line 126: * Return the URL for a JS file in the skin for the current subsite.
Line 127: * The URL will have an embedded timestamp.
Line 130: * <script src="<?php echo Skin::cssUrl('site'); ?>"></script>
Line 132: * @return string URL for the specified js file
Line 134: public static function jsUrl($file)
Line 146: * The URLs will contain embedded timestamps, making them auto-versioned
Line 158: * If you need more control use the helper `js_url` and echo the tags yourself.
/sprout/Helpers/SocialMeta.php Highlighted file source
Line 62: * @param string $url Relative or absolute url
Line 64: public static function setImage($url)
Line 66: if (preg_match('!^[0-9]+$!', $url)) {
Line 67: $url = File::url($url);
Line 69: if (!preg_match('!^https?://!', $url)) {
Line 70: $url = Sprout::absRoot() . $url;
Line 72: self::$meta_property['og:image'] = $url;
Line 88: * Set the canonical url for this page
Line 90: * @param string $url Relative or absolute url
Line 92: public static function setUrl($url)
Line 94: if (!preg_match('!^https?://!', $url)) {
Line 95: $url = Sprout::absRoot() . $url;
Line 97: self::$meta_property['og:url'] = $url;
Line 175: if (empty(self::$meta_property['og:url'])) {
Line 176: self::$meta_property['og:url'] = Sprout::absRoot() . Url::current(true);
/sprout/Helpers/SocialMeta.php Highlighted file source
Line 62: * @param string $url Relative or absolute url
Line 64: public static function setImage($url)
Line 66: if (preg_match('!^[0-9]+$!', $url)) {
Line 67: $url = File::url($url);
Line 69: if (!preg_match('!^https?://!', $url)) {
Line 70: $url = Sprout::absRoot() . $url;
Line 72: self::$meta_property['og:image'] = $url;
Line 88: * Set the canonical url for this page
Line 90: * @param string $url Relative or absolute url
Line 92: public static function setUrl($url)
Line 94: if (!preg_match('!^https?://!', $url)) {
Line 95: $url = Sprout::absRoot() . $url;
Line 97: self::$meta_property['og:url'] = $url;
Line 175: if (empty(self::$meta_property['og:url'])) {
Line 176: self::$meta_property['og:url'] = Sprout::absRoot() . Url::current(true);
/sprout/Helpers/SocialNetworking.php Highlighted file source
Line 24: private static $url;
Line 32: public static function details($title, $desc, $url = null)
Line 34: if (! $url) $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
Line 39: self::$url = $url;
Line 50: if (self::$url and self::$title) return true;
Line 55: public static function getUrl()
Line 57: return self::$url;
Line 76: $share_url = 'http://www.facebook.com/sharer.php?u=' . Enc::url(self::$url) . '&t=' . Enc::url(self::$title);
Line 78: $share_url = Enc::html($share_url);
Line 81: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 103: * @param string $link The URL of the link you're sharing
Line 113: if (! $link) $link = self::$url;
Line 115: $share_url = 'http://twitter.com/intent/tweet?text=' . Enc::url($tweet);
Line 118: $share_url .= '&url=' . Enc::url($link);
Line 122: $share_url .= '&via=' . Enc::url($via_handle);
Line 125: $share_url = Enc::html($share_url);
Line 128: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 150: $url = Enc::url(self::$url);
Line 151: $title = Enc::url(self::$title);
Line 152: $desc = Enc::url(self::$desc);
Line 154: $share_url = "http://www.linkedin.com/shareArticle?mini=true&url={$url}&title={$title}&summary={$desc}";
Line 155: $share_url = Enc::html($share_url);
Line 159: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 168: $url = Enc::url(self::$url);
Line 169: $title = Enc::url(self::$title);
Line 170: $desc = Enc::url(self::$desc);
Line 174: $share_url = "http://www.linkedin.com/shareArticle?mini=true&url={$url}&title={$title}&summary={$desc}";
Line 175: $share_url = Enc::html($share_url);
Line 178: echo "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\">";
Line 190: $share_url = 'email_share/share?url=' . Enc::url(self::$url) . '&title=' . Enc::url(self::$title);
Line 191: $share_url = Enc::html($share_url);
Line 194: return '<a href="' . $share_url . '" class="' . $class . '">';
/sprout/Helpers/SocialNetworking.php Highlighted file source
Line 24: private static $url;
Line 32: public static function details($title, $desc, $url = null)
Line 34: if (! $url) $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
Line 39: self::$url = $url;
Line 50: if (self::$url and self::$title) return true;
Line 55: public static function getUrl()
Line 57: return self::$url;
Line 76: $share_url = 'http://www.facebook.com/sharer.php?u=' . Enc::url(self::$url) . '&t=' . Enc::url(self::$title);
Line 78: $share_url = Enc::html($share_url);
Line 81: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 103: * @param string $link The URL of the link you're sharing
Line 113: if (! $link) $link = self::$url;
Line 115: $share_url = 'http://twitter.com/intent/tweet?text=' . Enc::url($tweet);
Line 118: $share_url .= '&url=' . Enc::url($link);
Line 122: $share_url .= '&via=' . Enc::url($via_handle);
Line 125: $share_url = Enc::html($share_url);
Line 128: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 150: $url = Enc::url(self::$url);
Line 151: $title = Enc::url(self::$title);
Line 152: $desc = Enc::url(self::$desc);
Line 154: $share_url = "http://www.linkedin.com/shareArticle?mini=true&url={$url}&title={$title}&summary={$desc}";
Line 155: $share_url = Enc::html($share_url);
Line 159: return "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\" class=\"{$class}\">";
Line 168: $url = Enc::url(self::$url);
Line 169: $title = Enc::url(self::$title);
Line 170: $desc = Enc::url(self::$desc);
Line 174: $share_url = "http://www.linkedin.com/shareArticle?mini=true&url={$url}&title={$title}&summary={$desc}";
Line 175: $share_url = Enc::html($share_url);
Line 178: echo "<a href=\"{$share_url}\" onclick=\"window.open(this.href, 'Share', 'width=800,height=500'); return false;\">";
Line 190: $share_url = 'email_share/share?url=' . Enc::url(self::$url) . '&title=' . Enc::url(self::$title);
Line 191: $share_url = Enc::html($share_url);
Line 194: return '<a href="' . $share_url . '" class="' . $class . '">';
/sprout/Helpers/Sprout.php Highlighted file source
Line 356: * Checks a URL that is to be used for redirection is valid.
Line 358: * Will allow remote URLs beginning with 'http://' and local URLs beginning with '/'
Line 371: * Returns an absolute URL for the web root of this server
Line 390: return Url::base(true, $protocol);
Line 591: * Expires should be specified as a number of seconds, after that time the URL will expire.
Line 593: * ETags should be something which is unique for that version of the URL. They should use
Line 615: * Translate an array which may contain a page_id, filename or url into the final URL to use
Line 623: return $page->getFriendlyUrl();
Line 628: return File::absUrl($row['filename']);
Line 631: if ($row['url']) {
Line 632: return $row['url'];
Line 690: // Only mangle local URLs; leave remote URLs alone
Line 695: $url_base = Subsites::getAbsRoot(SubsiteSelector::$subsite_id);
Line 696: $own_domain_matches_pattern = preg_match($http_pattern, $url_base, $own_domain_matches);
Line 698: // Local URLs
Line 699: $url = File::relUrl($matches[2]) . '?v=' . mt_rand(100, 999);
Line 701: // Remote URLs
Line 717: $out = '<a href="' . Enc::html($url) . '"';
/sprout/Helpers/TwoFactor/GoogleAuthenticator.php Highlighted file source
Line 99: * For a given set of details, return the otpauth:// url for use in a QR code
Line 105: * @return string URL with the otpauth:// scheme
Line 113: return 'otpauth://totp/' . rawurlencode($issuer . ':' . $user . '@' . $host) . '?' . $params;
Line 118: * Return a Google Charts url which generates a QR code image from some QR code data
Line 121: * @return string Image URL
Line 123: public function getQRImageUrl($qr_data)
Line 125: return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . urlencode($qr_data);
/sprout/Helpers/TwoFactor/GoogleAuthenticator.php Highlighted file source
Line 99: * For a given set of details, return the otpauth:// url for use in a QR code
Line 105: * @return string URL with the otpauth:// scheme
Line 113: return 'otpauth://totp/' . rawurlencode($issuer . ':' . $user . '@' . $host) . '?' . $params;
Line 118: * Return a Google Charts url which generates a QR code image from some QR code data
Line 121: * @return string Image URL
Line 123: public function getQRImageUrl($qr_data)
Line 125: return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . urlencode($qr_data);
/sprout/Helpers/Url.php Highlighted file source
Line 25: * Helper functions for working with URLs.
Line 27: class Url
Line 42: * Base URL, with or without the index page.
Line 44: * If protocol is specified, a full URL including the domain will be used
Line 47: * If a subsite-section has a defined URL prefix, it will be added to the URL automatically
Line 61: $base_url = $site_domain;
Line 66: $base_url = $protocol . '://' . $_SERVER['HTTP_HOST'] . $site_domain;
Line 69: $base_url .= SubsiteSelector::$url_prefix;
Line 74: $base_url = $base_url . $index;
Line 77: // Force a slash on the end of the URL
Line 78: $base_url = rtrim($base_url, '/').'/';
Line 80: return $base_url;
Line 84: * Fetches an absolute site URL based on a URI segment.
Line 92: if ($path = trim(parse_url($uri, PHP_URL_PATH), '/'))
Line 95: $path .= Kohana::config('core.url_suffix');
Line 98: if ($query = parse_url($uri, PHP_URL_QUERY))
Line 104: if ($fragment = parse_url($uri, PHP_URL_FRAGMENT))
Line 111: $base = trim(Url::base(TRUE), '/');
Line 117: $url = Url::base(TRUE, $protocol).$path.$query.$fragment;
Line 118: return $url;
Line 122: * Return the URL to a file. Absolute filenames and relative filenames
Line 133: // Add the base URL to the filename
Line 134: $file = Url::base($index).$file;
Line 165: * @param mixed string site URI or URL to redirect to, or array of strings if method is 300
Line 197: // HTTP headers expect absolute URLs
Line 198: $uri = Url::site($uri, Request::protocol());
Line 225: header('Refresh: 0; url='.$uri);
Line 250: * Removes one or more argumens from the current URL, returning a URL which can have arguments appended to it
Line 253: * If the current URL is:
Line 256: * Url::withoutArgs('q')
Line 257: * the resulting URL will be:
Line 260: * Use rtrim($url, '&?') if you do not desire the trailing ? or &
Line 264: $url_base = Url::base() . Url::current() . '?';
Line 274: $url_base .= http_build_query($get) . '&';
Line 277: return $url_base;
Line 282: * Checks the provided argument is a valid redirect URL to the local site
Line 286: * @param string $url
Line 289: public static function checkRedirect($url, $allow_querysting = false)
Line 291: if ($url === '') return true;
Line 293: $url = trim(Enc::cleanfunky($url));
Line 294: if ($url === '') return false;
Line 301: if (! preg_match($regex, $url)) {
Line 310: * Add a scheme (e.g. 'http://') to a URL which doesn't have one
Line 312: * @param string $url May or may not contain a scheme
Line 313: * @return string URL Always contains a scheme
Line 315: public static function addUrlScheme($url)
Line 317: if (preg_match('!^https?://!i', $url)) {
Line 318: return $url;
Line 320: return 'http://' . $url;
Line 334: $url = parse_url($social_link);
Line 336: // A URL such as "instagram.com/kbtestbot3000" will be treated as if there isn't a host specified
Line 338: if (empty($url['host']) and !empty($url['path'])) {
Line 339: $domain_loc = strpos($url['path'], $domain . '/');
Line 341: $url['host'] = $domain;
Line 342: $url['path'] = substr($url['path'], $domain_loc + strlen($domain));
Line 346: if (empty($url['scheme'])) {
Line 347: $url['scheme'] = 'https';
Line 349: $url['scheme'] = strtolower($url['scheme']);
Line 352: if (empty($url['host'])) {
Line 353: $url['host'] = $domain;
Line 355: $url['host'] = strtolower($url['host']);
Line 358: if ($url['path'][0] != '/') {
Line 359: $url['path'] = '/' . $url['path'];
Line 362: $out = $url['scheme'] . '://' . $url['host'] . $url['path'];
Line 364: if (!empty($url['query'])) {
Line 365: $out .= '?' . $url['query'];
Line 368: if (!empty($url['fragment'])) {
Line 369: $out .= '#' . $url['fragment'];
Line 377: * Return HTML for canonical URLs
Line 379: * @param string $canonical_url
Line 382: public static function canonical($canonical_url)
Line 384: $parts = parse_url($canonical_url);
Line 386: // Attempt to determine if 3rd-party or local URL and fill in the blanks
Line 392: $canonical_url = $parts['scheme'] . $parts['host'] . $parts['path'];
Line 393: return sprintf('<link rel="canonical" href="%s">', Enc::html($canonical_url));
/sprout/Helpers/WorkerLinkChecker.php Highlighted file source
Line 165: $href = urldecode($href);
Line 168: $found = $this->checkUrl($href, $row['subsite_id']);
Line 183: * Returns TRUE if the given URL is found, a string of the error message if the URL was not found.
Line 185: public function checkUrl($href, $subsite_id = 1)
Line 198: return '599 Not a URL';
Line 227: return '599 Not a URL';
/sprout/tests/bbcodeTest.php Highlighted file source
Line 29: public function testUrl()
Line 32: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a[/url]') === 'aa<a href="http://example.com">a</a>');
Line 33: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a') === 'aa[url=http://example.com]a');
Line 34: $this->assertTrue(BbCode::inline('aa[url http://example.com]a') === 'aa[url http://example.com]a');
Line 35: $this->assertTrue(BbCode::inline('aa[url http://example.com]a[/url]') === 'aa[url http://example.com]a[/url]');
Line 36: $this->assertTrue(BbCode::inline('aa[url]a') === 'aa[url]a');
Line 37: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a[/url]', array('url')) === 'aa<a href="http://example.com">a</a>');
Line 38: $this->assertTrue(BbCode::inline('aa[url]a[/url]', array()) === 'aa[url]a[/url]');
/sprout/tests/bbcodeTest.php Highlighted file source
Line 29: public function testUrl()
Line 32: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a[/url]') === 'aa<a href="http://example.com">a</a>');
Line 33: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a') === 'aa[url=http://example.com]a');
Line 34: $this->assertTrue(BbCode::inline('aa[url http://example.com]a') === 'aa[url http://example.com]a');
Line 35: $this->assertTrue(BbCode::inline('aa[url http://example.com]a[/url]') === 'aa[url http://example.com]a[/url]');
Line 36: $this->assertTrue(BbCode::inline('aa[url]a') === 'aa[url]a');
Line 37: $this->assertTrue(BbCode::inline('aa[url=http://example.com]a[/url]', array('url')) === 'aa<a href="http://example.com">a</a>');
Line 38: $this->assertTrue(BbCode::inline('aa[url]a[/url]', array()) === 'aa[url]a[/url]');
/sprout/tests/encHelperTest.php Highlighted file source
Line 110: public function textUrl()
Line 112: $this->assertEquals(Enc::url('a'), 'a');
Line 113: $this->assertEquals(Enc::url('1'), '1');
Line 114: $this->assertEquals(Enc::url('hello?'), 'hello%3F');
Line 115: $this->assertEquals(Enc::url('hello how are you'), 'hello+how+are+you');
Line 116: $this->assertEquals(Enc::url('ê'), '%C3%AA');
Line 117: $this->assertEquals(Enc::url("\0"), '');
Line 118: $this->assertEquals(Enc::url("\x1A"), '');
Line 119: $this->assertEquals(Enc::url(array()), '');
Line 170: public function testUrlname()
Line 173: $this->assertEquals(Enc::urlname('a'), 'a');
Line 174: $this->assertEquals(Enc::urlname('"'), '');
Line 175: $this->assertEquals(Enc::urlname(':-.[]'), '');
Line 176: $this->assertEquals(Enc::urlname('ê'), '');
Line 177: $this->assertEquals(Enc::urlname("\0"), '');
Line 178: $this->assertEquals(Enc::urlname("\x1A"), '');
Line 179: $this->assertEquals(Enc::urlname(array()), '');
Line 182: $this->assertEquals(Enc::urlname('hey ya', '_'), 'hey_ya');
Line 183: $this->assertEquals(Enc::urlname('hey ya', '-'), 'hey-ya');
Line 186: $this->assertEquals(Enc::urlname(' '), '');
Line 187: $this->assertEquals(Enc::urlname('&'), '');
Line 188: $this->assertEquals(Enc::urlname(' & '), '');
Line 189: $this->assertEquals(Enc::urlname(' hello world ', '_'), 'hello_world');
Line 190: $this->assertEquals(Enc::urlname(' hello world ', '_'), 'hello_world');
Line 191: $this->assertEquals(Enc::urlname(' hello & world ', '_'), 'hello_and_world');
Line 192: $this->assertEquals(Enc::urlname(' hello world & ', '_'), 'hello_world');
Line 193: $this->assertEquals(Enc::urlname(' & hello world & ', '_'), 'hello_world');
/sprout/tests/encHelperTest.php Highlighted file source
Line 110: public function textUrl()
Line 112: $this->assertEquals(Enc::url('a'), 'a');
Line 113: $this->assertEquals(Enc::url('1'), '1');
Line 114: $this->assertEquals(Enc::url('hello?'), 'hello%3F');
Line 115: $this->assertEquals(Enc::url('hello how are you'), 'hello+how+are+you');
Line 116: $this->assertEquals(Enc::url('ê'), '%C3%AA');
Line 117: $this->assertEquals(Enc::url("\0"), '');
Line 118: $this->assertEquals(Enc::url("\x1A"), '');
Line 119: $this->assertEquals(Enc::url(array()), '');
Line 170: public function testUrlname()
Line 173: $this->assertEquals(Enc::urlname('a'), 'a');
Line 174: $this->assertEquals(Enc::urlname('"'), '');
Line 175: $this->assertEquals(Enc::urlname(':-.[]'), '');
Line 176: $this->assertEquals(Enc::urlname('ê'), '');
Line 177: $this->assertEquals(Enc::urlname("\0"), '');
Line 178: $this->assertEquals(Enc::urlname("\x1A"), '');
Line 179: $this->assertEquals(Enc::urlname(array()), '');
Line 182: $this->assertEquals(Enc::urlname('hey ya', '_'), 'hey_ya');
Line 183: $this->assertEquals(Enc::urlname('hey ya', '-'), 'hey-ya');
Line 186: $this->assertEquals(Enc::urlname(' '), '');
Line 187: $this->assertEquals(Enc::urlname('&'), '');
Line 188: $this->assertEquals(Enc::urlname(' & '), '');
Line 189: $this->assertEquals(Enc::urlname(' hello world ', '_'), 'hello_world');
Line 190: $this->assertEquals(Enc::urlname(' hello world ', '_'), 'hello_world');
Line 191: $this->assertEquals(Enc::urlname(' hello & world ', '_'), 'hello_and_world');
Line 192: $this->assertEquals(Enc::urlname(' hello world & ', '_'), 'hello_world');
Line 193: $this->assertEquals(Enc::urlname(' & hello world & ', '_'), 'hello_world');
/sprout/tests/pageTest.php Highlighted file source
Line 21: public function testUrl()
Line 26: $this->markTestSkipped('Cannot test page URLs without any pages in the database');
Line 29: $integer = Page::url((int) key($pages));
Line 32: $string = Page::url((string) key($pages));
Line 37: $url = Page::url(2362728);
Line 38: $this->assertTrue($url == 'page/view_by_id/2362728');
Line 40: $url = Page::url('2362728');
Line 41: $this->assertTrue($url == 'page/view_by_id/2362728');
Line 43: $url = Page::url('abcde');
Line 44: $this->assertNull($url);
Line 46: $url = Page::url(array());
Line 47: $this->assertNull($url);
/sprout/tests/pageTest.php Highlighted file source
Line 21: public function testUrl()
Line 26: $this->markTestSkipped('Cannot test page URLs without any pages in the database');
Line 29: $integer = Page::url((int) key($pages));
Line 32: $string = Page::url((string) key($pages));
Line 37: $url = Page::url(2362728);
Line 38: $this->assertTrue($url == 'page/view_by_id/2362728');
Line 40: $url = Page::url('2362728');
Line 41: $this->assertTrue($url == 'page/view_by_id/2362728');
Line 43: $url = Page::url('abcde');
Line 44: $this->assertNull($url);
Line 46: $url = Page::url(array());
Line 47: $this->assertNull($url);
/sprout/tests/urlTest.php Highlighted file source
Line 14: use Sprout\Helpers\Url;
Line 17: class urlTest extends PHPUnit_Framework_TestCase
Line 23: $this->assertTrue(Url::checkRedirect('/hello/world'));
Line 24: $this->assertTrue(Url::checkRedirect('hello/world'));
Line 25: $this->assertTrue(Url::checkRedirect('hello/wor_ld'));
Line 26: $this->assertTrue(Url::checkRedirect('hello/wor-ld'));
Line 27: $this->assertTrue(Url::checkRedirect(''));
Line 30: $this->assertTrue(Url::checkRedirect('/hello/world', true));
Line 31: $this->assertTrue(Url::checkRedirect('hello/world', true));
Line 32: $this->assertTrue(Url::checkRedirect('hello/wor_ld', true));
Line 33: $this->assertTrue(Url::checkRedirect('hello/wor-ld', true));
Line 34: $this->assertTrue(Url::checkRedirect('', true));
Line 35: $this->assertTrue(Url::checkRedirect('/hello/world?id=123', true));
Line 36: $this->assertTrue(Url::checkRedirect('hello/world?id=123', true));
Line 37: $this->assertTrue(Url::checkRedirect('hello/wor_ld?id=123', true));
Line 38: $this->assertTrue(Url::checkRedirect('hello/wor-ld?id=123', true));
Line 39: $this->assertTrue(Url::checkRedirect('hello/wor_ld?id=12-3', true));
Line 40: $this->assertTrue(Url::checkRedirect('hello/wor-ld?id=12_3', true));
Line 41: $this->assertTrue(Url::checkRedirect('hello/world?id=12_3', true));
Line 42: $this->assertTrue(Url::checkRedirect('hello/world?id=123%204', true));
Line 43: $this->assertTrue(Url::checkRedirect('hello/world?id=%20', true));
Line 44: $this->assertTrue(Url::checkRedirect('hello/world?id=aa_%20-bb', true));
Line 47: $this->assertFalse(Url::checkRedirect('/hello/world?id=123', false));
Line 48: $this->assertFalse(Url::checkRedirect('hello/world?id=123', false));
Line 49: $this->assertFalse(Url::checkRedirect('hello/wo_rld?id=123', false));
Line 50: $this->assertFalse(Url::checkRedirect('hello/wo-rld?id=123', false));
Line 52: // Incorrect (no base url)
Line 53: $this->assertFalse(Url::checkRedirect('?id=123', false));
Line 54: $this->assertFalse(Url::checkRedirect('?id=123', true));
Line 57: $this->assertFalse(Url::checkRedirect('http://www.evil.com', false));
Line 58: $this->assertFalse(Url::checkRedirect('http://www.evil.com', true));
Line 59: $this->assertFalse(Url::checkRedirect('https://www.evil.com', false));
Line 60: $this->assertFalse(Url::checkRedirect('https://www.evil.com', true));
Line 61: $this->assertFalse(Url::checkRedirect('ftp://www.evil.com', false));
Line 62: $this->assertFalse(Url::checkRedirect('ftp://www.evil.com', true));
Line 65: $this->assertFalse(Url::checkRedirect('://www.evil.com', false));
Line 66: $this->assertFalse(Url::checkRedirect('://www.evil.com', true));
Line 69: $this->assertFalse(Url::checkRedirect("\0"));
Line 70: $this->assertFalse(Url::checkRedirect("\r"));
Line 71: $this->assertFalse(Url::checkRedirect("\t"));
Line 72: $this->assertFalse(Url::checkRedirect("\n"));
Line 75: $this->assertFalse(Url::checkRedirect(array()));
Line 76: $this->assertFalse(Url::checkRedirect(new stdClass));
Line 100: $this->assertEquals($expected, Url::addSocialDomain($social_link, $domain));
Line 104: public function dataAddUrlScheme()
Line 118: * @dataProvider dataAddUrlScheme
Line 120: public function testAddUrlScheme($url, $expected)
Line 122: $this->assertEquals($expected, Url::addUrlScheme($url));
/sprout/tests/urlTest.php Highlighted file source
Line 14: use Sprout\Helpers\Url;
Line 17: class urlTest extends PHPUnit_Framework_TestCase
Line 23: $this->assertTrue(Url::checkRedirect('/hello/world'));
Line 24: $this->assertTrue(Url::checkRedirect('hello/world'));
Line 25: $this->assertTrue(Url::checkRedirect('hello/wor_ld'));
Line 26: $this->assertTrue(Url::checkRedirect('hello/wor-ld'));
Line 27: $this->assertTrue(Url::checkRedirect(''));
Line 30: $this->assertTrue(Url::checkRedirect('/hello/world', true));
Line 31: $this->assertTrue(Url::checkRedirect('hello/world', true));
Line 32: $this->assertTrue(Url::checkRedirect('hello/wor_ld', true));
Line 33: $this->assertTrue(Url::checkRedirect('hello/wor-ld', true));
Line 34: $this->assertTrue(Url::checkRedirect('', true));
Line 35: $this->assertTrue(Url::checkRedirect('/hello/world?id=123', true));
Line 36: $this->assertTrue(Url::checkRedirect('hello/world?id=123', true));
Line 37: $this->assertTrue(Url::checkRedirect('hello/wor_ld?id=123', true));
Line 38: $this->assertTrue(Url::checkRedirect('hello/wor-ld?id=123', true));
Line 39: $this->assertTrue(Url::checkRedirect('hello/wor_ld?id=12-3', true));
Line 40: $this->assertTrue(Url::checkRedirect('hello/wor-ld?id=12_3', true));
Line 41: $this->assertTrue(Url::checkRedirect('hello/world?id=12_3', true));
Line 42: $this->assertTrue(Url::checkRedirect('hello/world?id=123%204', true));
Line 43: $this->assertTrue(Url::checkRedirect('hello/world?id=%20', true));
Line 44: $this->assertTrue(Url::checkRedirect('hello/world?id=aa_%20-bb', true));
Line 47: $this->assertFalse(Url::checkRedirect('/hello/world?id=123', false));
Line 48: $this->assertFalse(Url::checkRedirect('hello/world?id=123', false));
Line 49: $this->assertFalse(Url::checkRedirect('hello/wo_rld?id=123', false));
Line 50: $this->assertFalse(Url::checkRedirect('hello/wo-rld?id=123', false));
Line 52: // Incorrect (no base url)
Line 53: $this->assertFalse(Url::checkRedirect('?id=123', false));
Line 54: $this->assertFalse(Url::checkRedirect('?id=123', true));
Line 57: $this->assertFalse(Url::checkRedirect('http://www.evil.com', false));
Line 58: $this->assertFalse(Url::checkRedirect('http://www.evil.com', true));
Line 59: $this->assertFalse(Url::checkRedirect('https://www.evil.com', false));
Line 60: $this->assertFalse(Url::checkRedirect('https://www.evil.com', true));
Line 61: $this->assertFalse(Url::checkRedirect('ftp://www.evil.com', false));
Line 62: $this->assertFalse(Url::checkRedirect('ftp://www.evil.com', true));
Line 65: $this->assertFalse(Url::checkRedirect('://www.evil.com', false));
Line 66: $this->assertFalse(Url::checkRedirect('://www.evil.com', true));
Line 69: $this->assertFalse(Url::checkRedirect("\0"));
Line 70: $this->assertFalse(Url::checkRedirect("\r"));
Line 71: $this->assertFalse(Url::checkRedirect("\t"));
Line 72: $this->assertFalse(Url::checkRedirect("\n"));
Line 75: $this->assertFalse(Url::checkRedirect(array()));
Line 76: $this->assertFalse(Url::checkRedirect(new stdClass));
Line 100: $this->assertEquals($expected, Url::addSocialDomain($social_link, $domain));
Line 104: public function dataAddUrlScheme()
Line 118: * @dataProvider dataAddUrlScheme
Line 120: public function testAddUrlScheme($url, $expected)
Line 122: $this->assertEquals($expected, Url::addUrlScheme($url));
/sprout/views/admin/file_edit.php Highlighted file source
Line 34: $abs_url = File::absUrl($data['filename']);
Line 58: <?= Form::autocomplete('author', [], ['url' => 'admin/call/file/ajaxAuthorLookup', 'save_id' => false]); ?>
Line 88: <th>URL</th>
Line 94: <td><a href="<?= Enc::html($abs_url ); ?>"><?= Enc::html(Text::limitChars($abs_url, 50)); ?></a></td>
Line 107: <a href="<?php echo Enc::html(File::absUrl($data['filename']));; ?>" target="_blank">
Line 108: <img src="<?php echo Enc::html(File::resizeUrl($data['filename'], 'r200x0')); ?>" alt="preview">
Line 124: $abs_url = Enc::html(File::absUrl($filename));
Line 130: <td><a href="', $abs_url, '" target="_blank"><?= Enc::html($filename); ?></a></td>
Line 202: <div id="focal-point-wrapper"><img id="focal-point-setter" src="<?php echo File::url($data['filename']); ?>"><div id="focal-point-dot"></div></div>
/sprout/views/admin/file_edit.php Highlighted file source
Line 34: $abs_url = File::absUrl($data['filename']);
Line 58: <?= Form::autocomplete('author', [], ['url' => 'admin/call/file/ajaxAuthorLookup', 'save_id' => false]); ?>
Line 88: <th>URL</th>
Line 94: <td><a href="<?= Enc::html($abs_url ); ?>"><?= Enc::html(Text::limitChars($abs_url, 50)); ?></a></td>
Line 107: <a href="<?php echo Enc::html(File::absUrl($data['filename']));; ?>" target="_blank">
Line 108: <img src="<?php echo Enc::html(File::resizeUrl($data['filename'], 'r200x0')); ?>" alt="preview">
Line 124: $abs_url = Enc::html(File::absUrl($filename));
Line 130: <td><a href="', $abs_url, '" target="_blank"><?= Enc::html($filename); ?></a></td>
Line 202: <div id="focal-point-wrapper"><img id="focal-point-setter" src="<?php echo File::url($data['filename']); ?>"><div id="focal-point-dot"></div></div>
/sprout/views/admin/page_edit.php Highlighted file source
Line 58: $share_type = 'Public URL';
Line 59: $share_url = $base . $node->getFriendlyUrlNoprefix();
Line 61: $share_type = 'Temporary URL';
Line 62: $share_url = $base . 'page/view_by_id/' . $id;
Line 132: Form::nextFieldDetails('URL slug', true, 'The text used to generate a link for the page; e.g. "this-is-a-slug" would result in: ' . Sprout::absRoot() . 'this-is-a-slug');
Line 226: $rev_edit_url = "admin/edit/page/{$id}?revision={$rev['id']}";
Line 227: $rev_view_url = "page/view_specific_rev/{$id}/{$rev['id']}";
Line 230: $rev_view_url .= '/' . $rev['approval_code'];
Line 252: <a href="<?= Enc::html($rev_edit_url); ?>" class="button button-small button-green icon-before icon-edit">Edit</a>
Line 253: <a href="<?= Enc::html($rev_view_url); ?>" class="button button-small button-blue icon-before icon-remove_red_eye">View</a>
/sprout/views/admin/page_edit.php Highlighted file source
Line 58: $share_type = 'Public URL';
Line 59: $share_url = $base . $node->getFriendlyUrlNoprefix();
Line 61: $share_type = 'Temporary URL';
Line 62: $share_url = $base . 'page/view_by_id/' . $id;
Line 132: Form::nextFieldDetails('URL slug', true, 'The text used to generate a link for the page; e.g. "this-is-a-slug" would result in: ' . Sprout::absRoot() . 'this-is-a-slug');
Line 226: $rev_edit_url = "admin/edit/page/{$id}?revision={$rev['id']}";
Line 227: $rev_view_url = "page/view_specific_rev/{$id}/{$rev['id']}";
Line 230: $rev_view_url .= '/' . $rev['approval_code'];
Line 252: <a href="<?= Enc::html($rev_edit_url); ?>" class="button button-small button-green icon-before icon-edit">Edit</a>
Line 253: <a href="<?= Enc::html($rev_view_url); ?>" class="button button-small button-blue icon-before icon-remove_red_eye">View</a>
/sprout/views/children_page_gallery.php Highlighted file source
Line 17: <a href="<?php echo Enc::html($page->getFriendlyUrl()); ?>" class="children-gallery-list-item-link">
Line 19: <img src="<?php echo Enc::html(File::resizeUrl($page['gallery_thumb'], $image_resize)); ?>" class="children-gallery-list-item-image" alt="" role="presentation">
/sprout/views/children_page_gallery.php Highlighted file source
Line 17: <a href="<?php echo Enc::html($page->getFriendlyUrl()); ?>" class="children-gallery-list-item-link">
Line 19: <img src="<?php echo Enc::html(File::resizeUrl($page['gallery_thumb'], $image_resize)); ?>" class="children-gallery-list-item-image" alt="" role="presentation">
/sprout/views/dbtools/exception_log.php Highlighted file source
Line 3: use Sprout\Helpers\Url;
Line 49: $cur_url = Url::current();
Line 60: <a href="<?= Enc::html($cur_url . '?' . $prev_query); ?>" class="button icon-before icon-keyboard_arrow_left">Previous page</a>
Line 64: <a href="<?= Enc::html($cur_url . '?' . $next_query); ?>" class="button right icon-after icon-keyboard_arrow_right">Next page</a>
/sprout/views/dbtools/exception_log.php Highlighted file source
Line 3: use Sprout\Helpers\Url;
Line 49: $cur_url = Url::current();
Line 60: <a href="<?= Enc::html($cur_url . '?' . $prev_query); ?>" class="button icon-before icon-keyboard_arrow_left">Previous page</a>
Line 64: <a href="<?= Enc::html($cur_url . '?' . $next_query); ?>" class="button right icon-after icon-keyboard_arrow_right">Next page</a>
/sprout/views/image_gallery_wide.php Highlighted file source
Line 34: <a href="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['full_size'])); ?>"
Line 37: <img src="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['thumb_size_5'] . '-' . $cropping)) ?>" alt="<?php echo Enc::html($image['name']); ?>">
/sprout/views/image_gallery_wide.php Highlighted file source
Line 34: <a href="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['full_size'])); ?>"
Line 37: <img src="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['thumb_size_5'] . '-' . $cropping)) ?>" alt="<?php echo Enc::html($image['name']); ?>">
/sprout/views/image_gallery_wide_grid.php Highlighted file source
Line 34: <a href="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['full_size'])); ?>"
Line 37: <img src="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['thumb_size_' . Enc::html($row_count) . ''] . '-' . $cropping)) ?>" alt="<?php echo Enc::html($image['name']); ?>">
/sprout/views/image_gallery_wide_grid.php Highlighted file source
Line 34: <a href="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['full_size'])); ?>"
Line 37: <img src="<?php echo Enc::html(File::resizeUrl($image['filename'], $config['thumb_size_' . Enc::html($row_count) . ''] . '-' . $cropping)) ?>" alt="<?php echo Enc::html($image['name']); ?>">
/sprout/views/navigation_dropdown.php Highlighted file source
Line 19: <div class="mega-menu-preview-image" style="background-image: url(<?php echo File::resizeUrl($extra['image'], 'c230x120-cc'); ?>);"></div>
Line 45: echo '<a href="', Enc::html($node->getFriendlyUrl()), '">', Enc::html($node->getNavigationName()), '</a>';
/sprout/views/navigation_dropdown.php Highlighted file source
Line 19: <div class="mega-menu-preview-image" style="background-image: url(<?php echo File::resizeUrl($extra['image'], 'c230x120-cc'); ?>);"></div>
Line 45: echo '<a href="', Enc::html($node->getFriendlyUrl()), '">', Enc::html($node->getNavigationName()), '</a>';
/sprout/views/tinymce4/image_size.php Highlighted file source
Line 31: if ($up_url) {
Line 32: echo '<li class="up"><a href="', Enc::html($up_url), '">Up one level</a></li>';
Line 37: echo '<a href="javascript:;" data-src="', Enc::html(File::sizeUrl($image['id'], $size)), '" data-alt="', Enc::html($image['name']), '">', ucwords(str_replace('_', ' ', $size)), '</a>';
Line 41: echo '<a href="javascript:;" data-src="', Enc::html(File::relUrl($image['id'])), '" data-alt="', Enc::html($image['name']), '">Original</a>';
Line 50: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/tinymce4/image_size.php Highlighted file source
Line 31: if ($up_url) {
Line 32: echo '<li class="up"><a href="', Enc::html($up_url), '">Up one level</a></li>';
Line 37: echo '<a href="javascript:;" data-src="', Enc::html(File::sizeUrl($image['id'], $size)), '" data-alt="', Enc::html($image['name']), '">', ucwords(str_replace('_', ' ', $size)), '</a>';
Line 41: echo '<a href="javascript:;" data-src="', Enc::html(File::relUrl($image['id'])), '" data-alt="', Enc::html($image['name']), '">Original</a>';
Line 50: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/tinymce4/library_browse.php Highlighted file source
Line 29: if ($up_url) {
Line 30: echo '<li class="up"><a href="', Enc::html($up_url), '">Up one level</a></li>';
Line 33: foreach ($containers as $url => $name) {
Line 34: echo '<li class="container"><a href="', Enc::html($url), '">', Enc::html($name), '</a></li>';
Line 51: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/tinymce4/library_browse.php Highlighted file source
Line 29: if ($up_url) {
Line 30: echo '<li class="up"><a href="', Enc::html($up_url), '">Up one level</a></li>';
Line 33: foreach ($containers as $url => $name) {
Line 34: echo '<li class="container"><a href="', Enc::html($url), '">', Enc::html($name), '</a></li>';
Line 51: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/tinymce4/video_list.php Highlighted file source
Line 30: <?php if (!empty($up_url)): ?>
Line 31: <li class="up"><a href="<?= Enc::html($up_url); ?>">Up one level</a></li>
Line 35: <li class="object"><a href="javascript:;" data-src="<?= Enc::html(File::relUrl($row['filename'])); ?>"
Line 44: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/tinymce4/video_list.php Highlighted file source
Line 30: <?php if (!empty($up_url)): ?>
Line 31: <li class="up"><a href="<?= Enc::html($up_url); ?>">Up one level</a></li>
Line 35: <li class="object"><a href="javascript:;" data-src="<?= Enc::html(File::relUrl($row['filename'])); ?>"
Line 44: TinyMCE4.setUrl($(this).attr("data-src"));
/sprout/views/video_playlist.php Highlighted file source
Line 4: use Sprout\Helpers\Url;
Line 15: <a href="<?php echo Enc::html(Url::addUrlScheme('www.youtube.com/watch?v=' . $video['id'])); ?>">
Line 16: <img src="<?php echo Enc::html($video['thumb_url']); ?>" alt="<?php echo Enc::html($video['title']); ?>">
/sprout/views/video_playlist.php Highlighted file source
Line 4: use Sprout\Helpers\Url;
Line 15: <a href="<?php echo Enc::html(Url::addUrlScheme('www.youtube.com/watch?v=' . $video['id'])); ?>">
Line 16: <img src="<?php echo Enc::html($video['thumb_url']); ?>" alt="<?php echo Enc::html($video['title']); ?>">
/sprout/Widgets/RelatedLinksWidget.php Highlighted file source
Line 22: use Sprout\Helpers\Url;
Line 71: $page_url = Enc::html($top_anc->getFriendlyUrl());
Line 74: $out .= "<li class=\"{$classes}\"><a href=\"{$page_url}\">{$page_title}</a></li>";
Line 76: $out .= "<li class=\"{$classes}\"><a href=\"{$page_url}\">" . Enc::html($top) . "</a></li>";
Line 108: $node_url = Enc::html($node->getFriendlyUrl());
Line 111: if (Url::current() === $node->getFriendlyUrlNoprefix()) {
Line 120: $out = "<li class=\"{$classes}\"><a href=\"{$node_url}\">{$node_title}</a>";
Line 136: $out = "<li class=\"{$classes}\"><a href=\"{$node_url}\">{$node_title}</a></li>";
/sprout/Widgets/RelatedLinksWidget.php Highlighted file source
Line 22: use Sprout\Helpers\Url;
Line 71: $page_url = Enc::html($top_anc->getFriendlyUrl());
Line 74: $out .= "<li class=\"{$classes}\"><a href=\"{$page_url}\">{$page_title}</a></li>";
Line 76: $out .= "<li class=\"{$classes}\"><a href=\"{$page_url}\">" . Enc::html($top) . "</a></li>";
Line 108: $node_url = Enc::html($node->getFriendlyUrl());
Line 111: if (Url::current() === $node->getFriendlyUrlNoprefix()) {
Line 120: $out = "<li class=\"{$classes}\"><a href=\"{$node_url}\">{$node_title}</a>";
Line 136: $out = "<li class=\"{$classes}\"><a href=\"{$node_url}\">{$node_title}</a></li>";
/sprout/Widgets/Widget.php Highlighted file source
Line 182: * This function should return a URL which can be used to edit the *content* which is
Line 185: * Most widgets show content using a category selection box; the URL should in that
Line 188: * Return NULL if there isn't an appropriate URL to use.
Line 190: public function getEditUrl()
/sprout/Widgets/Widget.php Highlighted file source
Line 182: * This function should return a URL which can be used to edit the *content* which is
Line 185: * Most widgets show content using a category selection box; the URL should in that
Line 188: * Return NULL if there isn't an appropriate URL to use.
Line 190: public function getEditUrl()
A total of 1957 lines in 213 files were found