function getEndBody()
 {
     $colums = count($this->getFieldNames());
     if ($this->even) {
         $class = 'mw-line-even';
     } else {
         $class = 'mw-line-odd';
     }
     $this->even = !$this->even;
     $html = "<tr class=\"{$class} mw-line-last\"><td colspan=\"{$colums}\">";
     $html .= SpecialWikiplaces::getLinkCreateSubpage($this->wpName, 'wp-create-page-long');
     $html .= "</td></tr>";
     $html .= "</tbody></table>\n";
     return $html;
 }
 function getEndBody()
 {
     $html = "";
     if ($this->forMember == false) {
         $colums = count($this->getFieldNames());
         if ($this->even) {
             $class = 'mw-line-even';
         } else {
             $class = 'mw-line-odd';
         }
         $this->even = !$this->even;
         $html .= "<tr class=\"{$class} mw-line-last\"><td colspan=\"{$colums}\">";
         $html .= SpecialWikiplaces::getLinkAddMember($this->wpNameDb, 'wp-add-member-long');
         $html .= "</td></tr>";
     }
     $html .= "</tbody></table>\n";
     return $html;
 }
Example #3
0
 /**
  * Hook to <ul>
  * <li>correct the action menu that displays "delete" a bit too much.
  * A direct correction would be to change the logic directly in SkinTemplate::buildContentNavigationUrls.
  * The menu builder now uses if( $wgUser->isAllowed( 'delete' ) ) ...
  * A better builder would use if( $$title->quickUserCan( 'delete' ) ) ...</li>
  * <li>add a "Set as background" action for files</li>
  * </ul>
  * @param SkinTemplate $skinTemplate
  * @param Array $content_navigation
  * @return Boolean True (=continue hook)
  * 
  */
 public static function SkinTemplateNavigation(&$skinTemplate, &$content_navigation)
 {
     $title = $skinTemplate->getRelevantTitle();
     // removes "delete" action if necessary
     if (isset($content_navigation['actions']['delete']) && !$title->quickUserCan('delete')) {
         unset($content_navigation['actions']['delete']);
     }
     // adds a "Set as background" action for files
     global $wgUser;
     if (in_array(WP_SUBSCRIBERS_USER_GROUP, $wgUser->getGroups()) && WpWikiplace::isTitleValidForBackground($title) && count(WpWikiplace::factoryAllOwnedByUserId($wgUser->getId())) != 0) {
         $content_navigation['actions']['background'] = array('class' => false, 'text' => wfMessage('wp-background-action')->text(), 'href' => SpecialWikiplaces::getLocalUrlForSetAsBackground($title->getPrefixedDBkey()));
     }
     return true;
 }
 function getEndBody()
 {
     $html = "";
     if ($this->forMember == false) {
         $colums = count($this->getFieldNames());
         if ($this->even) {
             $class = 'mw-line-even';
         } else {
             $class = 'mw-line-odd';
         }
         $this->even = !$this->even;
         $html .= "<tr class=\"{$class} mw-line-last\"><td colspan=\"{$colums}\">";
         $html .= SpecialWikiplaces::getLinkCreateWikiplace('wp-create-wikiplace-long');
         $html .= "</td></tr>";
     }
     $html .= parent::getEndBody();
     return $html;
 }