Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
Blair2004 committed Mar 30, 2016
1 parent 8a64ea0 commit dabd2bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
35 changes: 4 additions & 31 deletions application/models/Dashboard_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function settings()
}

public function __set_admin_menu()
{
{
$admin_menus = array(
'dashboard' => array(
array(
Expand All @@ -355,49 +355,22 @@ public function __set_admin_menu()
array(
'href' => site_url( array( 'dashboard', 'update' ) ),
'icon' => 'fa fa-dashboard',
'title' => __( 'Update Center' )
'title' => __( 'Update Center' ),
'notices_nbr' => $this->events->apply_filters( 'update_center_notice_nbr', 0 )
),
array(
'href' => site_url( array( 'dashboard', 'about' ) ),
'icon' => 'fa fa-dashboard',
'title' => __( 'About' )
'title' => __( 'About' ),
),
),
/** 'media' => array(
array(
'title' => __( 'Media Library' ),
'icon' => 'fa fa-image',
'href' => site_url('dashboard/media')
)
),
'installer' => array(
array(
'title' => __( 'Install Apps' ),
'icon' => 'fa fa-flask',
'href' => site_url('dashboard/installer')
)
),
**/
'modules' => array(
array(
'title' => __( 'Modules' ),
'icon' => 'fa fa-puzzle-piece',
'href' => site_url('dashboard/modules')
)
),
/** 'themes' => array(
array(
'title' => __( 'Themes' ),
'icon' => 'fa fa-columns',
'href' => site_url('dashboard/themes')
),
array(
'href' => site_url('dashboard/controllers'),
'icon' => 'fa fa-bookmark',
'title' => __( 'Menus' )
)
),
**/
'settings' => array(
array(
'title' => __( 'Settings' ),
Expand Down
7 changes: 4 additions & 3 deletions application/models/Update_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function auto_update()
)
{
// La valeur change lorsqu'il y a une mise à jour supérieure
if( version_compare( $regular_release, $_ref[ 'tag_name' ], '<' ) ) {
if( version_compare( $regular_release, $_rel[ 'tag_name' ], '<' ) ) {
$regular_release = $_rel[ 'tag_name' ];
}
if( version_compare( $major_release, $_ref[ 'tag_name' ], '<' ) && preg_match("/\#auto_update\#/", $_ref[ 'body' ] ) ) {
if( version_compare( $major_release, $_rel[ 'tag_name' ], '<' ) && preg_match("/\#auto_update\#/", $_rel[ 'body' ] ) ) {
$major_release = $_rel[ 'tag_name' ];
}
}
Expand All @@ -52,6 +52,7 @@ function auto_update()
if( $this->session->userdata( 'auto_update_step' ) <= 3 ) {
$this->install( $this->session->userdata( 'auto_update_step' ) , $major_release );
}

}

// Save cache
Expand All @@ -66,7 +67,7 @@ function auto_update()
version_compare( $this->cache->get( 'major_release' ), $this->config->item( 'version' ), '>' )
) {
$this->events->add_filter( 'update_center_notice_nbr', function( $nbr ) {
return $nbr++;
return $nbr + 1;
});
}
}
Expand Down

0 comments on commit dabd2bc

Please sign in to comment.