File tree Expand file tree Collapse file tree 2 files changed +22
-26
lines changed
administrator/components/com_patchtester/PatchTester Expand file tree Collapse file tree 2 files changed +22
-26
lines changed Original file line number Diff line number Diff line change @@ -425,13 +425,11 @@ protected function _getListCount($query)
425425
426426 return (int ) $ this ->getDb ()->loadResult ();
427427 }
428+
428429 // Otherwise fall back to inefficient way of counting all results.
429- else
430- {
431- $ this ->getDb ()->setQuery ($ query )->execute ();
430+ $ this ->getDb ()->setQuery ($ query )->execute ();
432431
433- return (int ) $ this ->getDb ()->getNumRows ();
434- }
432+ return (int ) $ this ->getDb ()->getNumRows ();
435433 }
436434
437435 /**
Original file line number Diff line number Diff line change @@ -31,32 +31,30 @@ public function loadTemplate($tpl = null)
3131 $ file = isset ($ tpl ) ? $ this ->getLayout () . '_ ' . $ tpl : $ this ->getLayout ();
3232 $ path = $ this ->getPath ($ file );
3333
34- if ($ path )
34+ if (! $ path )
3535 {
36- // Unset so as not to introduce into template scope
37- unset($ tpl );
38- unset($ file );
36+ throw new \RuntimeException (\JText::sprintf ('JLIB_APPLICATION_ERROR_LAYOUTFILE_NOT_FOUND ' , $ file ), 500 );
37+ }
3938
40- // Never allow a 'this' property
41- if (isset ($ this ->this ))
42- {
43- unset($ this ->this );
44- }
39+ // Unset so as not to introduce into template scope
40+ unset($ tpl );
41+ unset($ file );
4542
46- // Start an output buffer.
47- ob_start ();
43+ // Never allow a 'this' property
44+ if (isset ($ this ->this ))
45+ {
46+ unset($ this ->this );
47+ }
4848
49- // Load the template .
50- include $ path ;
49+ // Start an output buffer .
50+ ob_start () ;
5151
52- // Get the layout contents .
53- $ output = ob_get_clean () ;
52+ // Load the template .
53+ include $ path ;
5454
55- return $ output ;
56- }
57- else
58- {
59- throw new \RuntimeException (\JText::sprintf ('JLIB_APPLICATION_ERROR_LAYOUTFILE_NOT_FOUND ' , $ file ), 500 );
60- }
55+ // Get the layout contents.
56+ $ output = ob_get_clean ();
57+
58+ return $ output ;
6159 }
6260}
You can’t perform that action at this time.
0 commit comments