diff --git a/Databases/db-upgrade-patches/database_upgrade-1.2.1b.sql b/Databases/db-upgrade-patches/database_upgrade-1.2.1b.sql index b92a9d6fc..18974ce96 100644 --- a/Databases/db-upgrade-patches/database_upgrade-1.2.1b.sql +++ b/Databases/db-upgrade-patches/database_upgrade-1.2.1b.sql @@ -60,3 +60,5 @@ CREATE TABLE tblodkinstance WITH ( OIDS=FALSE ); + +UPDATE tblsupportedclient SET minversion='1.2.1' WHERE client='Tellervo WSI'; diff --git a/Native/BuildResources/LinBuild/firstrun.template b/Native/BuildResources/LinBuild/firstrun.template index c907e1b02..70bc3833a 100755 --- a/Native/BuildResources/LinBuild/firstrun.template +++ b/Native/BuildResources/LinBuild/firstrun.template @@ -39,6 +39,7 @@ echo "make your choice.\n\n"; // This makes sure we have sudo access without further passwords required pingSudo(); + echo "\n\n"; echo "Press [enter] to continue..."; $response = fgets(STDIN); diff --git a/Native/BuildResources/LinBuild/tellervo-server b/Native/BuildResources/LinBuild/tellervo-server index 09b6046c0..1cd301ee5 100755 --- a/Native/BuildResources/LinBuild/tellervo-server +++ b/Native/BuildResources/LinBuild/tellervo-server @@ -105,6 +105,8 @@ if(isset($args["firstrun"])) echo $colors->getColoredString("\n\nStep 4 - Setting up the Tellervo database...\n\n", "light_purple"); requireRoot(); + // Make sure media store is accessible to www-data + createScriptsFromTemplates(); postgresSetup(true); include($configfile); @@ -177,6 +179,8 @@ if(isset($args["reconfigure"]) || isset($args["r"])) // Reconfigure server requireRoot(); + exec("chown -R www-data:www-data /usr/share/tellervo-server/mediastore"); + // Confirm the user wants to scrub and start from scratch echo "\nIf you continue, your existing Tellervo configuration and database will be\n"; echo "deleted. Are you sure you want to proceed? (y/N): "; @@ -285,6 +289,8 @@ if (isset($args["configure"]) || isset($args["c"])) // Configure requireRoot(); + exec("chown -R www-data:www-data /usr/share/tellervo-server/mediastore"); + // Check if the server is already configured if( (file_exists($configfile)) && (file_exists($dbsetupfile)) ) { diff --git a/Native/BuildResources/tellervo.install4j b/Native/BuildResources/tellervo.install4j index 5ecb2d66f..6b4e614a2 100644 --- a/Native/BuildResources/tellervo.install4j +++ b/Native/BuildResources/tellervo.install4j @@ -1,7 +1,7 @@ - + diff --git a/pom.xml b/pom.xml index 8ded41469..7700a6534 100644 --- a/pom.xml +++ b/pom.xml @@ -746,7 +746,7 @@ jdeb org.vafer - 0.8 + 1.5 @@ -820,6 +820,14 @@ + template + + /usr/share/tellervo-server/mediastore + www-data + www-data + + + ${project.build.directory}/tellervo-pljava.jar file diff --git a/src/main/php/inc/securityUser.php b/src/main/php/inc/securityUser.php index 75f0c9cbd..a00086c01 100644 --- a/src/main/php/inc/securityUser.php +++ b/src/main/php/inc/securityUser.php @@ -330,7 +330,7 @@ function writeToDB($crudMode="create") $this->setID(uuid::getUUID(), 0); // New record - $sql = "insert into tblsecurityuser (securityuserid, username, password, firstName, lastName, odkpassword isactive) values ("; + $sql = "insert into tblsecurityuser (securityuserid, username, password, firstName, lastName, odkpassword, isactive) values ("; $sql.= "'".pg_escape_string($this->id)."', "; $sql.= "'".pg_escape_string($this->username)."', "; $sql.= "'".pg_escape_string($this->password)."', "; diff --git a/src/main/php/odk/formList.php b/src/main/php/odk/formList.php index 8f57481f7..7b098c1c2 100644 --- a/src/main/php/odk/formList.php +++ b/src/main/php/odk/formList.php @@ -61,11 +61,11 @@ function getFormList($theUsername) echo " md5:".md5($row['definition'])."\n"; if($securehttp===TRUE) { - echo " https://".$domain."odk/forms?id=".$row['odkdefinitionid']."\n"; + echo " https://".$domain."/odk/forms?id=".$row['odkdefinitionid']."\n"; } else { - echo " http://".$domain."odk/forms?id=".$row['odkdefinitionid']."\n"; + echo " http://".$domain."/odk/forms?id=".$row['odkdefinitionid']."\n"; } echo " \n"; } diff --git a/src/main/php/odk/index.php b/src/main/php/odk/index.php new file mode 100644 index 000000000..628b61ba0 --- /dev/null +++ b/src/main/php/odk/index.php @@ -0,0 +1,6 @@ + + +

Tellervo ODK

+

These pages are designed to be used by an ODK client not a web browser. Please read the Tellervo manual for me information.

+ \ No newline at end of file