Skip to content

Commit f3d1fd8

Browse files
committed
Redirect tool pages to Striker
Bug: T193437
1 parent 942ec3e commit f3d1fd8

4 files changed

Lines changed: 2 additions & 176 deletions

File tree

data/templates/tool.html

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/App.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,8 @@ function () use ( $slim ) {
270270
} )->name( 'toolsjs' );
271271

272272
$slim->get( 'tool/:name', function ( $name ) use ( $slim ) {
273-
$page = new Pages\Tool( $slim );
274-
$page->setI18nContext( $slim->i18nContext );
275-
$page->setTools( $slim->tools );
276-
$page->setLabsDao( $slim->labsDao );
273+
$page = new Pages\Redirect( $slim );
274+
$page->setBaseUrl( 'https://toolsadmin.wikimedia.org/tools/id/' );
277275
$page( $name );
278276
} )->name( 'tool' );
279277

src/LabsDao.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ public function getAllTools() {
6666
return $tools;
6767
}
6868

69-
public function getTool( $name ) {
70-
$key = "labsdb:tool:{$name}";
71-
$tool = $this->cache->load( $key );
72-
if ( !$tool ) {
73-
$row = $this->fetch(
74-
'SELECT * FROM tools WHERE name = ?',
75-
[ $name ]
76-
);
77-
if ( $row ) {
78-
$tool = $this->toolsRowToArray( $row );
79-
$this->cache->save( $key, $tool, 900 );
80-
}
81-
}
82-
return $tool;
83-
}
84-
8569
protected function toolsRowToArray( $row ) {
8670
$row['maintainers'] = explode( ' ', $row['maintainers'] );
8771
sort( $row['maintainers'] );

src/Pages/Tool.php

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)