Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Styling, PHP errors, etc.
  • Loading branch information
PromInc committed Sep 15, 2015
1 parent cba9a3b commit 44e7230
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 115 deletions.
103 changes: 0 additions & 103 deletions organic-search-analytics/css/gwt.css

This file was deleted.

4 changes: 3 additions & 1 deletion organic-search-analytics/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,6 @@ footer { margin-top: 50px; padding: 20px 20px 15px; background-color:#DDDDDD; }
.inputButtonSave {
background-color: green;
color: white;
}
}

#upgradeVersion { margin-left: 5px; color: #FF5400; }
12 changes: 7 additions & 5 deletions organic-search-analytics/inc/code/dataCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class DataCapture
{

const GOOGLE_SEARCH_ANALYTICS_MAX_DATE_OFFSET = 4;
const GOOGLE_SEARCH_ANALYTICS_MAX_DAYS = 90;

Expand All @@ -23,7 +23,7 @@ class DataCapture
'dimensions' => array('query','device'),
'row_limit' => 5000 /* Number of rows to capture from Google. Valid options: 1-5000 */
);

/**
* Get authorized sites from Google Search Console
*
Expand Down Expand Up @@ -65,10 +65,12 @@ public function getSitesBingWebmaster($enabledCheck = FALSE) {
$bingSites = json_decode( $bing->requestApi( config::CREDENTIALS_BING_API_KEY, 'GetUserSites' ) );

$return = array();
foreach( $bingSites->d as $site ) {
$return[] = array( 'url' => $site->Url );
if( $bingSites ) {
foreach( $bingSites->d as $site ) {
$return[] = array( 'url' => $site->Url );
}
}

return $return;
}

Expand Down
8 changes: 3 additions & 5 deletions organic-search-analytics/inc/html/_foot.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<div class="floatleft">
Developed by <a href="http://www.promincproductions.com/blog" target="_blank">Brian Prom</a>
</div>
<div class="floatright">
<?php $currerntVersion = file_get_contents( $GLOBALS['basedir'] . 'version.txt' ); ?>
<div id="versionBlock" class="floatright">
<?php $currerntVersion = file_get_contents( ( isset( $GLOBALS['basedir'] ) ? $GLOBALS['basedir'] : '' ) . 'version.txt' ); ?>
<span>ver <?php echo $currerntVersion; ?></span>
<span>
<span class="floatright" id="upgradeVersion" style="display:none;">A newer version is available. <a>Download <span id="upgradeVersionNumber"></span> now!</a></span>
</span>
<span id="upgradeVersion" class="floatright" style="display:none;">A newer version is available. <a>Download <span id="upgradeVersionNumber"></span> now!</a></span>
<script type="text/javascript">
$.get('https://api.github.com/repos/prominc/organic-search-analytics/releases/latest', function (data) {
var latestVersion = data.tag_name;
Expand Down
2 changes: 1 addition & 1 deletion organic-search-analytics/inc/html/_head.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script type="text/javascript" src="js/script.js"></script>

<?php if( $GLOBALS['scriptName'] == "settings.php" ) { ?>
<?php if( isset( $GLOBALS['scriptName'] ) && $GLOBALS['scriptName'] == "settings.php" ) { ?>
<script type="text/javascript" src="js/settings.js"></script>
<?php } ?>
</head>
Expand Down

0 comments on commit 44e7230

Please sign in to comment.