File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ function GetNavigator($contentPath){
190190}
191191
192192function CountSteps ($ pathFrom , $ pathTo ){
193+ // Debug::Log($pathFrom);
194+ // Debug::Log($pathTo);
193195
194196 $ steps = 0 ;
195197 $ current = $ pathFrom ;
@@ -204,7 +206,7 @@ function CountSteps($pathFrom, $pathTo){
204206 //
205207 // ./Master/Contents/Writing/Writing
206208 // ./Master/Contents/Writing/Writing/Method/WritingMethod
207- while (strpos ($ pathTo , $ current . '/ ' ) !== 0 || $ pathTo = = $ current ){
209+ while (strpos ($ pathTo , $ current . '/ ' ) !== 0 && $ pathTo ! = $ current ){
208210 $ current = dirname ($ current );
209211 $ steps ++;
210212
@@ -220,5 +222,6 @@ function CountSteps($pathFrom, $pathTo){
220222 $ steps ++;
221223 }
222224
225+ // Debug::Log($steps);
223226 return $ steps ;
224227}
You can’t perform that action at this time.
0 commit comments