Dotclear

Changeset 2216:91f485a16187


Ignore:
Timestamp:
10/02/13 17:47:15 (10 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
dcRepo
Message:

Rename dcRepository to dcStore because of dotAddict used this name

Files:
6 edited
3 moved

Legend:

Unmodified
Added
Removed
  • admin/blog_theme.php

    r2215 r2216  
    1616 
    1717# -- "First time" settings setup -- 
    18 if ($core->blog->settings->system->repository_theme_url === null) { 
     18if ($core->blog->settings->system->store_theme_url === null) { 
    1919     $core->blog->settings->system->put( 
    20           'repository_theme_url', 'http://update.dotaddict.org/dc2/themes.xml', 'string', 'Themes XML feed location', true, true 
     20          'store_theme_url', 'http://update.dotaddict.org/dc2/themes.xml', 'string', 'Themes XML feed location', true, true 
    2121     ); 
    2222} 
     
    3030     $core->themes,  
    3131     $core->blog->themes_path, 
    32      $core->blog->settings->system->repository_theme_url 
     32     $core->blog->settings->system->store_theme_url 
    3333); 
    3434$list::$distributed_modules = array( 
     
    132132 
    133133     # Updated modules from repo 
    134      $modules = $list->repository->get(true); 
     134     $modules = $list->store->get(true); 
    135135     if (!empty($modules)) { 
    136136          echo  
     
    202202     # New modules from repo 
    203203     $search = $list->getSearchQuery(); 
    204      $modules = $search ? $list->repository->search($search) : $list->repository->get(); 
     204     $modules = $search ? $list->store->search($search) : $list->store->get(); 
    205205 
    206206     if (!empty($search) || !empty($modules)) { 
  • admin/index.php

    r2215 r2216  
    126126 
    127127# Check plugins and themes update from repository 
    128 function dc_check_repository_update($mod, $url, $img, $icon) 
    129 { 
    130      $repo = new dcRepository($mod, $url); 
     128function dc_check_store_update($mod, $url, $img, $icon) 
     129{ 
     130     $repo = new dcStore($mod, $url); 
    131131     $upd = $repo->get(true); 
    132132     if (!empty($upd)) { 
     
    137137} 
    138138if (isset($__dashboard_icons['plugins'])) { 
    139      dc_check_repository_update($core->plugins, $core->blog->settings->system->repository_plugin_url, 'plugins', $__dashboard_icons['plugins']); 
     139     dc_check_store_update($core->plugins, $core->blog->settings->system->store_plugin_url, 'plugins', $__dashboard_icons['plugins']); 
    140140} 
    141141if (isset($__dashboard_icons['blog_theme'])) { 
    142142     $themes = new dcThemes($core); 
    143143     $themes->loadModules($core->blog->themes_path, null); 
    144      dc_check_repository_update($themes, $core->blog->settings->system->repository_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']); 
     144     dc_check_store_update($themes, $core->blog->settings->system->store_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']); 
    145145} 
    146146 
  • admin/plugins.php

    r2215 r2216  
    2121     ); 
    2222} 
    23 if ($core->blog->settings->system->repository_plugin_url === null) { 
     23if ($core->blog->settings->system->store_plugin_url === null) { 
    2424     $core->blog->settings->system->put( 
    25           'repository_plugin_url', 'http://update.dotaddict.org/dc2/plugins.xml', 'string', 'Plugins XML feed location', true, true 
     25          'store_plugin_url', 'http://update.dotaddict.org/dc2/plugins.xml', 'string', 'Plugins XML feed location', true, true 
    2626     ); 
    2727} 
     
    3131     $core->plugins,  
    3232     DC_PLUGINS_ROOT,  
    33      $core->blog->settings->system->repository_plugin_url 
     33     $core->blog->settings->system->store_plugin_url 
    3434); 
    3535 
     
    156156 
    157157     # Updated modules from repo 
    158      $modules = $list->repository->get(true); 
     158     $modules = $list->store->get(true); 
    159159     if (!empty($modules)) { 
    160160          echo  
     
    225225     # New modules from repo 
    226226     $search = $list->getSearchQuery(); 
    227      $modules = $search ? $list->repository->search($search) : $list->repository->get(); 
     227     $modules = $search ? $list->store->search($search) : $list->store->get(); 
    228228 
    229229     if (!empty($search) || !empty($modules)) { 
  • admin/services.php

    r2215 r2216  
    465465          } 
    466466          elseif ($list == 'plugin-new') { 
    467                $repository = new dcRepository( 
     467               $store = new dcStore( 
    468468                    $core->plugins,  
    469                     $core->blog->settings->system->repository_plugin_url 
     469                    $core->blog->settings->system->store_plugin_url 
    470470               ); 
    471                $repository->check(); 
    472  
    473                $modules = $repository->get(); 
     471               $store->check(); 
     472 
     473               $modules = $store->get(); 
    474474               if (empty($modules) || !isset($modules[$id])) { 
    475475                    throw new Exception('Unknow module ID'); 
  • inc/admin/lib.moduleslist.php

    r2215 r2216  
    1616     public $core; 
    1717     public $modules; 
    18      public $repository; 
     18     public $store; 
    1919 
    2020     public static $allow_multi_install = false; 
     
    4747          $this->core = $modules->core; 
    4848          $this->modules = $modules; 
    49           $this->repository = new dcRepository($modules, $xml_url); 
     49          $this->store = new dcStore($modules, $xml_url); 
    5050 
    5151          $this->setPathInfo($modules_root); 
     
    231231     } 
    232232 
     233     /** @todo Use new mesasge system **/ 
    233234     public function displayMessage($action) 
    234235     { 
     
    487488                    } break; 
    488489 
    489                     # Install (from repository) 
     490                    # Install (from store) 
    490491                    case 'install': if ($this->path_writable) { 
    491492                         $submits[] =  
     
    493494                    } break; 
    494495 
    495                     # Update (from repository) 
     496                    # Update (from store) 
    496497                    case 'update': if ($this->path_writable) { 
    497498                         $submits[] =  
     
    591592               elseif (!empty($_POST['install'])) { 
    592593 
    593                     $updated = $this->repository->get(); 
     594                    $updated = $this->store->get(); 
    594595                    if (!isset($updated[$id])) { 
    595596                         throw new Exception(__('No such module.')); 
     
    604605                    $this->core->callBehavior($prefix.'BeforeAdd', $module); 
    605606 
    606                     $ret_code = $this->repository->process($module['file'], $dest); 
     607                    $ret_code = $this->store->process($module['file'], $dest); 
    607608 
    608609                    # --BEHAVIOR-- moduleAfterAdd 
     
    614615               elseif (!empty($_POST['update'])) { 
    615616 
    616                     $updated = $repository->get(); 
     617                    $updated = $store->get(); 
    617618                    if (!isset($updated[$id])) { 
    618619                         throw new Exception(__('No such module.')); 
     
    639640                    $this->core->callBehavior($prefix.'BeforeUpdate', $module); 
    640641 
    641                     $this->repository->process($module['file'], $dest); 
     642                    $this->store->process($module['file'], $dest); 
    642643 
    643644                    # --BEHAVIOR-- moduleAfterUpdate 
     
    666667                    $url = urldecode($_POST['pkg_url']); 
    667668                    $dest = $this->getPath().'/'.basename($url); 
    668                     $this->repository->download($url, $dest); 
     669                    $this->store->download($url, $dest); 
    669670               } 
    670671 
     
    672673               $this->core->callBehavior($prefix.'BeforeAdd', null); 
    673674 
    674                $ret_code = $this->repository->install($dest); 
     675               $ret_code = $this->store->install($dest); 
    675676 
    676677               # --BEHAVIOR-- moduleAfterAdd 
     
    861862               $has_parent = !empty($module['parent']); 
    862863               if ($has_parent) { 
    863                     $is_parent_present = $this->core->themes->moduleExists($parent); 
     864                    $is_parent_present = $this->modules->moduleExists($parent); 
    864865               } 
    865866 
  • inc/core/class.dc.store.parser.php

    r2214 r2216  
    1818Provides an object to parse XML feed of modules from a repository. 
    1919*/ 
    20 class dcRepositoryParser 
     20class dcStoreParser 
    2121{ 
    2222     /** @var  object    XML object of feed contents */ 
     
    3030      * Constructor. 
    3131      * 
    32       * @param string         Feed content 
     32      * @param string    $data          Feed content 
    3333      */ 
    3434     public function __construct($data) 
  • inc/core/class.dc.store.php

    r2215 r2216  
    1818Provides an object to parse XML feed of modules from repository. 
    1919*/ 
    20 class dcRepository 
     20class dcStore 
    2121{ 
    2222     /** @var  object    dcCore instance */ 
     
    5959               return false; 
    6060          } 
    61           if (($parser = dcRepositoryReader::quickParse($this->xml_url, DC_TPL_CACHE, $force)) === false) { 
     61          if (($parser = dcStoreReader::quickParse($this->xml_url, DC_TPL_CACHE, $force)) === false) { 
    6262               return false; 
    6363          } 
     
    116116      * 
    117117      * Every time a part of query is find on module, 
    118       * result accuracy grow. Result is sorted by acuracy. 
     118      * result accuracy grow. Result is sorted by accuracy. 
    119119      * 
    120120      * @param string    $pattern  String to search 
     
    127127          # Split query into small clean words 
    128128          $patterns = explode(' ', $pattern); 
    129           array_walk($patterns, array('dcRepository','sanitize')); 
     129          array_walk($patterns, array('dcStore','sanitize')); 
    130130 
    131131          # For each modules 
     
    134134               # Split modules infos into small clean word 
    135135               $subjects = explode(' ', $id.' '.$module['name'].' '.$module['desc']); 
    136                array_walk($subjects, array('dcRepository','sanitize')); 
     136               array_walk($subjects, array('dcStore','sanitize')); 
    137137 
    138138               # Check contents 
  • inc/core/class.dc.store.reader.php

    r2214 r2216  
    1919This class extends clearbricks netHttp class. 
    2020*/ 
    21 class dcRepositoryReader extends netHttp 
     21class dcStoreReader extends netHttp 
    2222{ 
    2323     /** @var  string    User agent used to query repository */ 
     
    5353      * 
    5454      * @param string    $url      XML feed URL 
    55       * @return     object    dcRepository instance 
     55      * @return     object    dcStore instance 
    5656      */ 
    5757     public function parse($url) 
     
    6666          } 
    6767 
    68           return new dcRepositoryParser($this->getContent()); 
     68          return new dcStoreParser($this->getContent()); 
    6969     } 
    7070 
     
    123123 
    124124     /** 
    125       * Set force query reposiory. 
     125      * Set force query repository. 
    126126      * 
    127127      * @param boolean   $force    True to force query 
     
    202202               # Ok, parse feed 
    203203               case '200': 
    204                     if ($modules = new dcRepositoryParser($this->getContent())) { 
     204                    if ($modules = new dcStoreParser($this->getContent())) { 
    205205                         try { 
    206206                              files::makeDir(dirname($cached_file), true); 
  • inc/prepend.php

    r2147 r2216  
    4646$__autoload['dcWorkspace']              = dirname(__FILE__).'/core/class.dc.workspace.php'; 
    4747$__autoload['dcPrefs']                  = dirname(__FILE__).'/core/class.dc.prefs.php'; 
    48 $__autoload['dcRepository']             = dirname(__FILE__).'/core/class.dc.repository.php'; 
    49 $__autoload['dcRepositoryReader']       = dirname(__FILE__).'/core/class.dc.repository.reader.php'; 
    50 $__autoload['dcRepositoryParser']       = dirname(__FILE__).'/core/class.dc.repository.parser.php'; 
     48$__autoload['dcStore']             = dirname(__FILE__).'/core/class.dc.store.php'; 
     49$__autoload['dcStoreReader']       = dirname(__FILE__).'/core/class.dc.store.reader.php'; 
     50$__autoload['dcStoreParser']       = dirname(__FILE__).'/core/class.dc.store.parser.php'; 
    5151 
    5252$__autoload['rsExtPost']                = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map