Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
https://joomla.stackexchange.com/q/26382/12352
생성일
7년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
10 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
41 행
복사
6 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
39 행
복사
class BookstoreRouter extends JComponentRouterView
class BookstoreRouter extends JComponentRouterView
{
{
public function __construct($app = null, $menu = null)
public function __construct($app = null, $menu = null)
{
{
$books = new JComponentRouterViewconfiguration('books');
$books = new JComponentRouterViewconfiguration('books');
복사
복사됨
복사
복사됨
$books->setNestable();
$this->registerView($books);
$this->registerView($books);
$book = new JComponentRouterViewconfiguration('book');
$book = new JComponentRouterViewconfiguration('book');
$book->setKey('id')->setParent($books);
$book->setKey('id')->setParent($books);
$this->registerView($book);
$this->registerView($book);
parent::__construct($app, $menu);
parent::__construct($app, $menu);
$this->attachRule(new JComponentRouterRulesMenu($this));
$this->attachRule(new JComponentRouterRulesMenu($this));
$this->attachRule(new JComponentRouterRulesStandard($this));
$this->attachRule(new JComponentRouterRulesStandard($this));
$this->attachRule(new JComponentRouterRulesNomenu($this));
$this->attachRule(new JComponentRouterRulesNomenu($this));
}
}
public function getBookSegment($id, $query)
public function getBookSegment($id, $query)
{
{
복사
복사됨
복사
복사됨
if (
!
strpos($
id
, ':')
)
if (
strpos($
query['id']
, ':')
=== false)
{
{
$db = JFactory::getDbo();
$db = JFactory::getDbo();
$dbquery = $db->getQuery(true);
$dbquery = $db->getQuery(true);
복사
복사됨
복사
복사됨
$dbquery->select($
dbquery->qn
('alias'))
$dbquery->select($
db->quoteName
('alias'))
->from($
dbquery->qn
('#__bookstore_books'))
->from($
db->quoteName
('#__bookstore_books'))
->where('id = ' . $
dbquery->q
($id));
->where('id = ' . $
db->quote
($id));
$db->setQuery($dbquery);
$db->setQuery($dbquery);
$id .= ':' . $db->loadResult();
$id .= ':' . $db->loadResult();
}
}
복사
복사됨
복사
복사됨
return array((int)
$id => $id);
return array((int)
$id => $id);
}
}
public function getBookId($segment, $query)
public function getBookId($segment, $query)
{
{
복사
복사됨
복사
복사됨
return (int)
$segment;
return (int)
$segment;
}
}
}
}
저장된 비교 결과
원본
파일 열기
class BookstoreRouter extends JComponentRouterView { public function __construct($app = null, $menu = null) { $books = new JComponentRouterViewconfiguration('books'); $books->setNestable(); $this->registerView($books); $book = new JComponentRouterViewconfiguration('book'); $book->setKey('id')->setParent($books); $this->registerView($book); parent::__construct($app, $menu); $this->attachRule(new JComponentRouterRulesMenu($this)); $this->attachRule(new JComponentRouterRulesStandard($this)); $this->attachRule(new JComponentRouterRulesNomenu($this)); } public function getBookSegment($id, $query) { if (!strpos($id, ':')) { $db = JFactory::getDbo(); $dbquery = $db->getQuery(true); $dbquery->select($dbquery->qn('alias')) ->from($dbquery->qn('#__bookstore_books')) ->where('id = ' . $dbquery->q($id)); $db->setQuery($dbquery); $id .= ':' . $db->loadResult(); } return array((int) $id => $id); } public function getBookId($segment, $query) { return (int) $segment; } }
수정본
파일 열기
class BookstoreRouter extends JComponentRouterView { public function __construct($app = null, $menu = null) { $books = new JComponentRouterViewconfiguration('books'); $this->registerView($books); $book = new JComponentRouterViewconfiguration('book'); $book->setKey('id')->setParent($books); $this->registerView($book); parent::__construct($app, $menu); $this->attachRule(new JComponentRouterRulesMenu($this)); $this->attachRule(new JComponentRouterRulesStandard($this)); $this->attachRule(new JComponentRouterRulesNomenu($this)); } public function getBookSegment($id, $query) { if (strpos($query['id'], ':') === false) { $db = JFactory::getDbo(); $dbquery = $db->getQuery(true); $dbquery->select($db->quoteName('alias')) ->from($db->quoteName('#__bookstore_books')) ->where('id = ' . $db->quote($id)); $db->setQuery($dbquery); $id .= ':' . $db->loadResult(); } return array((int)$id => $id); } public function getBookId($segment, $query) { return (int)$segment; } }
비교하기