includes/functions.php
changeset 1259 49db7495f6b8
parent 1253 13f8d373da67
child 1266 f3933b355229
equal deleted inserted replaced
1258:d972b1276d95 1259:49db7495f6b8
  1417 	if ( isset($names[$version]) )
  1417 	if ( isset($names[$version]) )
  1418 	{
  1418 	{
  1419 		return $names[$version];
  1419 		return $names[$version];
  1420 	}
  1420 	}
  1421 	return 'Anonymous build';
  1421 	return 'Anonymous build';
       
  1422 }
       
  1423 
       
  1424 /**
       
  1425  * Set the database revision number if we don't have one.
       
  1426  */
       
  1427 
       
  1428 function generate_db_version()
       
  1429 {
       
  1430 	if ( getConfig('db_version') !== false )
       
  1431 		return;
       
  1432 	
       
  1433 	$dbversions = array(
       
  1434 			'1.0' => 1000,
       
  1435 			'1.0.1' => 1010,
       
  1436 			'1.0.2b1' => 1019,
       
  1437 			'1.0.2' => 1020,
       
  1438 			'1.0.3' => 1030,
       
  1439 			'1.0.4' => 1040,
       
  1440 			'1.0.5' => 1050,
       
  1441 			'1.0.6' => 1060,
       
  1442 			'1.0.6pl1' => 1070,
       
  1443 			'1.1.1' => 1119,
       
  1444 			'1.1.2' => 1120,
       
  1445 			'1.1.3' => 1121,
       
  1446 			'1.1.4' => 1122,
       
  1447 			'1.1.5' => 1123,
       
  1448 			'1.1.6' => 1124,
       
  1449 			'1.1.7' => 1125,
       
  1450 			'1.1.7pl1' => 1125,
       
  1451 			'1.1.8' => 1125
       
  1452 		);
       
  1453 	if ( isset($dbversions[ enano_version(true, false) ]) )
       
  1454 	{
       
  1455 		setConfig('db_version', $dbversions[ enano_version(true, false) ]);
       
  1456 	}
  1422 }
  1457 }
  1423 
  1458 
  1424 /**
  1459 /**
  1425  * Badly named function to send back eval'able Javascript code with an error message. Deprecated, use JSON instead.
  1460  * Badly named function to send back eval'able Javascript code with an error message. Deprecated, use JSON instead.
  1426  * @param string Message to send
  1461  * @param string Message to send