@@ -800,24 +800,24 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
800
800
{
801
801
mySql = QString ( " insert into tbl_srs (srs_id,description,projection_acronym,ellipsoid_acronym,parameters,is_geo) " )
802
802
+ " values (" + QString::number ( USER_PROJECTION_START_ID ) + " ,'"
803
- + stringSQLSafe ( myName ) + " ','" + myProjectionAcronym
804
- + " ','" + myEllipsoidAcronym + " ','" + stringSQLSafe ( myParameters )
803
+ + sqlSafeString ( myName ) + " ','" + myProjectionAcronym
804
+ + " ','" + myEllipsoidAcronym + " ','" + sqlSafeString ( myParameters )
805
805
+ " ',0)" ; // <-- is_geo shamelessly hard coded for now
806
806
}
807
807
else
808
808
{
809
809
mySql = " insert into tbl_srs (description,projection_acronym,ellipsoid_acronym,parameters,is_geo) values ('"
810
- + stringSQLSafe ( myName ) + " ','" + myProjectionAcronym
811
- + " ','" + myEllipsoidAcronym + " ','" + stringSQLSafe ( myParameters )
810
+ + sqlSafeString ( myName ) + " ','" + myProjectionAcronym
811
+ + " ','" + myEllipsoidAcronym + " ','" + sqlSafeString ( myParameters )
812
812
+ " ',0)" ; // <-- is_geo shamelessly hard coded for now
813
813
}
814
814
}
815
815
else // user is updating an existing record
816
816
{
817
- mySql = " update tbl_srs set description='" + stringSQLSafe ( myName )
817
+ mySql = " update tbl_srs set description='" + sqlSafeString ( myName )
818
818
+ " ',projection_acronym='" + myProjectionAcronym
819
819
+ " ',ellipsoid_acronym='" + myEllipsoidAcronym
820
- + " ',parameters='" + stringSQLSafe ( myParameters ) + " ' "
820
+ + " ',parameters='" + sqlSafeString ( myParameters ) + " ' "
821
821
+ " ,is_geo=0" // <--shamelessly hard coded for now
822
822
+ " where srs_id='" + mCurrentRecordId + " '"
823
823
;
@@ -1021,7 +1021,7 @@ QString QgsCustomProjectionDialog::getEllipseFromParameters()
1021
1021
* \arg const QString in The input string to make safe.
1022
1022
* \return The string made safe for SQL statements.
1023
1023
*/
1024
- const QString QgsCustomProjectionDialog::stringSQLSafe ( const QString theSQL )
1024
+ const QString QgsCustomProjectionDialog::sqlSafeString ( const QString theSQL )
1025
1025
{
1026
1026
1027
1027
QString myRetval;
0 commit comments