summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php
new file mode 100644
index 00000000..23987442
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/includes/specials/SpecialUnusedProperties.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace SMW;
+
+use SMWOutputs;
+
+/**
+ * Special page (Special:UnusedProperties) for MediaWiki shows all
+ * unused properties
+ *
+ *
+ * @license GNU GPL v2+
+ * @since 1.9
+ *
+ * @author Markus Krötzsch
+ * @author Jeroen De Dauw
+ * @author mwjames
+ */
+
+/**
+ * This special page (Special:UnusedProperties) for MediaWiki shows all unused
+ * properties.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialUnusedProperties extends SpecialPage {
+
+ /**
+ * @see SpecialPage::__construct
+ * @codeCoverageIgnore
+ */
+ public function __construct() {
+ parent::__construct( 'UnusedProperties' );
+ }
+
+ /**
+ * @see SpecialPage::execute
+ */
+ public function execute( $param ) {
+ $this->setHeaders();
+
+ $out = $this->getOutput();
+
+ $out->setPageTitle( $this->msg( 'unusedproperties' )->text() );
+
+ $page = new UnusedPropertiesQueryPage( $this->getStore(), $this->getSettings() );
+ $page->setContext( $this->getContext() );
+
+ list( $limit, $offset ) = $this->getLimitOffset();
+ $page->doQuery( $offset, $limit, $this->getRequest()->getVal( 'property' ) );
+
+ // Ensure locally collected output data is pushed to the output!
+ SMWOutputs::commitToOutputPage( $out );
+ }
+
+ private function getLimitOffset() {
+ return $this->getRequest()->getLimitOffset();
+ }
+
+ protected function getGroupName() {
+ return 'maintenance';
+ }
+}