It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Do not make the mosques into thoroughfares, except for the remembrance of Allah or for prayer."
No one narrated this hadith from Salim (may Allah have mercy on him) except Abu Qabil al-Ma'afiri (may Allah have mercy on him), whose name is Huyayy bin Hani', and no one narrated it from Abu Qabil (may Allah have mercy on him) except Ali bin Hawshab (may Allah have mercy on him); Yahya bin Salih (may Allah have mercy on him) is alone in narrating it.
Hadith Referenceالمعجم الأوسط / باب الألف / 31
Hadith Gradingمحدثین:تفرد به أبو قبيل عن سالم
Hadith Takhrij«قال أبو نعيم الأصبهاني: ورواه أبو نعيم من حديث يحيى بن صالح الوحاظي ثنا علي بن حوشب عن أبي قبيل حيي ابن هانئ عن سالم عنه بلفظ لا تتخذوا المساجد طرقا إلا لذكر أو صلاة ثم قال تفرد به أبو قبيل عن سالم «الإعلام بسنته عليه الصلاة والسلام بشرح سنن ابن ماجه الإمام، ج 4، ص 203»» «أخرجه الطبراني فى «الكبير» برقم: 13219»