r95309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95308‎ | r95309 | r95310 >
Date:14:26, 23 August 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
removing name=" attribute from the <PageSchema> tag!
Modified paths:
  • /trunk/extensions/PageSchemas/PageSchemas.classes.php (modified) (history)
  • /trunk/extensions/PageSchemas/specials/PS_EditSchema.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/PageSchemas.classes.php
@@ -196,7 +196,7 @@
197197 public $pageId=0;
198198 public $pageXml=null;
199199 public $pageXmlstr= "";
200 - public $pageName="";
 200+ //public $pageName="";
201201 public $formName="";
202202 public $formArray = array();
203203 /* Stores the templte objects */
@@ -228,7 +228,7 @@
229229 //retrievimg the third attribute which is pp_value
230230 $pageXmlstr = $row[2];
231231 $this->pageXml = simplexml_load_string ( $pageXmlstr );
232 - $this->pageName = (string)$this->pageXml->attributes()->name;
 232+ //$this->pageName = (string)$this->pageXml->attributes()->name;
233233 /* index for template objects */
234234 $i = 0;
235235 $inherited_templates = null ;
@@ -274,11 +274,7 @@
275275 /*return an array of PSTemplate Objects */
276276 function getTemplates () {
277277 return $this->PSTemplates;
278 - }
279 - /*returns the name of the PageSchema object */
280 - function getName(){
281 - return $this->pageName;
282 - }
 278+ }
283279 function getFormName(){
284280 $form_array = $this->getFormArray();
285281 return $form_array['name'];
Index: trunk/extensions/PageSchemas/specials/PS_EditSchema.php
@@ -97,7 +97,7 @@
9898 wfRunHooks( 'getHtmlTextForFieldInputs', array( &$js_extensions, &$text_extensions ));
9999 $text = "";
100100 $text .= ' <form id="createPageSchemaForm" action="" method="post">' . "\n";
101 - $text .= '<p>'.$schema_name_label.' <input type="text" name="s_name"/> </p> ';
 101+ //$text .= '<p>'.$schema_name_label.' <input type="text" name="s_name"/> </p> ';
102102 $text .= '<p>'.$add_xml_label.'
103103 <textarea rows=4 style="width: 100%" name="ps_add_xml"></textarea>
104104 </p> ';
@@ -218,8 +218,8 @@
219219 if ($save_page) {
220220 //Generate the Xml from the Form elements
221221 $Xmltext = "";
222 - $s_name = $wgRequest->getText('s_name');
223 - $Xmltext .= '<PageSchema name="'.$s_name.'">';
 222+ //$s_name = $wgRequest->getText('s_name');
 223+ $Xmltext .= '<PageSchema>';
224224 $ps_add_xml = $wgRequest->getText('ps_add_xml');
225225 $Xmltext .= $ps_add_xml;
226226 $fieldName = "";
@@ -335,10 +335,10 @@
336336 $pageXmlstr = $row[2];
337337 $pageXml = simplexml_load_string ( $pageXmlstr );
338338 $ps_add_xml = "";
339 - $pageName = (string)$pageXml->attributes()->name;
 339+ //$pageName = (string)$pageXml->attributes()->name;
340340 $text_4 .= '';
341341 $text_4 .= '<form id="editPageSchemaForm" action="" method="post">' . "\n";
342 - $text_4 .= '<p>'.$schema_name_label.' <input type="text" name="s_name" value="'.$pageName.'" /> </p> ';
 342+ //$text_4 .= '<p>'.$schema_name_label.' <input type="text" name="s_name" value="'.$pageName.'" /> </p> ';
343343 foreach ( $pageXml->children() as $template_xml ) {
344344 if ( ($template_xml->getName() != 'Template') && ($template_xml->getName() != 'semanticforms_Form') ){
345345 $ps_add_xml .= (string)$template_xml->asXML();

Status & tagging log