Inspector cleanup

master
Nathan Adams 2015-10-15 21:24:05 -05:00
parent e130ec13e2
commit 0b6fa7c64d
13 changed files with 13 additions and 16 deletions

View File

@ -14,5 +14,4 @@ $user->password = 'admin'; // the password is salted/hashed
$user->administrator = true;
$user->active = true;
$user->create();
print "Bootstrap ok\n";
?>
print "Bootstrap ok\n";

View File

@ -568,6 +568,7 @@ class IDF_Plugin_SyncMonotone
$keyGuard = new IDF_Plugin_SyncMonotone_ModelGuard($key);
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
/** @var \IDF_Project $project */
$conf = new IDF_Conf();
$conf->setProject($project);
$scm = $conf->getVal('scm', 'mtn');
@ -641,7 +642,7 @@ class IDF_Plugin_SyncMonotone
$read_perms, LOCK_EX) === false) {
$this->_diagnoseProblem(sprintf(
__('Could not write read-permissions for project "%s"'),
$shortname
$project->shortname
));
}
}

View File

@ -195,7 +195,7 @@ class Pluf_DB_MySQL
function __toString()
{
return '<Pluf_DB_MySQL('.$this->con_id.')>';
return '<Pluf_DB_MySQL('.$this->con_id->info.')>';
}
}

View File

@ -163,7 +163,8 @@ class Pluf_DB_SQLite
function __toString()
{
return '<Pluf_DB_SQLite('.$this->con_id.')>';
// According to PHPStorm \PDO does not define __toString
return '<Pluf_DB_SQLite()>';
}
}

View File

@ -56,7 +56,7 @@ class Pluf_Form_Field_Datetime extends Pluf_Form_Field
str_pad($day, 2, '0', STR_PAD_LEFT).' '.
str_pad($date['tm_hour'], 2, '0', STR_PAD_LEFT).':'.
str_pad($date['tm_min'], 2, '0', STR_PAD_LEFT).':';
str_pad($date['tm_sec'], 2, '0', STD_PAD_LEFT);
str_pad($date['tm_sec'], 2, '0', STR_PAD_LEFT);
// we internally use GMT, so we convert it to a GMT date.
return gmdate('Y-m-d H:i:s', strtotime($date));

View File

@ -65,7 +65,7 @@ class Pluf_Form_Widget_SelectMultipleInput_Checkbox extends Pluf_Form_Widget_Sel
public function idForLabel($id)
{
if ($id) {
$id += '_0';
$id .= '_0';
}
return $id;
}

View File

@ -147,7 +147,7 @@ class Pluf_Log
*/
public static function log($message)
{
return self::_log(self::ALL, $message);
self::_log(self::ALL, $message);
}
/**

View File

@ -42,7 +42,7 @@ class Pluf_Middleware_GoogleAnalytics
{
if (isset($response) && !isset($response->status_code))
return $response;
if (!Pluf::f('google_analytics_id', false)) {
return $response;
}

View File

@ -153,7 +153,6 @@ public static function render($c) {$t = $c; ?>'.$this->template_content.'<?php }
} else {
throw new Exception(sprintf(__('Cannot write the compiled template: %s'), $this->compiled_template));
}
return false;
}
public static function markSafe($string)

View File

@ -3335,4 +3335,3 @@ negligence or otherwise) arising in any way out of the use of this
software, even if advised of the possibility of such damage.
*/
?>

View File

@ -402,7 +402,7 @@ class Pluf_Translation_TemplateExtractor
$result.=$tok;
} elseif ($tok ==']') {
$result.=$tok;
} elseif ($getAsArray && $tok == ',') {
} elseif ($tok == ',') { // $getAsArray not defined anywhere...
$results[]=$result;
$result='';
} else {

View File

@ -142,5 +142,4 @@ class ccurl {
public function __tostring(){
return $this->_webpage;
}
}
?>
}

View File

@ -88,5 +88,4 @@ foreach ($files as $file) {
echo "\n";
echo 'Compiled files: '.count($files)."\n";
file_put_contents($output_file, '<?php '.implode("\n", $output).' ?>');
echo('Final size: '.(int)(100*filesize($output_file)/$size).'%'."\n");
?>
echo('Final size: '.(int)(100*filesize($output_file)/$size).'%'."\n");