Permalink
Browse files

fixed some issued faced in generating the download zip after includin…

…g the class list

and the query string issue including the classList - fixed
  • Loading branch information...
1 parent cefd733 commit f086caab7670af8d9d7590305a439d482a57a5f3 @Rafeethu Rafeethu committed May 2, 2012
Showing with 15 additions and 11 deletions.
  1. +9 −7 index2.php
  2. +2 −1 index3.php
  3. +1 −1 object_factory/class.objectphp5.1pdomysql.php
  4. +1 −0 services/pog.wsdl
  5. +2 −2 services/soap_php5.php
View
16 index2.php
@@ -27,6 +27,7 @@
{
$attributeList[] = GetVariable(('fieldattribute_'.$i));
$z++;
+
}
if (GetVariable(('type_'.$i)) != null && $z==$i)
{
@@ -38,19 +39,20 @@
{
$typeList[] = GetVariable(('ttype_'.$i));
}
+
+ if (GetVariable(('type_'.$i)) == "BELONGSTO" || GetVariable(('type_'.$i)) == "HASMANY"){
+ $classList[] = GetVariable(('tclass_'.$i));
+ }
+ else{
+ $classList[] ='';
+ }
+
}
else
{
//attribute may have been removed. proceed to next row
$z++;
}
-
- if (GetVariable(('type_'.$i)) == "BELONGSTO" || GetVariable(('type_'.$i)) == "HASMANY"){
- $classList[] = GetVariable(('tclass_'.$i));
- }
- else{
- $classList[] = '';
- }
}
$_SESSION['objectName'] = $objectName;
View
3 index3.php
@@ -41,11 +41,12 @@
$language = $_SESSION['language'];
$wrapper = $_SESSION['wrapper'];
$pdoDriver = $_SESSION['pdoDriver'];
+ $classList = unserialize($_SESSION['classList']);
$dbEncoding = "0";
try
{
- $package = unserialize($client->GeneratePackage($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver, $dbEncoding));
+ $package = unserialize($client->GeneratePackage($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver, $dbEncoding, $classList));
}
catch (SoapFault $e)
View
2 object_factory/class.objectphp5.1pdomysql.php
@@ -189,7 +189,7 @@ function CreatePreface()
$this->string .= "\n* @version POG ".$GLOBALS['configuration']['versionNumber'].$GLOBALS['configuration']['revisionNumber']." / ".strtoupper($this->language)." MYSQL";
$this->string .= "\n* @see http://www.phpobjectgenerator.com/plog/tutorials/45/pdo-mysql";
$this->string .= "\n* @copyright ".$GLOBALS['configuration']['copyright'];
- $this->string .= "\n* @link http://www.phpobjectgenerator.com/?language=".$this->language."&wrapper=pdo&pdoDriver=".$this->pdoDriver."&objectName=".urlencode($this->objectName)."&attributeList=".urlencode(var_export($this->attributeList, true))."&typeList=".urlencode(urlencode(var_export($this->typeList, true)))."&classList=".urlencode(urlencode(var_export($this->classList, true)));
+ $this->string .= "\n* @link http://www.phpobjectgenerator.com/?language=".$this->language."&wrapper=pdo&pdoDriver=".$this->pdoDriver."&objectName=".urlencode($this->objectName)."&attributeList=".urlencode(var_export($this->attributeList, true))."&typeList=".urlencode(urlencode(var_export($this->typeList, true)))."&classList=".urlencode(var_export($this->classList, true));
$this->string .= "\n*/";
}
View
1 services/pog.wsdl
@@ -83,6 +83,7 @@
<part name="wrapper" type="xsd:string"/>
<part name="pdoDriver" type="xsd:string"/>
<part name="db_encoding" type="xsd:string"/>
+ <part name="classList" type="tns:StringArray"/>
</message>
<message name="GeneratePackageResponse">
<part name="return" type="xsd:string"/>
View
4 services/soap_php5.php
@@ -340,7 +340,7 @@ function GenerateConfiguration($wrapper = null, $pdoDriver = null, $db_encoding
* @param string $wrapper
* @param string $pdoDriver
*/
- function GeneratePackage($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver = null, $db_encoding = 0)
+ function GeneratePackage($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver = null, $db_encoding = 0, $classList)
{
require_once ("../include/configuration.php");
require_once ("../include/class.misc.php");
@@ -376,7 +376,7 @@ function GeneratePackage($objectName, $attributeList, $typeList, $language, $wra
$data = file_get_contents("../object_factory/class.pog_base.".strtolower($language).strtolower($wrapper).".php");
$package["objects"]["class.pog_base.php"] = base64_encode($data);
- $package["objects"]["class.".strtolower($objectName).".php"] = $this->GenerateObject($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver);
+ $package["objects"]["class.".strtolower($objectName).".php"] = $this->GenerateObject($objectName, $attributeList, $typeList, $language, $wrapper, $pdoDriver, $classList);
$package["objects"]["ignore_objects.txt"] = "";

0 comments on commit f086caa

Please sign in to comment.