Ticket #743: 743.diffs

File 743.diffs, 8.4 KB (added by vipsoft, 3 years ago)
Line 
1Index: plugins/ExampleRssWidget/ExampleRssWidget.php
2===================================================================
3--- plugins/ExampleRssWidget/ExampleRssWidget.php       (revision 1145)
4+++ plugins/ExampleRssWidget/ExampleRssWidget.php       (working copy)
5@@ -69,7 +69,7 @@
6        }
7        function get()
8        {
9-               require_once 'libs/Zend/Feed.php';
10+               require_once 'Zend/Feed.php';
11                try {
12                    $rss = Zend_Feed::import($this->url);
13                } catch (Zend_Feed_Exception $e) {
14@@ -102,4 +102,4 @@
15                $output .= '</ul></div>';
16                return $output;
17        }
18-}
19\ No newline at end of file
20+}
21Index: plugins/LanguagesManager/API.php
22===================================================================
23--- plugins/LanguagesManager/API.php    (revision 1145)
24+++ plugins/LanguagesManager/API.php    (working copy)
25@@ -43,13 +43,13 @@
26 
27        static public function getAvailableLanguagesInfo()
28        {
29-               require "lang/en.php";
30+               require PIWIK_INCLUDE_PATH . "/lang/en.php";
31                $englishTranslation = $translations;
32                $filenames = self::getAvailableLanguages();
33                $languagesInfo = array();
34                foreach($filenames as $filename)
35                {
36-                       require "lang/$filename.php";
37+                       require PIWIK_INCLUDE_PATH . "/lang/$filename.php";
38                        $translationStringsDone = array_intersect_key($englishTranslation, $translations);
39                        $percentageComplete = count($translationStringsDone) / count($englishTranslation);
40                        $percentageComplete = round(100 * $percentageComplete, 0); 
41@@ -76,7 +76,7 @@
42                $languagesInfo = array();
43                foreach($filenames as $filename)
44                {
45-                       require "lang/$filename.php";
46+                       require PIWIK_INCLUDE_PATH . "/lang/$filename.php";
47                        $languagesInfo[] = array( 'code' => $filename, 'name' => $translations['General_OriginalLanguageName']);
48                }
49                self::$availableLanguageNames = $languagesInfo;
50@@ -89,7 +89,7 @@
51                {
52                        return false;
53                }
54-               require "lang/$languageCode.php";
55+               require PIWIK_INCLUDE_PATH . "/lang/$languageCode.php";
56                $languageInfo = array();
57                foreach($translations as $key => $value)
58                {
59Index: plugins/Goals/Goals.php
60===================================================================
61--- plugins/Goals/Goals.php     (revision 1145)
62+++ plugins/Goals/Goals.php     (working copy)
63@@ -9,7 +9,7 @@
64  * @package Piwik_Referers
65  */
66       
67-require_once "core/Tracker/GoalManager.php";
68+require_once "Tracker/GoalManager.php";
69 
70 /**
71  * TODO Goals plugin
72Index: core/testMinimumPhpVersion.php
73===================================================================
74--- core/testMinimumPhpVersion.php      (revision 1145)
75+++ core/testMinimumPhpVersion.php      (working copy)
76@@ -85,4 +85,4 @@
77 
78 // we now include the upgradephp package to define some functions used in piwik
79 // that may not be defined in the current php version
80-require_once "libs/upgradephp/upgrade.php";
81+require_once "upgradephp/upgrade.php";
82Index: core/ExceptionHandler.php
83===================================================================
84--- core/ExceptionHandler.php   (revision 1145)
85+++ core/ExceptionHandler.php   (working copy)
86@@ -9,7 +9,7 @@
87  * @package Piwik_Helper
88  */
89 
90-require_once "core/Piwik.php";
91+require_once "Piwik.php";
92 
93 /**
94  * Exception handler used to display nicely exceptions in Piwik
95Index: core/Tracker/Generator.php
96===================================================================
97--- core/Tracker/Generator.php  (revision 1145)
98+++ core/Tracker/Generator.php  (working copy)
99@@ -117,8 +117,8 @@
100                // init GET and REQUEST to the empty array
101                $this->setFakeRequest();
102               
103-               require_once "core/Piwik.php";
104-               Piwik::createConfigObject('../config/config.ini.php');
105+               require_once "Piwik.php";
106+               Piwik::createConfigObject(PIWIK_INCLUDE_PATH . '/config/config.ini.php');
107                Zend_Registry::get('config')->disableSavingConfigurationFileUpdates();
108               
109                // setup database       
110@@ -304,7 +304,7 @@
111                 */
112                // we load some real referers to be used by the generator
113                $referers = array();
114-               require_once "misc/generateVisitsData/Referers.php";
115+               require_once PIWIK_INCLUDE_PATH . "/misc/generateVisitsData/Referers.php";
116 
117                $this->addParam('urlref',$referers);
118 
119@@ -313,8 +313,8 @@
120               
121                // load some user agent and accept language
122                $userAgent = $acceptLanguages = array();
123-               require_once "misc/generateVisitsData/UserAgent.php";
124-               require_once "misc/generateVisitsData/AcceptLanguage.php";
125+               require_once PIWIK_INCLUDE_PATH . "/misc/generateVisitsData/UserAgent.php";
126+               require_once PIWIK_INCLUDE_PATH . "/misc/generateVisitsData/AcceptLanguage.php";
127                $this->userAgents=$userAgent;
128                $this->acceptLanguage=$acceptLanguages;
129        }
130Index: core/Visualization/Chart.php
131===================================================================
132--- core/Visualization/Chart.php        (revision 1145)
133+++ core/Visualization/Chart.php        (working copy)
134@@ -9,7 +9,7 @@
135  * @package Piwik_Visualization
136  */
137 
138-require_once "libs/open-flash-chart/php-ofc-library/open-flash-chart.php";
139+require_once "open-flash-chart/php-ofc-library/open-flash-chart.php";
140 
141 /**
142  * Generates the data in the Open Flash Chart format, from the given data.
143Index: core/ViewDataTable/HtmlTable/Goals.php
144===================================================================
145--- core/ViewDataTable/HtmlTable/Goals.php      (revision 1145)
146+++ core/ViewDataTable/HtmlTable/Goals.php      (working copy)
147@@ -46,8 +46,8 @@
148                {
149                        if($columnName == 'goal_%s_conversion_rate')
150                        {
151-                               require_once "core/Tracker/GoalManager.php";
152-                               require_once "plugins/Goals/API.php";
153+                               require_once "Tracker/GoalManager.php";
154+                               require_once "Goals/API.php";
155                                $goals = Piwik_Goals_API::getGoals( $this->getIdSite() );
156                                foreach($goals as $goal)
157                                {
158Index: core/FrontController.php
159===================================================================
160--- core/FrontController.php    (revision 1145)
161+++ core/FrontController.php    (working copy)
162@@ -22,7 +22,7 @@
163  */
164 require_once "Timer.php";
165 require_once "PluginsManager.php";
166-require_once "core/Piwik.php";
167+require_once "Piwik.php";
168 require_once "Access.php";
169 require_once "Auth.php";
170 require_once "API/Proxy.php";
171Index: core/Translate.php
172===================================================================
173--- core/Translate.php  (revision 1145)
174+++ core/Translate.php  (working copy)
175@@ -32,7 +32,7 @@
176 
177        public function loadEnglishTranslation()
178        {
179-               require "lang/en.php";
180+               require PIWIK_INCLUDE_PATH . "/lang/en.php";
181                $this->mergeTranslationArray($translations);
182                $this->setLocale();
183                $this->englishLanguageLoaded = true;
184@@ -47,7 +47,7 @@
185                        return;
186                }
187               
188-               require "lang/" . $language . ".php";
189+               require PIWIK_INCLUDE_PATH . "/lang/" . $language . ".php";
190                $this->mergeTranslationArray($translations);
191                $this->setLocale();
192        }
193Index: core/View.php
194===================================================================
195--- core/View.php       (revision 1145)
196+++ core/View.php       (working copy)
197@@ -38,6 +38,7 @@
198                }
199 
200                $this->smarty->template_dir = $smConf->template_dir->toArray();
201+               array_walk($this->smarty->template_dir, "Piwik_View::addPiwikPath");
202 
203                $this->smarty->plugins_dir = $smConf->plugins_dir->toArray();
204                array_walk($this->smarty->plugins_dir, "Piwik_View::addPiwikPath");
205Index: core/Common.php
206===================================================================
207--- core/Common.php     (revision 1145)
208+++ core/Common.php     (working copy)
209@@ -94,7 +94,7 @@
210                        require_once "Zend/Auth.php";
211                        require_once "Timer.php";
212                        require_once "PluginsManager.php";
213-                       require_once "core/Piwik.php";
214+                       require_once "Piwik.php";
215                        require_once "Access.php";
216                        require_once "Auth.php";
217                        require_once "API/Proxy.php";
218Index: index.php
219===================================================================
220--- index.php   (revision 1146)
221+++ index.php   (working copy)
222@@ -20,8 +20,7 @@
223 }
224 
225 if((@include "Zend/Version.php") === false) {
226-       set_include_path(PIWIK_INCLUDE_PATH
227-               . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/core'
228+       set_include_path(PIWIK_INCLUDE_PATH . '/core'
229                . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs'
230                . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins'
231                . PATH_SEPARATOR . get_include_path());
232Index: piwik.php
233===================================================================
234--- piwik.php   (revision 1146)
235+++ piwik.php   (working copy)
236@@ -19,8 +19,7 @@
237 @ignore_user_abort(true);
238 
239 if((@include "Zend/Version.php") === false) {
240-       set_include_path(PIWIK_INCLUDE_PATH
241-               . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/core'
242+       set_include_path(PIWIK_INCLUDE_PATH . '/core'
243                . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/libs'
244                . PATH_SEPARATOR . PIWIK_INCLUDE_PATH . '/plugins'
245                . PATH_SEPARATOR . get_include_path());