Skip to content

Commit

Permalink
SQL and PHP cases
Browse files Browse the repository at this point in the history
PHP true,false,null in lowercase
SQL keywords uppercase
  • Loading branch information
Alexandra Nantel committed Aug 25, 2017
1 parent c7ed8e8 commit 707b0f6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion data-sources/data.tracker_activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function execute(array &$param_pool = null)
);

// Build the <activity> element
$item = new XMLElement('activity', NULL, array(
$item = new XMLElement('activity', null, array(
'type' => $activity['action_type'],
'entry-id' => $activity['item_id']
));
Expand Down
20 changes: 10 additions & 10 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ public function install()
{
Symphony::Database()->query(
"CREATE TABLE IF NOT EXISTS `tbl_tracker_activity` (
`id` int(11) unsigned NOT NULL auto_increment,
`item_type` varchar(255),
`item_id` varchar(75),
`action_type` varchar(255),
`user_id` int(11),
`timestamp` timestamp,
`fallback_username` varchar(2048),
`fallback_description` varchar(2048),
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`item_type` VARCHAR(255),
`item_id` VARCHAR(75),
`action_type` VARCHAR(255),
`user_id` INT(11),
`timestamp` TIMESTAMP,
`fallback_username` VARCHAR(2048),
`fallback_description` VARCHAR(2048),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;");

Expand All @@ -289,8 +289,8 @@ public function update($previousVersion = null)
if ($ret && version_compare($previousVersion, '1.7.0', '<')) {
$ret = Symphony::Database()->query("
ALTER TABLE `tbl_tracker_activity`
MODIFY `fallback_username` varchar(2048),
MODIFY `fallback_description` varchar(2048);
MODIFY `fallback_username` VARCHAR(2048),
MODIFY `fallback_description` VARCHAR(2048);
");
}

Expand Down
4 changes: 2 additions & 2 deletions lib/class.tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ public static function formatElementItem($activity, $fallback = false)
$about = ExtensionManager::about($activity['item_id']);
}
catch (Exception $e) {
$about = NULL;
$about = null;
}
if (empty($about)) {
$item = $activity['fallback_description'];
Expand Down Expand Up @@ -652,7 +652,7 @@ public static function formatElementItem($activity, $fallback = false)
break;

default:
$item = NULL;
$item = null;
break;
}

Expand Down

0 comments on commit 707b0f6

Please sign in to comment.