mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-01 17:38:24 +01:00
(stable) Promote 2019 Week 50
This commit is contained in:
commit
c4b4a53cad
25 changed files with 135 additions and 65 deletions
|
@ -11690,6 +11690,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorUserEmail' => array(
|
'PhabricatorUserEmail' => array(
|
||||||
'PhabricatorUserDAO',
|
'PhabricatorUserDAO',
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
|
'PhabricatorPolicyInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorUserEmailTestCase' => 'PhabricatorTestCase',
|
'PhabricatorUserEmailTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorUserEmpowerTransaction' => 'PhabricatorUserTransactionType',
|
'PhabricatorUserEmpowerTransaction' => 'PhabricatorUserTransactionType',
|
||||||
|
|
|
@ -64,13 +64,12 @@ final class PhabricatorConfigAllController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($view);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($view);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,7 @@ final class PhabricatorConfigApplicationController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($apps_list);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($apps_list);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
$crumbs = $this->buildApplicationCrumbs()
|
||||||
->addTextCrumb($title)
|
->addTextCrumb($title)
|
||||||
|
@ -29,6 +27,7 @@ final class PhabricatorConfigApplicationController
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,12 @@ final class PhabricatorConfigCacheController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($page);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($page);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,12 @@ final class PhabricatorConfigClusterDatabasesController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($status);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($status);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,12 @@ final class PhabricatorConfigClusterNotificationsController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($status);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($status);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,16 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter(
|
||||||
->setFixed(true)
|
array(
|
||||||
->setMainColumn(array(
|
$repo_status,
|
||||||
$repo_status,
|
$repo_errors,
|
||||||
$repo_errors,
|
));
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,12 @@ final class PhabricatorConfigClusterSearchController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($search_status);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($search_status);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@ abstract class PhabricatorConfigController extends PhabricatorController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildSideNavView($filter = null, $for_app = false) {
|
public function buildSideNavView($filter = null, $for_app = false) {
|
||||||
|
|
||||||
|
|
||||||
$guide_href = new PhutilURI('/guides/');
|
$guide_href = new PhutilURI('/guides/');
|
||||||
$nav = new AphrontSideNavFilterView();
|
$nav = new AphrontSideNavFilterView();
|
||||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||||
|
|
|
@ -167,13 +167,12 @@ final class PhabricatorConfigDatabaseIssueController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($view);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($view);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,13 +142,12 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($body);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($body);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,9 +237,8 @@ final class PhabricatorConfigEditController
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$view = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter(
|
||||||
->setFixed(true)
|
array(
|
||||||
->setMainColumn(array(
|
|
||||||
$error_view,
|
$error_view,
|
||||||
$form_box,
|
$form_box,
|
||||||
$status_items,
|
$status_items,
|
||||||
|
@ -250,6 +249,7 @@ final class PhabricatorConfigEditController
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($view);
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,12 @@ final class PhabricatorConfigGroupController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($view);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($view);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,12 @@ final class PhabricatorConfigHistoryController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($timeline);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($timeline);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,13 +59,12 @@ final class PhabricatorConfigIssueListController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($issue_list);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($issue_list);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,13 +47,12 @@ final class PhabricatorConfigIssueViewController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($content);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($content);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,12 @@ final class PhabricatorConfigListController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($core_list);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($core_list);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,12 @@ final class PhabricatorConfigModuleController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($view);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($view);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,15 +23,13 @@ final class PhabricatorConfigVersionController
|
||||||
|
|
||||||
$content = id(new PHUITwoColumnView())
|
$content = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setNavigation($nav)
|
->setFooter($view);
|
||||||
->setFixed(true)
|
|
||||||
->setMainColumn($view);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
->appendChild($content);
|
->appendChild($content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderModuleStatus($viewer) {
|
public function renderModuleStatus($viewer) {
|
||||||
|
|
|
@ -226,7 +226,7 @@ final class ManiphestTransactionEditor
|
||||||
|
|
||||||
$body->addLinkSection(
|
$body->addLinkSection(
|
||||||
pht('TASK DETAIL'),
|
pht('TASK DETAIL'),
|
||||||
PhabricatorEnv::getProductionURI('/T'.$object->getID()));
|
$this->getObjectLinkButtonURIForMail($object));
|
||||||
|
|
||||||
|
|
||||||
$board_phids = array();
|
$board_phids = array();
|
||||||
|
|
|
@ -29,6 +29,12 @@ final class PhabricatorPeopleUserEmailPHIDType
|
||||||
PhabricatorHandleQuery $query,
|
PhabricatorHandleQuery $query,
|
||||||
array $handles,
|
array $handles,
|
||||||
array $objects) {
|
array $objects) {
|
||||||
|
|
||||||
|
foreach ($handles as $phid => $handle) {
|
||||||
|
$email = $objects[$phid];
|
||||||
|
$handle->setName($email->getAddress());
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,32 @@ final class PhabricatorPeopleUserEmailQuery
|
||||||
return $where;
|
return $where;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function willLoadPage(array $page) {
|
||||||
|
|
||||||
|
$user_phids = mpull($page, 'getUserPHID');
|
||||||
|
|
||||||
|
$users = id(new PhabricatorPeopleQuery())
|
||||||
|
->setViewer($this->getViewer())
|
||||||
|
->setParentQuery($this)
|
||||||
|
->withPHIDs($user_phids)
|
||||||
|
->execute();
|
||||||
|
$users = mpull($users, null, 'getPHID');
|
||||||
|
|
||||||
|
foreach ($page as $key => $address) {
|
||||||
|
$user = idx($users, $address->getUserPHID());
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
unset($page[$key]);
|
||||||
|
$this->didRejectResult($address);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$address->attachUser($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $page;
|
||||||
|
}
|
||||||
|
|
||||||
public function getQueryApplicationClass() {
|
public function getQueryApplicationClass() {
|
||||||
return 'PhabricatorPeopleApplication';
|
return 'PhabricatorPeopleApplication';
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
*/
|
*/
|
||||||
final class PhabricatorUserEmail
|
final class PhabricatorUserEmail
|
||||||
extends PhabricatorUserDAO
|
extends PhabricatorUserDAO
|
||||||
implements PhabricatorDestructibleInterface {
|
implements
|
||||||
|
PhabricatorDestructibleInterface,
|
||||||
|
PhabricatorPolicyInterface {
|
||||||
|
|
||||||
protected $userPHID;
|
protected $userPHID;
|
||||||
protected $address;
|
protected $address;
|
||||||
|
@ -14,6 +16,8 @@ final class PhabricatorUserEmail
|
||||||
protected $isPrimary;
|
protected $isPrimary;
|
||||||
protected $verificationCode;
|
protected $verificationCode;
|
||||||
|
|
||||||
|
private $user = self::ATTACHABLE;
|
||||||
|
|
||||||
const MAX_ADDRESS_LENGTH = 128;
|
const MAX_ADDRESS_LENGTH = 128;
|
||||||
|
|
||||||
protected function getConfiguration() {
|
protected function getConfiguration() {
|
||||||
|
@ -52,6 +56,15 @@ final class PhabricatorUserEmail
|
||||||
return parent::save();
|
return parent::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function attachUser(PhabricatorUser $user) {
|
||||||
|
$this->user = $user;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser() {
|
||||||
|
return $this->assertAttached($this->user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( Domain Restrictions )------------------------------------------------ */
|
/* -( Domain Restrictions )------------------------------------------------ */
|
||||||
|
|
||||||
|
@ -287,4 +300,28 @@ final class PhabricatorUserEmail
|
||||||
$this->delete();
|
$this->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
public function getCapabilities() {
|
||||||
|
return array(
|
||||||
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPolicy($capability) {
|
||||||
|
$user = $this->getUser();
|
||||||
|
|
||||||
|
if ($this->getIsSystemAgent() || $this->getIsMailingList()) {
|
||||||
|
return PhabricatorPolicies::POLICY_ADMIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $user->getPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,23 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markupDocumentLink(array $matches) {
|
public function markupDocumentLink(array $matches) {
|
||||||
|
$name = trim(idx($matches, 2, ''));
|
||||||
|
if (empty($matches[2])) {
|
||||||
|
$name = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = trim($matches[1]);
|
||||||
|
|
||||||
|
if (!$this->isFlatText($name)) {
|
||||||
|
return $matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$this->isFlatText($path)) {
|
||||||
|
return $matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
// If the link contains an anchor, separate that off first.
|
// If the link contains an anchor, separate that off first.
|
||||||
$parts = explode('#', trim($matches[1]), 2);
|
$parts = explode('#', $path, 2);
|
||||||
if (count($parts) == 2) {
|
if (count($parts) == 2) {
|
||||||
$link = $parts[0];
|
$link = $parts[0];
|
||||||
$anchor = $parts[1];
|
$anchor = $parts[1];
|
||||||
|
@ -48,11 +63,6 @@ final class PhrictionRemarkupRule extends PhutilRemarkupRule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = trim(idx($matches, 2, ''));
|
|
||||||
if (empty($matches[2])) {
|
|
||||||
$name = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Link is now used for slug detection, so append a slash if one
|
// Link is now used for slug detection, so append a slash if one
|
||||||
// is needed.
|
// is needed.
|
||||||
$link = rtrim($link, '/').'/';
|
$link = rtrim($link, '/').'/';
|
||||||
|
|
|
@ -136,6 +136,14 @@ final class PhutilRemarkupDocumentLinkRule extends PhutilRemarkupRule {
|
||||||
$uri = trim($matches[1]);
|
$uri = trim($matches[1]);
|
||||||
$name = trim(idx($matches, 2));
|
$name = trim(idx($matches, 2));
|
||||||
|
|
||||||
|
if (!$this->isFlatText($uri)) {
|
||||||
|
return $matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$this->isFlatText($name)) {
|
||||||
|
return $matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
// If whatever is being linked to begins with "/" or "#", or has "://",
|
// If whatever is being linked to begins with "/" or "#", or has "://",
|
||||||
// or is "mailto:" or "tel:", treat it as a URI instead of a wiki page.
|
// or is "mailto:" or "tel:", treat it as a URI instead of a wiki page.
|
||||||
$is_uri = preg_match('@(^/)|(://)|(^#)|(^(?:mailto|tel):)@', $uri);
|
$is_uri = preg_match('@(^/)|(://)|(^#)|(^(?:mailto|tel):)@', $uri);
|
||||||
|
|
Loading…
Add table
Reference in a new issue