Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit 1b958a2

Browse files
author
Nabeel Shahzad
committed
VMS-283 VMS-284 VMS-285 VMS-286 VMS-287 VMS-288 #closed fixed
1 parent 503cbb8 commit 1b958a2

File tree

10 files changed

+60
-46
lines changed

10 files changed

+60
-46
lines changed

admin/templates/finance_expenselist.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ foreach($allexpenses as $expense)
3535
<td align="center"><?php echo $expense_list[$expense->type]; ?></td>
3636
<td align="center" width="1%" nowrap>
3737
<button id="dialog" class="jqModal button"
38-
href="<?php echo adminaction('/finance/editexpense'.$expense->id);?>">
38+
href="<?php echo adminaction('/finance/editexpense/'.$expense->id);?>">
3939
Edit</button>
4040
4141
<button href="<?php echo adminaction('/finance/viewexpenses');?>" action="deleteexpense"

core/common/OperationsData.class.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public static function getAllAirlines($onlyenabled=false)
5353
{
5454
if($onlyenabled == true)
5555
{
56-
$key = 'all_airline_active';
56+
$key = 'all_airlines_active';
5757
$where = 'WHERE `enabled`=1';
5858
}
5959
else
6060
{
61-
$key = 'all_airline';
61+
$key = 'all_airlines';
6262
$where = '';
6363
}
6464

@@ -288,17 +288,17 @@ public static function getAircraftInfo($id)
288288
public static function getAirlineByCode($code)
289289
{
290290
$code = strtoupper($code);
291-
$key = 'airline_'.$code;
291+
/*$key = 'airline_'.$code;
292292
293293
$airline = CodonCache::read($key);
294294
295295
if($airline === false)
296-
{
296+
{*/
297297
$airline = DB::get_row('SELECT * FROM '.TABLE_PREFIX.'airlines
298298
WHERE `code`=\''.$code.'\'');
299299

300-
CodonCache::write($key, $airline, 'long');
301-
}
300+
/*CodonCache::write($key, $airline, 'long');
301+
}*/
302302

303303
return $airline;
304304
}
@@ -327,8 +327,7 @@ public static function addAirline($code, $name)
327327
return false;
328328

329329
CodonCache::delete('all_airlines');
330-
CodonCache::delete('all_airports_json');
331-
CodonCache::delete('all_airline_active');
330+
CodonCache::delete('all_airlines_active');
332331

333332
return true;
334333
}
@@ -349,9 +348,10 @@ public static function editAirline($id, $code, $name, $enabled=true)
349348

350349
if(DB::errno() != 0)
351350
return false;
352-
351+
353352
CodonCache::delete('airline_'.$code);
354-
CodonCache::delete('all_airports_json');
353+
CodonCache::delete('all_airlines');
354+
CodonCache::delete('all_airlines_active');
355355

356356
return true;
357357
}

core/common/PIREPData.class.php

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,28 +157,21 @@ public static function getIntervalDataByDays($where_params, $interval='7')
157157
*/
158158
public static function getIntervalData($where_params, $grouping='M')
159159
{
160-
if(strtolower($grouping) == 'y')
160+
$grouping = strtolower($grouping);
161+
162+
if($grouping == 'y')
161163
{
162164
$format = '%Y';
163165
}
164-
elseif(strtolower($grouping) == 'm')
166+
elseif($grouping == 'm')
165167
{
166168
$format = '%Y-%m';
167169
}
168-
elseif(strtolower($grouping) == 'd') /* go by day */
170+
elseif($grouping == 'd') /* go by day */
169171
{
170172
$format = '%Y-%m-%d';
171173
}
172174

173-
/*if(is_array($where_params))
174-
{
175-
$where_params['p.price'] = '> 0';
176-
}
177-
else
178-
{
179-
$where_params = array('p.price' => '> 0');
180-
}*/
181-
182175
$sql = "SELECT DATE_FORMAT(p.submitdate, '{$format}') AS ym,
183176
UNIX_TIMESTAMP(p.submitdate) AS timestamp,
184177
COUNT(p.pirepid) AS total,
@@ -187,7 +180,7 @@ public static function getIntervalData($where_params, $grouping='M')
187180
SUM(p.fuelprice) as fuelprice,
188181
SUM(p.price) as price,
189182
SUM(p.expenses) as expenses,
190-
(SUM(p.pilotpay) * SUM(p.flighttime)) as pilotpay
183+
SUM(p.pilotpay * p.flighttime) as pilotpay
191184
FROM ".TABLE_PREFIX."pireps p";
192185

193186
$sql .= DB::build_where($where_params);

core/templates/schedule_results.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ foreach($allroutes as $route)
4646
Comment out these two lines if you don't want to.
4747
*/
4848
49+
/* Check if a 7 is being used for Sunday, since PHP
50+
thinks 0 is Sunday */
51+
$route->daysofweek = str_replace('7', '0', $route->daysofweek);
52+
4953
if(strpos($route->daysofweek, date('w')) === false)
5054
continue;
5155

core/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
930
1+
931

install/checkinstall.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,21 @@ function success($title, $txt)
6565
{
6666
success('OK', "PHP version is {$version}.x");
6767
}
68+
echo '<br />';
6869

70+
echo '<strong>ASP Tags</strong><br />';
71+
$version = phpversion();
72+
$version = substr($version, 0, 3);
73+
74+
$val = ini_get('asp_tags');
75+
if(!empty($val))
76+
{
77+
error('Error!', 'The setting "asp_tags" in php.ini must be off!');
78+
}
79+
else
80+
{
81+
success('OK', 'ASP-style tags are disabled');
82+
}
6983

7084

7185

install/hashlist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ fac7c09a2f7b3c46a3c4d20ccb0eb2fb *./install/templates/s2_site_setup.tpl
99
07f3cdbc917e3438e893995298471387 *./install/templates/footer.tpl
1010
2eb3981ca63cc0b739372502bcdbdac8 *./install/templates/success.tpl
1111
98159de4e2de83127db1931eb35f818c *./install/update_437.sql
12-
fb61f59a4e1eb0f51ca5c9201b571ba5 *./install/checkinstall.php
12+
685ffe63c3a02fc1e4761db6603eb5df *./install/checkinstall.php
1313
c6384626328e54dd77c534d04ff65a44 *./install/update_700.sql
14-
dba6000718fa86a775d0c3b5b1d3b77e *./install/update.sql
14+
59e0a341d050b8ec19d8f423371c243e *./install/update.sql
1515
d41d8cd98f00b204e9800998ecf8427e *./install/index.php
1616
55c3722f079209f61fcfce707f077548 *./install/update_400.sql
1717
56522f3521444add8835afbba7375a11 *./install/update_854.sql
1818
0e366f4d9910ffc37ecb4051a93cf7df *./install/dbtest.php
19-
1f9b378702e30ecf337e62eaddf6703c *./install/install.sql
19+
57d1540938c2d737956ada10375bd73f *./install/install.sql
2020
1ee77934d1a602e9c74861c9391a55d9 *./install/update_628.sql
2121
c272ba4d5e3656768e851f448face751 *./install/loader.inc.php
2222
20aed0ce417ba947f254459309b4ac1f *./install/Installer.class.php
@@ -27,7 +27,7 @@ d4d204c3560c283fa4d7a3a367473740 *./install/navdata.sql
2727
654a8ef74503b880f8526873986da3af *./install/install.php
2828
0ce9f88088bd78d869525b8b202fb1bd *./core/lang/en.lang.php
2929
02813e8f573062b56012fea15bccde90 *./core/common/MaintenanceData.class.php
30-
a7f3dcafa34f2484a5be9cac106d5f6a *./core/common/PIREPData.class.php
30+
f53e180a3683b6fc8f7aacf3dcaada2d *./core/common/PIREPData.class.php
3131
38c88cbada3413d09adc5255428fa579 *./core/common/Auth.class.php
3232
26e225d004bd0b758c49f994453aaac7 *./core/common/jqgrid.class.php
3333
d8cc600bc66b4e2afb1cca5b433fdeb7 *./core/common/RegistrationData.class.php
@@ -51,13 +51,13 @@ aaeea0a1746813611fd2258bcdb6f494 *./core/common/FuelData.class.php
5151
8cf715ca3f9710c6fa9cedb383fbab37 *./core/common/ChartGraph.class.php
5252
c811db29accce3ea2beff8804a012daa *./core/common/DownloadData.class.php
5353
8511673219501abab65952bdc1cb7033 *./core/common/ACARSData.class.php
54-
bd1bf3ac2ef48b9a675baea9d5233baa *./core/common/OperationsData.class.php
54+
feff42124dde394cd1a4c946dab95aea *./core/common/OperationsData.class.php
5555
54d08de34e14adf506930c9433320756 *./core/common/CronData.class.php
5656
e1634f73751a74d4d411612fd3a9f307 *./core/common/OFCharts.class.php
5757
a3311e897e99e5d9f331fabc56ddbc2b *./core/common/CentralData.class.php
5858
ad22d5c59925bc27a300dd27675a2ff8 *./core/templates/profile_badge.tpl
5959
0600b921789561619e2a4a83385ff5ec *./core/templates/email_registrationdenied.tpl
60-
b195f3a46b86daad7fb6f99a6d080594 *./core/templates/schedule_results.tpl
60+
4765d3d07b673cf8a400e25c16ca6788 *./core/templates/schedule_results.tpl
6161
c931d63eba29c5891bc3d8738b330631 *./core/templates/pireps_viewall.tpl
6262
22c17523e1759462fdf5ef978b8acd40 *./core/templates/fsfk_log_flightimages.tpl
6363
6d692049399ca6ac1665b2e81ba3c1a0 *./core/templates/reqlogin.tpl
@@ -270,7 +270,7 @@ d003a142bf7c4bc1d7a9bb798ffbb13c *./admin/templates/awards_awardform.tpl
270270
1aa8e3acd547055ee81767664da9361e *./admin/templates/pages_editpage.tpl
271271
80a3a493203654f42d1d3abba5084916 *./admin/templates/sidebar_ranks.tpl
272272
d70b94341a9608d8684060cb91164cdb *./admin/templates/sidebar_customfields.tpl
273-
08cab3f2a425b1f2994a8a1b4a792088 *./admin/templates/finance_expenselist.tpl
273+
d6075792c84954948feb3bf423d7344c *./admin/templates/finance_expenselist.tpl
274274
0cf57246059a8c42b1e3a6e9eb5db504 *./admin/templates/sidebar_financial.tpl
275275
fe4396a5e7460f8f0eafe53595f2ddab *./admin/templates/settings_mainform.tpl
276276
64bd90ac0877b44a5a121eef0001a6c6 *./admin/templates/sidebar_downloads.tpl

install/install.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,4 +415,4 @@ INSERT INTO `phpvms_settings` VALUES(NULL, 'Webmaster Email Address', 'ADMIN_EMA
415415
INSERT INTO `phpvms_settings` VALUES(NULL, 'Date Format', 'DATE_FORMAT', 'm/d/Y', 'This is the date format to be used around the site.', 1);
416416
INSERT INTO `phpvms_settings` VALUES(NULL, 'Current Skin', 'CURRENT_SKIN', 'crystal', 'Available skins', 1);
417417
INSERT INTO `phpvms_settings` VALUES(NULL, 'Default User Group', 'DEFAULT_GROUP', 'Active Pilots', 'This is the default group if they are not explicitly denied', 1);
418-
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your VA''s Total Hours', 0);
418+
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your total hours', 0);

install/structure.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
<field Field="hub" Type="smallint(6)" Null="NO" Key="" Default="0" Extra="" />
7878
<field Field="fuelprice" Type="float" Null="NO" Key="" Default="0" Extra="" />
7979
<field Field="chartlink" Type="text" Null="NO" Key="" Extra="" />
80-
<key Table="phpvms_airports" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="553" Null="" Index_type="BTREE" Comment="" />
81-
<key Table="phpvms_airports" Non_unique="0" Key_name="icao" Seq_in_index="1" Column_name="icao" Collation="A" Cardinality="553" Null="" Index_type="BTREE" Comment="" />
82-
<options Name="phpvms_airports" Engine="InnoDB" Version="10" Row_format="Compact" Rows="389" Avg_row_length="168" Data_length="65536" Max_data_length="0" Index_length="16384" Data_free="6291456" Auto_increment="1469" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
80+
<key Table="phpvms_airports" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="213" Null="" Index_type="BTREE" Comment="" />
81+
<key Table="phpvms_airports" Non_unique="0" Key_name="icao" Seq_in_index="1" Column_name="icao" Collation="A" Cardinality="213" Null="" Index_type="BTREE" Comment="" />
82+
<options Name="phpvms_airports" Engine="InnoDB" Version="10" Row_format="Compact" Rows="82" Avg_row_length="799" Data_length="65536" Max_data_length="0" Index_length="16384" Data_free="6291456" Auto_increment="1469" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
8383
</table_structure>
8484
<table_structure name="phpvms_awards">
8585
<field Field="awardid" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
@@ -350,21 +350,21 @@
350350
<field Field="notes" Type="text" Null="NO" Key="" Extra="" />
351351
<field Field="enabled" Type="int(11)" Null="NO" Key="" Default="1" Extra="" />
352352
<field Field="bidid" Type="int(11)" Null="NO" Key="" Default="0" Extra="" />
353-
<key Table="phpvms_schedules" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
354-
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
355-
<key Table="phpvms_schedules" Non_unique="1" Key_name="flightnum" Seq_in_index="1" Column_name="flightnum" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
356-
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
357-
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="2" Column_name="arricao" Collation="A" Cardinality="25" Null="" Index_type="BTREE" Comment="" />
358-
<key Table="phpvms_schedules" Non_unique="1" Key_name="code" Seq_in_index="1" Column_name="code" Collation="A" Cardinality="1" Null="" Index_type="BTREE" Comment="" />
359-
<options Name="phpvms_schedules" Engine="InnoDB" Version="10" Row_format="Compact" Rows="217" Avg_row_length="302" Data_length="65536" Max_data_length="0" Index_length="65536" Data_free="6291456" Auto_increment="116" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
353+
<key Table="phpvms_schedules" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
354+
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
355+
<key Table="phpvms_schedules" Non_unique="1" Key_name="flightnum" Seq_in_index="1" Column_name="flightnum" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
356+
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="1" Column_name="depicao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
357+
<key Table="phpvms_schedules" Non_unique="1" Key_name="depicao_arricao" Seq_in_index="2" Column_name="arricao" Collation="A" Cardinality="55" Null="" Index_type="BTREE" Comment="" />
358+
<key Table="phpvms_schedules" Non_unique="1" Key_name="code" Seq_in_index="1" Column_name="code" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
359+
<options Name="phpvms_schedules" Engine="InnoDB" Version="10" Row_format="Compact" Rows="25" Avg_row_length="2621" Data_length="65536" Max_data_length="0" Index_length="65536" Data_free="6291456" Auto_increment="116" Create_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
360360
</table_structure>
361361
<table_structure name="phpvms_sessions">
362362
<field Field="id" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
363363
<field Field="pilotid" Type="int(11)" Null="NO" Key="" Extra="" />
364364
<field Field="ipaddress" Type="varchar(25)" Null="NO" Key="" Extra="" />
365365
<field Field="logintime" Type="datetime" Null="NO" Key="" Extra="" />
366-
<key Table="phpvms_sessions" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="61" Null="" Index_type="BTREE" Comment="" />
367-
<options Name="phpvms_sessions" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="61" Avg_row_length="32" Data_length="1992" Max_data_length="281474976710655" Index_length="2048" Data_free="0" Auto_increment="1796" Create_time="2009-10-31 20:05:09" Update_time="2010-04-22 23:53:55" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
366+
<key Table="phpvms_sessions" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="191" Null="" Index_type="BTREE" Comment="" />
367+
<options Name="phpvms_sessions" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="191" Avg_row_length="32" Data_length="6152" Max_data_length="281474976710655" Index_length="4096" Data_free="0" Auto_increment="1926" Create_time="2009-10-31 20:05:09" Update_time="2010-04-26 13:53:37" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
368368
</table_structure>
369369
<table_structure name="phpvms_settings">
370370
<field Field="id" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
@@ -383,7 +383,7 @@
383383
<field Field="lastupdate" Type="datetime" Null="NO" Key="" Extra="" />
384384
<key Table="phpvms_updates" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="id" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
385385
<key Table="phpvms_updates" Non_unique="1" Key_name="name" Seq_in_index="1" Column_name="name" Collation="A" Cardinality="9" Null="" Index_type="BTREE" Comment="" />
386-
<options Name="phpvms_updates" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="9" Avg_row_length="33" Data_length="300" Max_data_length="281474976710655" Index_length="3072" Data_free="0" Auto_increment="10" Create_time="2009-12-20 17:51:29" Update_time="2010-04-22 14:14:01" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
386+
<options Name="phpvms_updates" Engine="MyISAM" Version="10" Row_format="Dynamic" Rows="9" Avg_row_length="33" Data_length="300" Max_data_length="281474976710655" Index_length="3072" Data_free="0" Auto_increment="10" Create_time="2009-12-20 17:51:29" Update_time="2010-04-26 13:52:51" Check_time="2010-04-20 19:10:29" Collation="latin1_swedish_ci" Create_options="" Comment="" />
387387
</table_structure>
388388
</database>
389389
</mysqldump>

install/update.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ ALTER TABLE `phpvms_schedules` ADD `route_details` TEXT NOT NULL AFTER `route`;
4040
ALTER TABLE `phpvms_aircraft` ADD `minrank` INT NOT NULL DEFAULT '0' AFTER `maxcargo`;
4141
ALTER TABLE `phpvms_aircraft` ADD `ranklevel` INT NOT NULL DEFAULT '0' AFTER `minrank` ;
4242

43+
-- It's sometimes missing
44+
INSERT INTO `phpvms_settings` VALUES(NULL , 'Total VA Hours', 'TOTAL_HOURS', '0', 'Your total hours', 0);
45+
4346
-- Remove deprecated settings;
4447
DELETE FROM `phpvms_settings` WHERE `name`='PHPVMS_VERSION';
4548
DELETE FROM `phpvms_settings` WHERE `name`='NOTIFY_UPDATE';

0 commit comments

Comments
 (0)