Example #1
0
function updateVersion()
{
    require_once 'lib/class.settings.php';
    require_once 'lib/class.github.php';
    $github = new GitHub('gugahoi', 'mediafrontpage');
    $commit = $github->getCommits();
    $commitNo = $commit['0']['sha'];
    $config = new ConfigMagik('config.ini', true, true);
    try {
        $config->set('version', $commitNo, 'ADVANCED');
    } catch (Exception $e) {
        echo false;
        exit;
    }
    echo true;
}
Example #2
0
               <td>Bug Tracker</td><td><a href="http://mediafrontpage.lighthouseapp.com">http://mediafrontpage.lighthouseapp.com</a></td>
             </tr>
             <tr align="left">
               <td>Last Updated</td>
               <td>
               <?php 
 $github = new GitHub('gugahoi', 'mediafrontpage');
 $date = $github->getInfo();
 echo $date['pushed_at'];
 ?>
               </td>
             </tr>
             <tr align="left">
               <td>
                 <?php 
 $commit = $github->getCommits();
 $commitNo = $commit['0']['sha'];
 $currentVersion = $config->get('version', 'ADVANCED');
 echo "Version </td><td><a href='https://github.com/gugahoi/mediafrontpage/commit/" . $currentVersion . "' target='_blank'>" . $currentVersion . '</a>';
 if ($commitNo != $currentVersion) {
     echo "\t<a href='#' onclick='updateVersion();' title='" . $commitNo . " - Description: " . $commit['0']['commit']['message'] . "'>***UPDATE Available***</a>";
 }
 ?>
               </td>
             </tr>
           </table>
         </div>
         <div id="GLOBAL" class="panel"><br><br>
           <h3>Global Settings</h3>
             <table>
               <tr>