summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
92095c9)
Avoids a number of warnings on PHP7.
function &getDB($bNew = false, $bPersistent = false)
{
// Get the database object
function &getDB($bNew = false, $bPersistent = false)
{
// Get the database object
- $oDB =& DB::connect(CONST_Database_DSN.($bNew?'?new_link=true':''), $bPersistent);
+ $oDB = DB::connect(CONST_Database_DSN.($bNew?'?new_link=true':''), $bPersistent);
if (PEAR::IsError($oDB))
{
var_dump(CONST_Database_DSN);
if (PEAR::IsError($oDB))
{
var_dump(CONST_Database_DSN);
if (isset($aCMDResult['bounded'])) $aCMDResult['bounded'] = 'true';
if (isset($aCMDResult['nodedupe'])) $aCMDResult['dedupe'] = 'false';
if (isset($aCMDResult['bounded'])) $aCMDResult['bounded'] = 'true';
if (isset($aCMDResult['nodedupe'])) $aCMDResult['dedupe'] = 'false';
- $oGeocode =& new Geocode($oDB);
+ $oGeocode = new Geocode($oDB);
if (isset($aCMDResult['accept-language']) && $aCMDResult['accept-language'])
$oGeocode->setLanguagePreference(getPreferredLanguages($aCMDResult['accept-language']));
else
if (isset($aCMDResult['accept-language']) && $aCMDResult['accept-language'])
$oGeocode->setLanguagePreference(getPreferredLanguages($aCMDResult['accept-language']));
else
{
echo "Create DB\n";
$bDidSomething = true;
{
echo "Create DB\n";
$bDidSomething = true;
- $oDB =& DB::connect(CONST_Database_DSN, false);
+ $oDB = DB::connect(CONST_Database_DSN, false);
if (!PEAR::isError($oDB))
{
fail('database already exists ('.CONST_Database_DSN.')');
if (!PEAR::isError($oDB))
{
fail('database already exists ('.CONST_Database_DSN.')');