r39440 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39439‎ | r39440 | r39441 >
Date:21:04, 15 August 2008
Author:siebrand
Status:old
Tags:
Comment:
* remove dependency on ExtensionFunctions.php
* add $wgExtensionAliasesFiles and support in Translate
* methods renamed for consistency with other extensions
* delayed message loading
* removed EOL whitespace
* removed some commented out code ($wgExtensionFunctions)
Modified paths:
  • /trunk/extensions/SignDocument/README.txt (modified) (history)
  • /trunk/extensions/SignDocument/SignDocument.alias.php (added) (history)
  • /trunk/extensions/SignDocument/SignDocument.php (modified) (history)
  • /trunk/extensions/SignDocument/SignDocumentHelpers.php (modified) (history)
  • /trunk/extensions/SignDocument/SpecialCreateSignDocument.php (modified) (history)
  • /trunk/extensions/SignDocument/SpecialSignDocument.php (modified) (history)
  • /trunk/extensions/SignDocument/signdocument.sql (modified) (history)
  • /trunk/extensions/Translate/aliases.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/SignDocument/SignDocument.php
@@ -3,19 +3,15 @@
44 /**
55 * Sets up the extension.
66 */
7 -
 7+
88 if (!defined('MEDIAWIKI')) {
9 - echo <<<EOT
 9+ echo <<<EOT
1010 To install my extension, put the following line in LocalSettings.php:
1111 require_once( "\$IP/extensions/SignDocument/SignDocument.php.php" );
1212 EOT;
13 - exit( 1 );
 13+ exit( 1 );
1414 }
1515
16 -if ( !function_exists( 'extAddSpecialPage' ) ) {
17 - require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
18 -}
19 -
2016 /**
2117 * Adds two special pages, Special:SignDocument and Special:CreateSignDocument, which
2218 * enable the creation of signable documents. See the README for more information.
@@ -26,28 +22,29 @@
2723 * @copyright Copyright © 2007, Daniel Cannon
2824 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
2925 */
30 -
3126
32 -#$wgExtensionFunctions[] = 'wfSpecialSignDocument';
33 -#$wgExtensionFunctions[] = 'wfSpecialCreateSignDocument';
3427 $wgExtensionFunctions[] = 'wfCreateSignatureLog';
3528
3629 $wgExtensionCredits['specialpage'][] = array(
37 - 'name' => 'SignDocument',
38 - 'author' => 'Daniel Cannon',
39 - 'description' => 'Enables document signing',
 30+ 'name' => 'SignDocument',
 31+ 'author' => 'Daniel Cannon',
 32+ 'description' => 'Enables document signing',
4033 'descriptionmsg' => 'signature-desc',
41 - 'svn-date' => '$LastChangedDate$',
42 - 'svn-revision' => '$LastChangedRevision$',
43 - 'url' => 'http://www.mediawiki.org/wiki/Extension:SignDocument',
 34+ 'svn-date' => '$LastChangedDate$',
 35+ 'svn-revision' => '$LastChangedRevision$',
 36+ 'url' => 'http://www.mediawiki.org/wiki/Extension:SignDocument',
4437 );
4538
4639 $dir = dirname(__FILE__) . '/';
4740 $wgExtensionMessagesFiles['SignDocument'] = $dir . 'SignDocument.i18n.php';
4841 $wgExtensionMessagesFiles['SpecialSignDocument'] = $dir . 'SpecialSignDocument.i18n.php';
4942 $wgExtensionMessagesFiles['CreateSignDocument'] = $dir . 'SpecialCreateSignDocument.i18n.php';
50 -extAddSpecialPage( $dir . 'SpecialSignDocument.php', 'SignDocument', 'SignDocument' );
51 -extAddSpecialPage( $dir. 'SpecialCreateSignDocument.php', 'CreateSignDocument', 'CreateSignDocument' );
 43+$wgExtensionAliasesFiles['SignDocument'] = $dir . 'SignDocument.alias.php';
 44+$wgAutoloadClasses['SpecialSignDocument'] = $dir . 'SpecialSignDocument.php';
 45+$wgAutoloadClasses['SpecialCreateSignDocument'] = $dir . 'SpecialCreateSignDocument.php';
 46+$wgSpecialPages['SignDocument'] = 'SpecialSignDocument';
 47+$wgSpecialPages['CreateSignDocument'] = 'SpecialCreateSignDocument';
 48+
5249 /* Set up sigadmin permissions. */
5350 $wgAvailableRights[] = 'sigadmin';
5451 $wgAvailableRights[] = 'createsigndocument';
@@ -61,7 +58,7 @@
6259 */
6360 function wfCreateSignatureLog() {
6461 wfLoadExtensionMessages('SignDocument');
65 -
 62+
6663 # Add a new log type
6764 global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;
6865
@@ -79,7 +76,6 @@
8077 function wfLogSignDocumentSignature( $sig ) {
8178 global $wgUser;
8279 $log = new LogPage( 'signature' );
83 - $log->addEntry( 'sign', Title::newFromId( $sig->mForm->getPageId() ),
 80+ $log->addEntry( 'sign', Title::newFromId( $sig->mForm->getPageId() ),
8481 'id=' . $sig->mId );
85 -
8682 }
Index: trunk/extensions/SignDocument/SpecialSignDocument.php
@@ -1,37 +1,38 @@
2 -<?PHP
 2+<?PHP
33 if (!defined('MEDIAWIKI')) die();
44 require_once( 'SignDocumentHelpers.php' );
55
66 // TODO: Doc
7 -class SignDocument extends SpecialPage {
 7+class SpecialSignDocument extends SpecialPage {
88 /**
99 * The Document the user wants to sign.
1010 * @type int
1111 */
1212 private $mDocumentId;
13 -
 13+
1414 private $mArticle;
1515 private $mTitle;
16 -
 16+
1717 private $mCurrentSig;
1818 private $mForm;
19 -
 19+
2020 /**
21 - * Constructor
22 - */
23 - function SignDocument() {
 21+ * Constructor
 22+ */
 23+ function __construct() {
2424 SpecialPage::SpecialPage( 'SignDocument', 'sigadmin' );
25 - wfLoadExtensionMessages('SpecialSignDocument');
2625 $this->includable( true );
2726 }
2827
2928 function execute($par = null) {
3029 global $wgOut, $wgRequest, $wgUser;
3130
 31+ wfLoadExtensionMessages('SpecialSignDocument');
 32+
3233 $this->setHeaders();
3334 if ( $wgUser->isAllowed( 'sigadmin' ) ) {
3435 $this->mDocumentId = (int) $wgRequest->getVal( 'doc', null );
35 -
 36+
3637 if ( $this->mDocumentId && !is_null($wgRequest->getVal( 'viewsigs' )) ) {
3738 $tmp = new SignatureViewer();
3839 $tmp->execute();
@@ -57,7 +58,7 @@
5859 global $wgOut, $wgTitle;
5960
6061 $wgOut->addWikiText( wfMsg( 'sign-nodocselected' ) );
61 -
 62+
6263 $out = '';
6364 $out .= wfOpenElement( 'form', array(
6465 'id' => 'mw-SignDocument-SelectDoc-form',
@@ -67,14 +68,14 @@
6869 $out .= '<p><strong>' . wfMsg( 'sign-selectdoc' ) . '</strong>&nbsp;';
6970
7071 $out .= $this->buildDocSelector();
71 -
 72+
7273 $out .= wfElement( 'input', array(
7374 'id' => 'mw-SelectDoc-submit',
7475 'type' => 'submit',
7576 'value' => wfMsg( 'go' ) ) );
76 -
 77+
7778 $out .= '</p></form>';
78 -
 79+
7980 $wgOut->addHTML( $out );
8081 }
8182
@@ -84,19 +85,19 @@
8586 $attribs = array(
8687 'id' => $id,
8788 'name' => 'doc',
88 - 'size' => '1',
 89+ 'size' => '1',
8990 );
9091
9192 $out = wfOpenElement( 'select', $attribs );
9293
9394 $itms = SignDocumentForm::getNamesFromDB();
9495 $firstItem = null;
95 -
 96+
9697 foreach(array_keys($itms) as $itm) {
9798 if (!$firstItem) $firstItem = $itm;
9899 $out .= $this->buildOption( $itm, $itms[$itm], $firstItem );
99100 }
100 -
 101+
101102 $out .= "</select>\n";
102103 return $out;
103104 }
@@ -105,22 +106,22 @@
106107 $selectedAttrib = ($selected == $text)
107108 ? array( 'selected' => 'selected' )
108109 : array();
109 -
 110+
110111 return wfElement( 'option',
111112 array( 'value' => $value ) + $selectedAttrib,
112113 $text );
113114 }
114 -
 115+
115116 function showSignForm() {
116117 global $wgOut, $wgUser, $wgRequest, $wgTitle;
117 -
 118+
118119 $this->mForm = SignDocumentForm::newFromDB( $wgRequest->getVal('doc') );
119 -
 120+
120121 if ( !$this->mForm ) {
121122 $wgOut->addWikiText( wfMsg( 'sign-error-nosuchdoc', $wgRequest->getVal('doc') ) );
122123 return;
123124 }
124 -
 125+
125126 if ( !in_array( $this->mForm->mAllowedGroup, $wgUser->getEffectiveGroups() ) ) {
126127 $wgOut->permissionRequired( $this->mForm->mAllowedGroup );
127128 return;
@@ -130,17 +131,17 @@
131132
132133 $wgOut->addHTML( '<div style="position:absolute; top:5px; right:10px;">' .
133134 '[<b>'. $skin->makeKnownLinkObj( SpecialPage::getTitleFor('SignDocument'),
134 - wfMsg( 'sign-viewsignatures' ), 'doc=' . $wgRequest->getVal('doc')
 135+ wfMsg( 'sign-viewsignatures' ), 'doc=' . $wgRequest->getVal('doc')
135136 . '&viewsigs&timestamp&realname')
136137 . '</b>]</div>' );
137 -
 138+
138139 if ( !$this->mForm->mOpen ) {
139140 $wgOut->addWikiText( wfMsg( 'sign-error-closed' ) );
140141 $wgOut->addHTML( '<h1>' . $this->mForm->mPagename . '</h1>' );
141142 $wgOut->addWikiText( $this->mForm->mArticle->getContent() );
142143 return;
143144 }
144 -
 145+
145146 $wgOut->addWikiText( wfMsg( 'sign-docheader', $this->mForm->mPagename ) );
146147
147148 $wgOut->addHTML( '<h1>' . $this->mForm->mPagename . '</h1>' );
@@ -151,7 +152,7 @@
152153 $wgOut->addWikiText( wfMsg( 'sign-information', $this->mForm->mIntrotext ) );
153154
154155 $wgOut->addHTML( '<br />' );
155 -
 156+
156157 $this->addSignForm();
157158 }
158159
@@ -162,7 +163,7 @@
163164
164165 /* We need the values the user submitted, even if they're not listed. */
165166 $this->mCurrentSig->setAllAccessible( true );
166 -
 167+
167168 $out = '';
168169
169170 $out .= wfOpenElement( 'form', array(
@@ -171,47 +172,47 @@
172173 'method' => 'post') );
173174
174175 $out .= '<table>';
175 - $out .= $this->makeInput( false, false, 'realname', wfMsg('sign-realname'),
 176+ $out .= $this->makeInput( false, false, 'realname', wfMsg('sign-realname'),
176177 $this->mCurrentSig->getRealname(), 'anonymous' );
177 -
178 - $out .= $this->makeInput( $this->mForm->mAddressHidden,
 178+
 179+ $out .= $this->makeInput( $this->mForm->mAddressHidden,
179180 $this->mForm->mAddressOptional,
180 - 'address', wfMsg('sign-address'),
 181+ 'address', wfMsg('sign-address'),
181182 $this->mCurrentSig->getAddress(), 'hideaddress' );
182 - $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
 183+ $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
183184 $this->mForm->mExtAddressOptional,
184 - 'city', wfMsg('sign-city'),
 185+ 'city', wfMsg('sign-city'),
185186 $this->mCurrentSig->getCity(), 'hideextaddress' );
186 - $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
 187+ $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
187188 $this->mForm->mExtAddressOptional,
188 - 'state', wfMsg('sign-state'),
 189+ 'state', wfMsg('sign-state'),
189190 $this->mCurrentSig->getState(), false );
190 - $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
 191+ $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
191192 $this->mForm->mExtAddressOptional,
192 - 'zip', wfMsg('sign-zip'),
 193+ 'zip', wfMsg('sign-zip'),
193194 $this->mCurrentSig->getZip(), false );
194 - $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
 195+ $out .= $this->makeInput( $this->mForm->mExtAddressHidden,
195196 $this->mForm->mExtAddressOptional,
196 - 'country', wfMsg('sign-country'),
 197+ 'country', wfMsg('sign-country'),
197198 $this->mCurrentSig->getCountry(), false );
198 - $out .= $this->makeInput( $this->mForm->mPhoneHidden,
 199+ $out .= $this->makeInput( $this->mForm->mPhoneHidden,
199200 $this->mForm->mPhoneOptional,
200 - 'phone', wfMsg('sign-phone'),
 201+ 'phone', wfMsg('sign-phone'),
201202 $this->mCurrentSig->getPhone(), 'hidephone' );
202 - $out .= $this->makeInput( $this->mForm->mBdayHidden,
 203+ $out .= $this->makeInput( $this->mForm->mBdayHidden,
203204 $this->mForm->mBdayOptional,
204 - 'bday', wfMsg('sign-bday'),
 205+ 'bday', wfMsg('sign-bday'),
205206 $this->mCurrentSig->getBday(), 'hidebday' );
206 - $out .= $this->makeInput( $this->mForm->mEmailHidden,
 207+ $out .= $this->makeInput( $this->mForm->mEmailHidden,
207208 $this->mForm->mEmailOptional,
208 - 'email', wfMsg('sign-email'),
 209+ 'email', wfMsg('sign-email'),
209210 $this->mCurrentSig->getEmail(), 'hideemail' );
210211
211212 $out .= '<tr><td></td><td>' . wfMsg( 'sign-indicates-req' ) . '</td></tr>';
212213 $out .= '<tr><td></td><td>' . wfMsg( 'sign-hide-note' ) . '</td></tr>';
213214
214215 $out .= wfElement( 'input', array(
215 -
 216+
216217 'type' => 'hidden',
217218 'name' => 'doc',
218219 'value' => $wgRequest->getVal('doc') ) );
@@ -222,7 +223,7 @@
223224 'value' => wfMsg( 'sign-submit') ) );
224225
225226 $out .= '</td></tr>';
226 -
 227+
227228 $out .= '</table></form>';
228229
229230 $wgOut->addHTML( $out );
@@ -247,9 +248,9 @@
248249 $markPrivate,
249250 false);
250251 }
251 -
 252+
252253 $out .= '</td></tr>';
253 -
 254+
254255 return $out;
255256 }
256257
@@ -264,9 +265,9 @@
265266
266267 function doSigning() {
267268 global $wgRequest, $wgOut, $wgUser;
268 -
 269+
269270 $this->mCurrentSig = SignDocumentSignature::newFromPost();
270 -
 271+
271272 if ( !$this->mCurrentSig->mForm->mOpen ) {
272273 $wgOut->addWikiText( wfMsg( 'sign-error-closed' ) );
273274 return;
@@ -274,7 +275,7 @@
275276
276277 $wgOut->addHTML( '<div style="position:absolute; top:5px; right:10px;">' .
277278 '[<b>'. $wgUser->getSkin()->makeKnownLinkObj( SpecialPage::getTitleFor('SignDocument'),
278 - wfMsg( 'sign-viewsignatures' ), 'doc=' . $wgRequest->getVal('doc')
 279+ wfMsg( 'sign-viewsignatures' ), 'doc=' . $wgRequest->getVal('doc')
279280 . '&viewsigs&timestamp&realname')
280281 . '</b>]</div>' );
281282
@@ -289,9 +290,9 @@
290291 }
291292
292293 $this->mCurrentSig->addToDB();
293 -
 294+
294295 wfLogSignDocumentSignature($this->mCurrentSig);
295 -
 296+
296297 $wgOut->addWikiText( wfMsg( 'sig-success' ) );
297298 }
298299 }
@@ -301,19 +302,19 @@
302303 */
303304 class SignatureViewer {
304305 private $mForm, $mSigs;
305 -
 306+
306307 private $mFields;
307 -
 308+
308309 function execute() {
309310 global $wgRequest, $wgTitle, $wgUser;
310311
311312 if ($wgRequest->getVal('detail')) {
312313 $this->doDetail();
313314 return;
314 - } else
315 -
 315+ } else
 316+
316317 $this->setUp();
317 -
 318+
318319 if ($wgRequest->wasPosted() && $wgUser->isAllowed('sigadmin')) {
319320 if (!is_null($wgRequest->getVal('opensigning') ) )
320321 $this->openSigning();
@@ -322,20 +323,20 @@
323324 }
324325
325326 global $wgOut;
326 -
 327+
327328 //TODO: Add counts, etc.
328329 $wgOut->addWikiText( wfMsg( 'sign-viewsigs-intro', $this->mForm->mPagename, $this->mForm->getId() ) );
329330
330331 $wgOut->addHTML( $this->getCloseOpenOptions() );
331 -
 332+
332333 $wgOut->addHTML( '<br />' . $this->getFieldSelector() );
333 -
 334+
334335 $wgOut->addHTML( '<fieldset><legend>' . wfMsg('sign-signatures') . '</legend>' );
335336 $wgOut->addHTML( $this->getTableHead() );
336337
337338 foreach ($this->mSigs as $sig)
338339 $wgOut->addHTML( $this->getSigRow($sig, $sig->mStricken ) );
339 -
 340+
340341 $wgOut->addHTML( '</table>' );
341342 $wgOut->addHTML( '</fieldset>' );
342343
@@ -367,14 +368,14 @@
368369 'agent' => !is_null($wgRequest->getVal('agent'))
369370 );
370371 }
371 -
 372+
372373 private function getCloseOpenOptions() {
373374 global $wgUser, $wgTitle;
374375 if (!$wgUser->isAllowed('sigadmin')) return '';
375376
376377 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $this->mForm->getId()
377378 . '&viewsigs';
378 -
 379+
379380 $out = wfOpenElement( 'form', array(
380381 'id' => 'wm-sign-viewsigs-closeopen-form',
381382 'action' => $url,
@@ -386,7 +387,7 @@
387388 'type' => 'submit',
388389 'name' => 'closesigning-submit',
389390 'value' => wfMsg( 'sign-sigadmin-close' ) ) );
390 - $out .= wfElement( 'input', array(
 391+ $out .= wfElement( 'input', array(
391392 'type' => 'hidden',
392393 'name' => 'closesigning') );
393394 } else {
@@ -395,7 +396,7 @@
396397 'type' => 'submit',
397398 'name' => 'opensigning-submit',
398399 'value' => wfMsg( 'sign-sigadmin-open' ) ) );
399 - $out .= wfElement( 'input', array(
 400+ $out .= wfElement( 'input', array(
400401 'type' => 'hidden',
401402 'name' => 'opensigning') );
402403 }
@@ -415,7 +416,7 @@
416417 $out .= wfMsg( 'sign-view-selectfields' );
417418
418419 $out .= wfElement( 'input', array(
419 - 'type' => 'hidden', 'name' => 'doc',
 420+ 'type' => 'hidden', 'name' => 'doc',
420421 'value' => $this->mForm->getId()));
421422
422423 $out .= wfElement( 'input', array(
@@ -423,10 +424,10 @@
424425
425426 foreach (array_keys($this->mFields) as $field)
426427 $out .= $this->fieldCheck($field);
427 -
428 - $out .= '&nbsp;' . wfElement( 'input', array(
 428+
 429+ $out .= '&nbsp;' . wfElement( 'input', array(
429430 'type' => 'submit', 'value' => wfMsg('go') ) );
430 -
 431+
431432 $out .= '</form>';
432433 return $out;
433434 }
@@ -447,14 +448,14 @@
448449 $out = '<table cellpadding="2" class="sortable" ';
449450 $out .= 'style="cell-border: 0.25px solid gray; text-align: left;';
450451 $out .= 'border-spacing: 1px; margin-left: 1em;"><tr>';
451 -
 452+
452453 if ( $wgUser->isAllowed('sigadmin') )
453454 $out .= '<th>' . wfMsg( 'sign-viewfield-options' ) . '</th>';
454 -
 455+
455456 foreach ($this->mFields as $field => $val) {
456457 if ($val) $out .= '<th>' . wfMsg( "sign-viewfield-$field" ) . '</th>';
457458 }
458 -
 459+
459460 return '</tr>' . $out;
460461 }
461462
@@ -464,7 +465,7 @@
465466 if ( $sig->isPrivileged() )
466467 $out .= '<td>[' . $wgUser->getSkin()->makeKnownLinkObj(
467468 SpecialPage::getTitleFor('SignDocument'),
468 - wfMsg('sign-viewfield-options'), 'doc=' .
 469+ wfMsg('sign-viewfield-options'), 'doc=' .
469470 $this->mForm->getId() . '&viewsigs&detail=' . $sig->mId ) . ']</td>';
470471
471472 #$out .= $this->getSigCell( 'entryid', $sig->mId, $del );
@@ -501,10 +502,10 @@
502503 $this->mForm->setOpen(true);
503504 $wgOut->addWikiText( wfMsg( 'sign-sigadmin-opensuccess', $this->mForm->mPagename ) );
504505 }
505 -
 506+
506507 private function doDetail() {
507508 global $wgUser, $wgOut, $wgRequest;
508 -
 509+
509510 if ( !$wgUser->isAllowed('sigadmin') ) {
510511 $wgOut->permissionRequired( 'sigadmin' );
511512 return;
@@ -518,7 +519,7 @@
519520 }
520521
521522 $wgOut->addHTML( $this->getDetailReviewForm( $sig ) );
522 -
 523+
523524 $wgOut->addHTML( $this->getDetailTable( $sig ) );
524525
525526 $wgOut->addHTML( $this->runDetailUniqueQuery( $sig ) );
@@ -531,15 +532,15 @@
532533 }
533534
534535 $out = '';
535 -
 536+
536537 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $wgRequest->getVal('doc')
537538 . '&viewsigs&detail=' . $wgRequest->getVal('detail');
538539
539 - $out .= wfOpenElement( 'form', array(
 540+ $out .= wfOpenElement( 'form', array(
540541 'id' => 'doreview-form',
541542 'action' => $url,
542543 'method' => 'post' ) );
543 -
 544+
544545 $out .= '<fieldset><legend>' . wfMsg( 'sign-reviewsig' ) . '</legend>';
545546
546547 $out .= Xml::checkLabel(
@@ -562,17 +563,17 @@
563564
564565 $out .= '</fieldset></form>';
565566 return $out;
566 -
567567
 568+
568569 }
569570
570571 private function updateReviewFromPost( $sig ) {
571572 global $wgRequest;
572 - if (!$wgRequest->wasPosted() || is_null($wgRequest->getVal('doreview'))
573 - || is_null($wgRequest->getVal('reviewcomment' ) ) )
 573+ if (!$wgRequest->wasPosted() || is_null($wgRequest->getVal('doreview'))
 574+ || is_null($wgRequest->getVal('reviewcomment' ) ) )
574575 return; //What are you doing here then?
575576
576 - $sig->postReview( $wgRequest->getVal( 'reviewcomment' ),
 577+ $sig->postReview( $wgRequest->getVal( 'reviewcomment' ),
577578 $wgRequest->getVal('strikesig'));
578579 }
579580
@@ -582,9 +583,9 @@
583584
584585 $out .= '<table style="width: 100%"><tr><td><table>';
585586
586 - $out .= $this->getDetailTableRow( 'realname', $sig->getRealName(),
 587+ $out .= $this->getDetailTableRow( 'realname', $sig->getRealName(),
587588 $sig->isHidden('realname') );
588 - $out .= $this->getDetailTableRow( 'address', $sig->getAddress(),
 589+ $out .= $this->getDetailTableRow( 'address', $sig->getAddress(),
589590 $sig->isHidden('address') );
590591 $out .= $this->getDetailTableRow( 'city', $sig->getCity(),
591592 $sig->isHidden('extaddress') );
@@ -596,29 +597,29 @@
597598 $sig->isHidden('extaddress') );
598599 $out .= $this->getDetailTableRow( 'phone', $sig->getPhone(),
599600 $sig->isHidden('phone') );
600 - $out .= $this->getDetailTableRow( 'email',
601 - wfMsg( 'sign-emailto', $sig->getEmail() ),
 601+ $out .= $this->getDetailTableRow( 'email',
 602+ wfMsg( 'sign-emailto', $sig->getEmail() ),
602603 $sig->isHidden('email') );
603604
604605 $out .= '</table></td><td valign="top"><table valign="top">';
605606
606607 $out .= $this->getDetailTableRow( 'timestamp', $sig->mTimestamp );
607 - $out .= $this->getDetailTableRow( 'ip', wfMsgExt( 'sign-iptools', array(
 608+ $out .= $this->getDetailTableRow( 'ip', wfMsgExt( 'sign-iptools', array(
608609 'parse' ), $sig->getIp() ) );
609610 $out .= $this->getDetailTableRow( 'agent', $sig->getAgent() );
610 -
 611+
611612 $out .= $this->getDetailTableRow( 'stricken', ($sig->mStricken)?wfMsg( 'yes' ):wfMsg('no') );
612613 $out .= $this->getDetailTableRow( 'reviewedby', $sig->getReviewedBy() );
613614 $out .= $this->getDetailTableRow( 'reviewcomment', $sig->mStrickenComment );
614 -
 615+
615616 $out .= '</table></td></tr>';
616 -
 617+
617618 $out .= '</table></fieldset>';
618619 return $out;
619620 }
620621
621622 private function getDetailTableRow( $fieldid, $val, $priv = false ) {
622 - return '<tr><td><strong>' . wfMsg( "sign-viewfield-$fieldid" ) . ':</strong></td><td>'
 623+ return '<tr><td><strong>' . wfMsg( "sign-viewfield-$fieldid" ) . ':</strong></td><td>'
623624 . $val . (($priv)?(' (' . wfMsg( 'sig-private' ) . ')'):'') . '</td></tr>';
624625 }
625626
@@ -627,7 +628,7 @@
628629 $out = '';
629630
630631 $out .= '<fieldset><legend>' . wfMsg( 'sign-detail-uniquequery' ) . '</legend>';
631 -
 632+
632633 if ( !$wgRequest->wasPosted() || !$wgRequest->getVal( 'rununiquequery' ) ) {
633634 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $wgRequest->getVal('doc')
634635 . '&viewsigs&detail=' . $wgRequest->getVal('detail');
@@ -641,7 +642,7 @@
642643 'name' => 'rununiquequery',
643644 'value'=> wfMsg( 'sign-detail-uniquequery-run' ) ) );
644645
645 - return '</form></fieldset>' . $out;
 646+ return '</form></fieldset>' . $out;
646647 }
647648
648649 $out .= $this->similarTable( wfMsg( 'sign-uniquequery-similarname' ), $sig->similarByName() );
@@ -655,15 +656,15 @@
656657
657658 private function similarTable( $header, $sigs ) {
658659 $out = "<h5>$header</h5>";
659 -
 660+
660661 $out .= '<ul>';
661662 foreach ($sigs as $sig)
662663 $out .= '<li>' . wfMsgExt( 'sign-uniquequery-1signed2', array( 'parse'),
663 - $sig->getRealName(), $sig->mForm->mPagename,
 664+ $sig->getRealName(), $sig->mForm->mPagename,
664665 $sig->mId, $sig->mForm->getId() ) . '</li>';
665 -
 666+
666667 $out .= '</ul>';
667 -
 668+
668669 return $out;
669670 }
670671 }
Index: trunk/extensions/SignDocument/SignDocumentHelpers.php
@@ -2,7 +2,7 @@
33
44 /**
55 * Helper classes for the SignDocument extensions. This file provides the classes
6 - * SignDocumentForm, which represents a document signing form generated by a
 6+ * SignDocumentForm, which represents a document signing form generated by a
77 * sigadmin, and SignDocumentSignature, which represents a signature committed by
88 * a user to a document.
99 *
@@ -12,10 +12,10 @@
1313 * @copyright Copyright © 2007, Daniel Cannon
1414 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1515 */
16 -
 16+
1717 /**
1818 * A "SignDocumentForm" is essentially the configuration of *how* a user can
19 - * sign a document. This includes what options are visibile to users, what
 19+ * sign a document. This includes what options are visibile to users, what
2020 * options are optional, what users may sign a document, whether signing is
2121 * enabled for the given document, what the minimum age of a signer must
2222 * be, and a brief introductory text displayed to signers.
@@ -23,26 +23,26 @@
2424 class SignDocumentForm {
2525 /* public fields */
2626 public $mPagename, $mAllowedGroup, $mMinAge, $mIntrotext;
27 -
 27+
2828 public $mEmailHidden, $mAddressHidden, $mExtAddressHidden,
2929 $mPhoneHidden, $mBdayHidden;
30 -
 30+
3131 public $mEmailOptional, $mAddressOptional, $mExtAddressOptional,
3232 $mPhoneOptional, $mBdayOptional;
33 -
 33+
3434 public $mOpen;
35 -
 35+
3636 /* null until the item exists in the db. */
3737 private $mInDb;
3838 private $mId;
39 -
 39+
4040 /* Compressed bitfields representing hidden and optional fields. */
4141 private $mHiddenFlags, $mOptionalFlags;
42 -
 42+
4343 /* Pertaining to the article this form describes. */
4444 private $mOldid, $mPageId;
4545 public $mTitle, $mArticle;
46 -
 46+
4747 /* Hackerish indeed .. my little cheat to make this class immutable. */
4848 private static $mCanRunCtor;
4949
@@ -73,38 +73,38 @@
7474 $f->mExtAddressHidden = $wgRequest->getVal('mwCreateSignDocHidden-extaddress');
7575 $f->mPhoneHidden = $wgRequest->getVal('mwCreateSignDocHidden-phone');
7676 $f->mBdayHidden = $wgRequest->getVal('mwCreateSignDocHidden-bday');
77 -
 77+
7878 $f->mEmailOptional = $wgRequest->getVal('mwCreateSignDocOptional-email');
7979 $f->mAddressOptional = $wgRequest->getVal('mwCreateSignDocOptional-address');
8080 $f->mExtAddressOptional = $wgRequest->getVal('mwCreateSignDocOptional-extaddress');
8181 $f->mPhoneOptional = $wgRequest->getVal('mwCreateSignDocOptional-phone');
8282 $f->mBdayOptional = $wgRequest->getVal('mwCreateSignDocOptional-bday');
83 -
 83+
8484 $f->basicSanityChecking();
85 -
 85+
8686 return $f;
8787 }
8888
8989 /**
9090 * Generates mTitle, mArticle and sets mOldid to the latest revision of the
91 - * article specified by mPagename.
 91+ * article specified by mPagename.
9292 */
9393 function loadArticleData() {
9494 $this->mTitle = Title::newFromText( $this->mPagename );
95 -
96 - if (is_null($this->mTitle) || !is_object($this->mTitle))
 95+
 96+ if (is_null($this->mTitle) || !is_object($this->mTitle))
9797 throw new MWException('Something went horribly wrong. '.
9898 'mTitle is null or not an object.');
99 -
 99+
100100 if ( !$this->mTitle->exists() )
101101 return false;
102102
103 - $this->mArticle = new Article( $this->mTitle );
 103+ $this->mArticle = new Article( $this->mTitle );
104104 $this->mArticle->loadPageData();
105 -
 105+
106106 $this->mOldid = $this->mArticle->mLatest;
107107 $this->mPageId = $this->mTitle->getArticleID();
108 -
 108+
109109 return true;
110110 }
111111
@@ -125,7 +125,7 @@
126126
127127 /* Make sure title includes namespace. */
128128 $this->mPagename = $this->mTitle->getPrefixedText();
129 -
 129+
130130 /* Make sure it don't already exist ... */
131131 $res = $dbw->selectRow( 'sdoc_form', '*', array(
132132 'form_pageid' => $this->mPageId));
@@ -134,7 +134,7 @@
135135 }
136136
137137 $this->compressFlags();
138 -
 138+
139139 $dbw->insert( 'sdoc_form',
140140 array(
141141 'form_pageid' => $this->mPageId,
@@ -149,13 +149,13 @@
150150
151151 $this->mInDb = true;
152152
153 - $id = $dbw->selectRow( 'sdoc_form', 'form_id',
 153+ $id = $dbw->selectRow( 'sdoc_form', 'form_id',
154154 '', 'Database::selectRow', array(
155155 'ORDER BY' => 'form_id DESC',
156156 'LIMIT' => '1' ) );
157 -
 157+
158158 $this->mId = $id->form_id;
159 -
 159+
160160 return true;
161161 }
162162
@@ -169,23 +169,23 @@
170170 global $wgUser;
171171 $dbw = wfGetDB( DB_MASTER );
172172
173 - $dbrs = $dbw->select( 'sdoc_form', array('form_pagename', 'form_oldid',
 173+ $dbrs = $dbw->select( 'sdoc_form', array('form_pagename', 'form_oldid',
174174 'form_id', 'form_allowgroup', 'form_open'),
175175 array());
176176
177177 $ret = array();
178178 while ( $dbr = $dbw->fetchObject($dbrs)) {
179 - if ( in_array( $dbr->form_allowgroup,
 179+ if ( in_array( $dbr->form_allowgroup,
180180 $wgUser->getEffectiveGroups() ) )
181181 $ret[$dbr->form_pagename . ' (r' . $dbr->form_oldid . (
182 - (!$dbr->form_open)?' - ' . wfMsg('sign-closed'):'')
 182+ (!$dbr->form_open)?' - ' . wfMsg('sign-closed'):'')
183183 . ')'] = $dbr->form_id;
184184 }
185185
186186 return $ret;
187 -
 187+
188188 }
189 -
 189+
190190 /**
191191 * Create a new SignDocumentForm from the db, as extracted using the provided
192192 * form_id.
@@ -194,16 +194,16 @@
195195 self::$mCanRunCtor = true;
196196 $f = new SignDocumentForm();
197197 self::$mCanRunCtor = false;
198 -
 198+
199199 $dbw = wfGetDB( DB_MASTER );
200200
201201 $row = $dbw->selectRow( 'sdoc_form', '*',
202202 array('form_id' => $id));
203203
204204 if ( empty($row) ) return false;
205 -
 205+
206206 $f->mInDb = true;
207 -
 207+
208208 $f->mId = $row->form_id;
209209 $f->mPageId = $row->form_pageid;
210210 $f->mPagename = $row->form_pagename;
@@ -215,7 +215,7 @@
216216 $f->mIntrotext = $row->form_intro;
217217
218218 $f->inflateFlags();
219 -
 219+
220220 $f->mTitle = Title::newFromId( $f->mPageId );
221221 $f->mArticle = new Article($f->mTitle, $f->mOldid);
222222
@@ -223,20 +223,20 @@
224224 }
225225
226226 /**
227 - * Compresses the optional and hidden boolean flags down into two
 227+ * Compresses the optional and hidden boolean flags down into two
228228 * bitfields.
229229 */
230230 function compressFlags() {
231231 $this->mHiddenFlags = 0;
232 -
 232+
233233 if ($this->mEmailHidden) $this->mHiddenFlags |= 1;
234234 if ($this->mAddressHidden) $this->mHiddenFlags |= 1 << 1;
235235 if ($this->mExtAddressHidden) $this->mHiddenFlags |= 1 << 2;
236236 if ($this->mPhoneHidden) $this->mHiddenFlags |= 1 << 3;
237237 if ($this->mBdayHidden) $this->mHiddenFlags |= 1 << 4;
238 -
 238+
239239 $this->mOptionalFlags = 0;
240 -
 240+
241241 if ($this->mEmailOptional) $this->mOptionalFlags |= 1;
242242 if ($this->mAddressOptional) $this->mOptionalFlags |= 1 << 1;
243243 if ($this->mExtAddressOptional) $this->mOptionalFlags |= 1 << 2;
@@ -256,7 +256,7 @@
257257 $this->mExtAddressHidden = (bool) ($this->mHiddenFlags & (1 << 2));
258258 $this->mPhoneHidden = (bool) ($this->mHiddenFlags & (1 << 3));
259259 $this->mBdayHidden = (bool) ($this->mHiddenFlags & (1 << 4));
260 -
 260+
261261 $this->mEmailOptional = (bool) ($this->mOptionalFlags & 1);
262262 $this->mAddressOptional = (bool) ($this->mOptionalFlags & (1 << 1));
263263 $this->mExtAddressOptional = (bool) ($this->mOptionalFlags & (1 << 2));
@@ -275,7 +275,7 @@
276276 'form_open' => $this->mOpen ), array(
277277 'form_id' => $this->getId() ) );
278278 }
279 -
 279+
280280 /**
281281 * Basic string representation for debugging purposes.
282282 */
@@ -308,22 +308,22 @@
309309 public function getId() { return $this->mId; }
310310 public function getOldid() { return $this->mOldid; }
311311 public function getPageId() { return $this->mPageId; }
312 -}
 312+}
313313
314314 /**
315 - * A SignDocumentSignature is, just as its name suggests, all data attached to a
 315+ * A SignDocumentSignature is, just as its name suggests, all data attached to a
316316 * given signature.
317317 */
318318 class SignDocumentSignature {
319319 /* Public fields, visible to all users regardless of settings. */
320320 public $mId, $mTimestamp;
321321 public $mStricken, $mStrickenBy, $mStrickenComment;
322 -
 322+
323323 /* Private fields accessible only if not specified as private or if the user
324324 * viewing them has the appropriate priveleges to view private fields. */
325325 private $mRealName, $mAddress, $mCity, $mState, $mCountry, $mZip, $mPhone,
326326 $mBday, $mEmail;
327 -
 327+
328328 /* Array containing fields set as private. */
329329 private $mHiddenFields;
330330 private $mAllAccessible;
@@ -332,13 +332,13 @@
333333 private $mIp, $mAgent;
334334
335335 public $mForm;
336 -
 336+
337337 private static $canRunCtor;
338338
339339 function __construct() {
340340 if (!self::$canRunCtor) throw new MWException('Finger weg!');
341341 }
342 -
 342+
343343 /**
344344 * Create a "blank" SignDocumentSignature.
345345 */
@@ -348,7 +348,7 @@
349349 self::$canRunCtor = false;
350350 return $f;
351351 }
352 -
 352+
353353 /**
354354 * Create a new SignDocumentSignature using data obtained from a POST.
355355 */
@@ -360,7 +360,7 @@
361361 self::$canRunCtor = true;
362362 $f = new SignDocumentSignature();
363363 self::$canRunCtor = false;
364 -
 364+
365365 $f->mTimestamp = wfTimestampNow();
366366
367367 $f->mRealName = $wgRequest->getVal( 'realname', '' );
@@ -446,7 +446,7 @@
447447 $dbw = wfGetDB( DB_MASTER );
448448
449449 $dbrs = $dbw->select('sdoc_signature', '*', $cond );
450 -
 450+
451451 while ( $dbr = $dbw->fetchObject($dbrs)) {
452452 $ret[] = self::newFromRow($dbr);
453453 }
@@ -478,7 +478,7 @@
479479 $f->mStricken = $dbr->sig_stricken;
480480 $f->mStrickenBy = $dbr->sig_strickenby;
481481 $f->mStrickenComment = $dbr->sig_strickencomment;
482 -
 482+
483483 if ( $dbr->sig_anonymous ) $f->mHiddenFields[] = 'realname';
484484 if ( $dbr->sig_hideaddress ) $f->mHiddenFields[] = 'address';
485485 if ( $dbr->sig_hideextaddress ) $f->mHiddenFields[] = 'extaddress';
@@ -498,7 +498,7 @@
499499
500500 $row1 = $dbw->selectRow( 'sdoc_signature', 'sig_id', array(
501501 'sig_form' => $this->mForm->getId(),
502 - 'sig_ip' => $this->mIp ), 'LIMIT 1' );
 502+ 'sig_ip' => $this->mIp ), 'LIMIT 1' );
503503
504504 if ( !empty($row1) ) throw new MWException( wfMsg( 'sig-error-already-signed' ) );
505505
@@ -508,7 +508,7 @@
509509
510510 if ($this->mEmail && !empty($row2)) throw new MWException( wfMsg( 'sig-error-already-signed' ) );
511511 }
512 -
 512+
513513 /**
514514 * Add it to the database.
515515 */
@@ -539,7 +539,7 @@
540540 ) );
541541
542542 /* Get back our id. */
543 - $id = $dbw->selectRow( 'sdoc_signature', 'sig_id',
 543+ $id = $dbw->selectRow( 'sdoc_signature', 'sig_id',
544544 '', 'Database::selectRow', array(
545545 'ORDER BY' => 'sig_id DESC',
546546 'LIMIT' => '1' ) );
@@ -608,7 +608,7 @@
609609 public function setAllAccessible( $b ) {
610610 $this->mAllAccessible = $b;
611611 }
612 -
 612+
613613 public function isPrivileged() {
614614 global $wgUser;
615615 return $wgUser->isAllowed( 'sigadmin' );
@@ -621,7 +621,7 @@
622622 public function canView( $val ) {
623623 return $this->mAllAccessible || (!$this->isHidden( $val ) || $this->isPrivileged() );
624624 }
625 -
 625+
626626 public function getRealName(){
627627 return ($this->canView('realname'))?$this->mRealName:wfMsg( 'sig-anonymous' );
628628 }
@@ -629,31 +629,31 @@
630630 public function getAddress(){
631631 return ($this->canView('address'))?$this->mAddress:wfMsg( 'sig-private' );
632632 }
633 -
 633+
634634 public function getCity(){
635635 return ($this->canView('extaddress'))?$this->mCity:wfMsg( 'sig-private' );
636636 }
637 -
 637+
638638 public function getState(){
639639 return ($this->canView('extaddress'))?$this->mState:wfMsg( 'sig-private' );
640640 }
641 -
 641+
642642 public function getCountry(){
643643 return ($this->canView('extaddress'))?$this->mCountry:wfMsg( 'sig-private' );
644644 }
645 -
 645+
646646 public function getZip(){
647647 return ($this->canView('extaddress'))?$this->mZip:wfMsg( 'sig-private' );
648648 }
649 -
 649+
650650 public function getPhone(){
651651 return ($this->canView('phone'))?$this->mPhone:wfMsg( 'sig-private' );
652652 }
653 -
 653+
654654 public function getEmail(){
655655 return ($this->canView('email'))?$this->mEmail:wfMsg( 'sig-private' );
656656 }
657 -
 657+
658658 public function getBday(){
659659 return ($this->canView('bday'))?$this->mBday:wfMsg( 'sig-private' );
660660 }
@@ -661,15 +661,13 @@
662662 public function getIp() {
663663 return ($this->isPrivileged())?$this->mIp:wfMsg( 'sig-private' );
664664 }
665 -
 665+
666666 public function getAgent() {
667667 return ($this->isPrivileged())?$this->mAgent:wfMsg( 'sig-private' );
668668 }
669669
670670 public function getReviewedBy() {
671671 return User::whois( $this->mStrickenBy );
672 -
 672+
673673 }
674674 }
675 -
676 -?>
Index: trunk/extensions/SignDocument/SpecialCreateSignDocument.php
@@ -1,23 +1,25 @@
2 -<?PHP
 2+<?PHP
33 if (!defined('MEDIAWIKI')) die();
44
55 require_once( 'SignDocumentHelpers.php' );
66
77 //TODO: Doc
8 -class CreateSignDocument extends SpecialPage {
 8+class SpecialCreateSignDocument extends SpecialPage {
99 /**
10 - * Constructor
11 - */
12 - function CreateSignDocument() {
 10+ * Constructor
 11+ */
 12+ function __construct() {
1313 SpecialPage::SpecialPage( 'CreateSignDocument', 'createsigndocument' );
14 - wfLoadExtensionMessages('CreateSignDocument');
1514 }
1615
1716 function execute($par) {
1817 global $wgOut, $wgRequest, $wgUser;
 18+
 19+ wfLoadExtensionMessages('CreateSignDocument');
 20+
1921 $this->setHeaders();
2022 if ($wgUser->isAllowed( 'createsigndocument' )) {
21 -
 23+
2224 if ( $wgRequest->wasPosted() )
2325 $this->dealWithPost();
2426 else
@@ -44,12 +46,12 @@
4547 </td></tr><tr><td>
4648 <strong>' . wfMsg( 'createsigndoc-allowedgroup' ) . '&nbsp;</strong>
4749 </td><td>
48 - <select id="allowedgroup" name="group" style="width: 400px;">'
 50+ <select id="allowedgroup" name="group" style="width: 400px;">'
4951 . $this->makeComboItems( array_keys($wgGroupPermissions) ) . ' </select>
50 - ' . $this->checkMarks( 'email' ) .
51 - $this->checkMarks( 'address' ) .
52 - $this->checkMarks( 'extaddress' ) .
53 - $this->checkMarks( 'phone' ) .
 52+ ' . $this->checkMarks( 'email' ) .
 53+ $this->checkMarks( 'address' ) .
 54+ $this->checkMarks( 'extaddress' ) .
 55+ $this->checkMarks( 'phone' ) .
5456 $this->checkMarks( 'bday' ) . '
5557 </td></tr><tr><td>
5658 <strong>' . wfMsg( 'createsigndoc-minage' ) . '&nbsp;</strong>
@@ -59,7 +61,7 @@
6062 </td><td><textarea id="introtext" name="introtext" wrap="soft" style="height: 300px; width: 400px;">' .
6163 '</textarea>
6264 </td></tr><tr><td></td><td>
63 - <input type="submit" id="create" name="create" value="' .
 65+ <input type="submit" id="create" name="create" value="' .
6466 wfMsg( 'createsigndoc-create' ) . '" />
6567 </td></tr>
6668 </table>
@@ -77,7 +79,7 @@
7880 "mwCreateSignDocHidden-$id",
7981 "mwCreateSignDocHidden-$id",
8082 false);
81 -
 83+
8284 $out .= Xml::checkLabel(
8385 wfMsg( 'createsigndoc-optional' ),
8486 "mwCreateSignDocOptional-$id",
@@ -109,7 +111,7 @@
110112
111113 if (!$bob->loadArticleData())
112114 return $this->showError( 'pagenoexist', $bob->mPagename );
113 -
 115+
114116 if (!$bob->addToDb())
115117 return $this->showError( 'alreadycreated', $bob->mPagename );
116118
Index: trunk/extensions/SignDocument/README.txt
@@ -21,24 +21,24 @@
2222 [4] File manifest
2323
2424 [1] Installation
25 - [1.1] SignDocument has the following installation prerequisites:
 25+ [1.1] SignDocument has the following installation prerequisites:
2626 [1.1.1] MediaWiki 1.10+ and its requirements (such as PHP5 and MySQL)
2727 [1.1.2] It should run on all operating systems that MW supports;
2828 however, it has only been tested on SuSE Linux 10.1 and Red Hat Fedora
2929 Core 4.
3030 [1.1.3] ExtensionFunctions.php must be installed in your extensions
3131 directory. This can be downloaded from subversion.
32 -
 32+
3333 [1.2] Verify that you have all the needed files (see |4| below) in the
3434 directoy "<wikiroot>/extensions/SignDocument". If you need the extension
3535 to be stored elsewhere, then amend these instructions accordingly.
36 -
 36+
3737 [1.3] First, you must set up the database to support the extension. To do
3838 this, execute "mysql -u root -p |yourwikidb| < signdocument.sql", or
3939 otherwise execute the signdocument.sql script (using phpMyAdmin or similar
4040 applications).
4141
42 - [1.4] Then, add to your LocalSettings.php:
 42+ [1.4] Then, add to your LocalSettings.php:
4343 'require_once( "$IP/extensions/SignDocument/SignDocument.php" )'.
4444
4545 [1.5] You can then add a user on your wiki to the group "sigadmin" via
@@ -76,7 +76,7 @@
7777 [3] Using Special:SignDocument
7878 [3.1] The heart of the extension is Special:SignDocument, which provides
7979 both the interface allowing users to sign documents and the moderation
80 - interface, accessible to users in the group "sigadmin".
 80+ interface, accessible to users in the group "sigadmin".
8181
8282 [3.2] Accessing the special page directly will give you a list of pages
8383 that you can sign or for which you can view signatures; however, in most
@@ -122,6 +122,3 @@
123123 -> Localization for Special:CreateSignDocument.
124124 [4.9] SignDocumentHelpers.php
125125 -> Helper classes for the extension.
126 -
127 -
128 -
Index: trunk/extensions/SignDocument/SignDocument.alias.php
@@ -0,0 +1,12 @@
 2+<?php
 3+/**
 4+ * Aliases for special pages
 5+ *
 6+ */
 7+
 8+$aliases = array();
 9+
 10+$aliases['en'] = array(
 11+ 'SignDocument' => array( 'SignDocument' ),
 12+ 'CreateSignDocument' => array( 'CreateSignDocument' ),
 13+);
Property changes on: trunk/extensions/SignDocument/SignDocument.alias.php
___________________________________________________________________
Name: svn:eol-style
114 + native
Name: svn:keywords
215 + Id
Index: trunk/extensions/SignDocument/signdocument.sql
@@ -5,11 +5,11 @@
66
77 -- --------------------------------------------------------
88
 9+--
910 -- Table structure for table sdoc_form
1011 -- This table contains the configuration of which documents
1112 -- may be signed and how they should be signed.
 13+--
1214
1315 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/sdoc_form (
1416 form_id int(11) NOT NULL auto_increment,
@@ -18,7 +18,7 @@
1919 form_pageid int(11) NOT NULL default '0',
2020 form_pagename varchar(255) character set latin1 collate latin1_bin NOT NULL default '',
2121
 22+-- Users signing the document will only see this old
2223 -- revision of the page.
2324 form_oldid int(11) NOT NULL default '0',
2425
@@ -43,10 +43,10 @@
4444
4545 -- --------------------------------------------------------
4646
 47+--
4748 -- Table structure for table sdoc_signature
4849 -- This table contains the actual signatures.
 50+--
4951
5052 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/sdoc_signature (
5153 sig_id int(11) NOT NULL auto_increment,
Index: trunk/extensions/Translate/aliases.txt
@@ -130,6 +130,9 @@
131131 Show processlist
132132 file = ShowProcesslist/ShowProcesslist.alias.php
133133
 134+Sign document
 135+file = SignDocument/SignDocument.alias.php
 136+
134137 Site matrix
135138 file = SiteMatrix/SiteMatrix.alias.php
136139

Status & tagging log